Backend overview
Backend overview (CAP RPL)
Section titled “Backend overview (CAP RPL)”Audience: backend
Status: specced
Owns: backend
Depends on: Domain overview, Domain entities, API overview
Describe architecture with domain names, not invented DTOs. Application code is not started; this page captures the intended shape from discovery and product docs.
Context ownership
Section titled “Context ownership”| Concern | Owner context |
|---|---|
| Application lifecycle, competency, evidence, interview, certification path | CAP RPL |
| JWT issuance, shared auth, identity verification providers, notifications | Orchestrator |
| Course catalogue / recommendations fulfilment | LMS (CAP calls over gRPC) |
CAP consumes Orchestrator JWT; it does not redefine User login flows in isolation long-term.
Application aggregate
Section titled “Application aggregate”The Application aggregate is the process spine:
Transitions (e.g. DRAFT → CENTRE_REVIEW) must enforce identity verified, concurrent-application rules, and payment-before-facilitator.
Adapters (expected)
Section titled “Adapters (expected)”| Adapter | Purpose | Notes |
|---|---|---|
| Orchestrator auth | Validate JWT; optionally delegate register/login | Shared across apps |
| Identity provider | NIN (or successor) verify | Provider open — POL-04; prefer Orchestrator-hosted service |
| Payment | Candidate → centre payout rails | Centre payout details from centre onboarding |
| LMS gRPC | Course recommendations | On GAP_TRAINING / gap outcomes |
| Notifications | Email / in-app / WhatsApp | Via Orchestrator when available |
Module map → domain
Section titled “Module map → domain”| Product module | Domain focus |
|---|---|
| Auth | User credentials / session via Orchestrator |
| Identity | Identity on User; gate on Application submit |
| Trades | Trade, Unit (NOS) |
| Payment | Payment before EVIDENCE facilitation |
| Recommendations | Recommendation + LMS integration |
Client contract
Section titled “Client contract”HTTP shapes for web/clients: API overview (OpenAPI when available). Do not treat UX screen lists as the API.