# abarghoud/pps-easy architecture

> Architecture diagram of the GitHub repository abarghoud/pps-easy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abarghoud/pps-easy
- Repository: https://github.com/abarghoud/pps-easy

## Overview

PPS Easy lets a guest or signed-in user submit event and personal details, then simulates the PPS journey to obtain a certificate; the README says the data is transferred to PPS and the result is emailed. The client also supports authentication, contact, and informational pages. The API’s PPS orchestration and journey-step implementation are represented from the tree and module wiring; their internal calls were not sampled, so those links are not asserted. Firebase and local-mode choices are visible in the client composition root.

Main entry points: [`apps/client/src/app/app.tsx`](https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/app.tsx) (Client composition and routes), [`apps/api/src/app/generate.controller.ts`](https://github.com/abarghoud/pps-easy/blob/main/apps/api/src/app/generate.controller.ts) (PPS API), [`apps/api/src/app/pps/third-party/pps-api.ts`](https://github.com/abarghoud/pps-easy/blob/main/apps/api/src/app/pps/third-party/pps-api.ts) (PPS API adapter), [`apps/client/src/app/service/event-form-service.ts`](https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/service/event-form-service.ts) (Event form service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_app["Client composition and routes<br/>[app.tsx]"]
  node_certificate_form["Certificate form<br/>[EventFormPage.tsx]"]
  node_event_service["Event form service"]
  node_certificate_api["Certificate API client"]
  node_auth_ui["Login and guest access<br/>[LoginFormPage.tsx]"]
end

subgraph group_identity["Identity and data"]
  node_auth_hook["Authentication state<br/>[useAuth.ts]"]
  node_auth_service["Authentication service"]
  node_firebase[("Firebase services<br/>[firebase.ts]")]
  node_personal_info[("Personal info repository")]
end

subgraph group_api["API and validation"]
  node_api["PPS API"]
  node_recaptcha_guard["Generation reCAPTCHA guard<br/>[recaptcha.guard.ts]"]
  node_recaptcha_check["reCAPTCHA check endpoint"]
  node_recaptcha_lib["reCAPTCHA providers"]
end

subgraph group_journey["PPS journey"]
  node_usecase["PPS generation use case"]
  node_pps_adapter["PPS API adapter<br/>[pps-api.ts]"]
  node_steps["PPS journey steps"]
end

node_visitor(("Visitor"))
node_pps_service["PPS service"]
node_email["Email result"]

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_certificate_form
node_app -->|"routes to"| node_auth_ui
node_app -->|"uses"| node_auth_hook
node_app -->|"configures"| node_event_service
node_app -->|"configures"| node_certificate_api
node_certificate_form -.->|"submits form"| node_event_service
node_event_service -.->|"requests certificate"| node_certificate_api
node_app -->|"configures"| node_auth_service
node_auth_hook -->|"calls"| node_auth_service
node_auth_service -->|"initializes auth"| node_firebase
node_app -->|"configures"| node_personal_info
node_certificate_api -->|"submits profile"| node_api
node_api -->|"guards request"| node_recaptcha_guard
node_recaptcha_check -.->|"checks token"| node_recaptcha_lib
node_api -->|"dispatches generation"| node_usecase
node_usecase -->|"runs journey"| node_pps_adapter
node_pps_adapter -.->|"executes steps"| node_steps
node_pps_adapter -->|"transfers data"| node_pps_service
node_pps_service -->|"sends result"| node_email

click node_app "https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/app.tsx"
click node_certificate_form "https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/components/form/EventFormPage.tsx"
click node_event_service "https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/service/event-form-service.ts"
click node_certificate_api "https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/api/pps-certificate-api-service.ts"
click node_auth_ui "https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/components/form/LoginFormPage.tsx"
click node_auth_hook "https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/hooks/useAuth.ts"
click node_auth_service "https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/service/firebase-authentication-service.ts"
click node_firebase "https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/config/firebase.ts"
click node_personal_info "https://github.com/abarghoud/pps-easy/blob/main/libs/user/data-access/src/lib/user-personal-info-firebase-repository.ts"
click node_api "https://github.com/abarghoud/pps-easy/blob/main/apps/api/src/app/generate.controller.ts"
click node_recaptcha_guard "https://github.com/abarghoud/pps-easy/blob/main/apps/api/src/app/guards/recaptcha.guard.ts"
click node_recaptcha_check "https://github.com/abarghoud/pps-easy/blob/main/apps/api/src/app/recpatcha/recaptcha.controller.ts"
click node_recaptcha_lib "https://github.com/abarghoud/pps-easy/blob/main/libs/recaptcha/google/src/lib/google-recaptcha-checker.ts"
click node_usecase "https://github.com/abarghoud/pps-easy/blob/main/apps/api/src/app/pps/usecase/pps-generator-usecase.service.ts"
click node_pps_adapter "https://github.com/abarghoud/pps-easy/blob/main/apps/api/src/app/pps/third-party/pps-api.ts"
click node_steps "https://github.com/abarghoud/pps-easy/tree/main/apps/api/src/app/pps/third-party/journey-steps"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_certificate_form,node_event_service,node_certificate_api,node_auth_ui toneBlue
class node_auth_hook,node_auth_service,node_firebase,node_personal_info toneAmber
class node_api,node_recaptcha_guard,node_recaptcha_check,node_recaptcha_lib toneMint
class node_usecase,node_pps_adapter,node_steps toneRose
class node_visitor,node_pps_service,node_email toneIndigo
```

## Components

### Client experience

- [Client composition and routes](https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/app.tsx): `apps/client/src/app/app.tsx`
- [Certificate form](https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/components/form/EventFormPage.tsx): `apps/client/src/app/components/form/EventFormPage.tsx`
- [Event form service](https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/service/event-form-service.ts): `apps/client/src/app/service/event-form-service.ts`
- [Certificate API client](https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/api/pps-certificate-api-service.ts): `apps/client/src/app/api/pps-certificate-api-service.ts`
- [Login and guest access](https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/components/form/LoginFormPage.tsx): `apps/client/src/app/components/form/LoginFormPage.tsx`

### Identity and data

- [Authentication state](https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/hooks/useAuth.ts): `apps/client/src/app/hooks/useAuth.ts`
- [Authentication service](https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/service/firebase-authentication-service.ts): `apps/client/src/app/service/firebase-authentication-service.ts`
- [Firebase services](https://github.com/abarghoud/pps-easy/blob/main/apps/client/src/app/config/firebase.ts): `apps/client/src/app/config/firebase.ts`
- [Personal info repository](https://github.com/abarghoud/pps-easy/blob/main/libs/user/data-access/src/lib/user-personal-info-firebase-repository.ts): `libs/user/data-access/src/lib/user-personal-info-firebase-repository.ts`

### API and validation

- [PPS API](https://github.com/abarghoud/pps-easy/blob/main/apps/api/src/app/generate.controller.ts): `apps/api/src/app/generate.controller.ts`
- [Generation reCAPTCHA guard](https://github.com/abarghoud/pps-easy/blob/main/apps/api/src/app/guards/recaptcha.guard.ts): `apps/api/src/app/guards/recaptcha.guard.ts`
- [reCAPTCHA check endpoint](https://github.com/abarghoud/pps-easy/blob/main/apps/api/src/app/recpatcha/recaptcha.controller.ts): `apps/api/src/app/recpatcha/recaptcha.controller.ts`
- [reCAPTCHA providers](https://github.com/abarghoud/pps-easy/blob/main/libs/recaptcha/google/src/lib/google-recaptcha-checker.ts): `libs/recaptcha/google/src/lib/google-recaptcha-checker.ts`

### PPS journey

- [PPS generation use case](https://github.com/abarghoud/pps-easy/blob/main/apps/api/src/app/pps/usecase/pps-generator-usecase.service.ts): `apps/api/src/app/pps/usecase/pps-generator-usecase.service.ts`
- [PPS API adapter](https://github.com/abarghoud/pps-easy/blob/main/apps/api/src/app/pps/third-party/pps-api.ts): `apps/api/src/app/pps/third-party/pps-api.ts`
- [PPS journey steps](https://github.com/abarghoud/pps-easy/tree/main/apps/api/src/app/pps/third-party/journey-steps): `apps/api/src/app/pps/third-party/journey-steps`

### Other components

- **Visitor**
- **PPS service**
- **Email result**

## Connections

- Visitor → Client composition and routes: uses (evidence: `apps/client/src/app/app.tsx`)
- Client composition and routes → Certificate form: routes to (evidence: `apps/client/src/app/app.tsx`)
- Client composition and routes → Login and guest access: routes to (evidence: `apps/client/src/app/app.tsx`)
- Client composition and routes → Authentication state: uses (evidence: `apps/client/src/app/app.tsx`)
- Client composition and routes → Event form service: configures (evidence: `apps/client/src/app/app.tsx`)
- Client composition and routes → Certificate API client: configures (evidence: `apps/client/src/app/app.tsx`)
- Certificate form → Event form service: submits form
- Event form service → Certificate API client: requests certificate
- Client composition and routes → Authentication service: configures (evidence: `apps/client/src/app/app.tsx`)
- Authentication state → Authentication service: calls (evidence: `apps/client/src/app/hooks/useAuth.ts`)
- Authentication service → Firebase services: initializes auth (evidence: `apps/client/src/app/service/firebase-authentication-service.ts`)
- Client composition and routes → Personal info repository: configures (evidence: `apps/client/src/app/app.tsx`)
- Certificate API client → PPS API: submits profile (evidence: `README.md`)
- PPS API → Generation reCAPTCHA guard: guards request (evidence: `apps/api/src/app/generate.controller.ts`)
- reCAPTCHA check endpoint → reCAPTCHA providers: checks token
- PPS API → PPS generation use case: dispatches generation (evidence: `apps/api/src/app/generate.controller.ts`)
- PPS generation use case → PPS API adapter: runs journey (evidence: `apps/api/src/app/pps/usecase/pps-generator-usecase.service.ts`)
- PPS API adapter → PPS journey steps: executes steps
- PPS API adapter → PPS service: transfers data (evidence: `README.md`)
- PPS service → Email result: sends result (evidence: `README.md`)
