Architecture
1. Overview
The Registration Portal is built as a JHipster gateway application, providing a single entry point for user interactions while proxying backend operations to the admin-service. This architecture enables authentication, API routing, and a modern Angular frontend.
Application Type: JHipster Gateway with Angular frontend
2. Technology Stack
2.1. Frontend
-
Framework: Angular 17+
-
Build Tools: Node.js 18+, npm 9+, Angular CLI
-
Key Libraries: Angular Router, Reactive Forms, RxJS, Bootstrap 5, NgBootstrap
2.2. Backend (Gateway)
-
Framework: Spring Boot 3.1+
-
Key Components: Spring Cloud Gateway, Spring Security
-
Java Version: Java 17+
3. Architectural Layers
3.1. Presentation Layer
Responsibilities:
-
User interface rendering
-
User interaction handling
-
Client-side validation
-
State management
-
HTTP client operations
4. Multi-Tenant Architecture
The Registration Portal supports multi-tenant operation where a single application instance serves multiple organizations:
-
URL-based Tenant Determination - Subdomain or X-TENANT-ID header
-
Data Isolation - Each organization’s data is completely isolated
-
Shared Infrastructure - Single application deployment serves all organizations
-
Tenant → RegistrationSystem → Organisation - Tenant resolution flows through RegistrationSystem to Organisation
5. Component Structure
5.1. Frontend Structure
src/main/webapp/app/
├── account/ # User account management
├── admin/ # Admin features
├── core/ # Core services
│ ├── interceptor/ # HTTP interceptors
│ └── services/ # Core business services
│ ├── form.service.ts
│ ├── linked-person-state.service.ts
│ └── membership.service.ts
├── entities/ # Entity management
│ ├── admin-service/ # Proxied entities
│ ├── linked-person/ # LinkedPerson workflows
│ ├── membership/ # Membership workflows
│ └── registration/ # Event registration
├── layouts/ # Layout components
├── shared/ # Shared utilities
└── ui/ # UI-specific components
6. Development Environment
6.2. Running Locally
Backend (Gateway):
# Start MySQL
docker-compose -f src/main/docker/mysql.yml up -d
# Run gateway
./mvnw spring-boot:run
Frontend (Angular):
npm install
npm start
Access:
-
Application: http://localhost:4200
-
Gateway API: http://localhost:8081
7. Cross-Cutting Designs
These pages describe contracts that features plug into rather than designing any single feature. They are the architectural rails that event-registration, membership-registration, and future flows build on.
7.1. Navigation & Return-State Architecture
Canonical screen inventory and the three-tier return-state contract that keeps generic screens flow-agnostic:
-
Screen graph (generic vs flow-specific boundaries)
-
Tier 1 in-memory return URL, Tier 2
sessionStorageflow context, Tier 3 org-landing fallback -
SessionServiceAPI andFlowContexttype -
Caller/callee implementation patterns
-
Step-by-step guide for adding a new flow
See Navigation & Return-State Architecture for details.
7.2. Process Flow Integration
The Registration Portal leverages ProcessDefinition entities to create dynamic, sequential form workflows:
-
Sequential steps with back navigation
-
Batch processing for multiple participants
-
ProcessDataas a staging area before business-entity creation -
FormFieldfactory and question-type catalogue -
Progress tracking
See Process Flow Integration for details.
7.3. Security Implementation
Implementation details for the security architecture:
-
Hash-based authentication endpoint (
AuthenticationResource) -
OIDC authentication with backend token exchange
-
JWT session management and automatic refresh
-
JWT relay filter for backend requests
-
Tenant context handling
See Security Implementation for details.
8. Module Contents
-
Security Architecture - Authentication methods (hash-based and OIDC), token exchange architecture, session management, and security layers
-
Security Implementation - Code-level security details complementing the architecture doc
-
API Proxy Design - Gateway routing and backend integration
-
Navigation & Return-State Architecture - Cross-cutting navigation contract, screen inventory, three-tier return-state model, and guide for adding new flows
-
Process Flow Integration - ProcessDefinition/ProcessStep/FormField contract and the ProcessData staging pattern
9. Related Documentation
-
Requirements - Functional and non-functional requirements
-
Design - Detailed implementation design