# bcgov/myss architecture

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

- Interactive diagram: https://gitdiagram.com/bcgov/myss
- Repository: https://github.com/bcgov/myss

## Overview

My Self Serve provides online access to BC income and disability assistance. Its product spans a web client, API, and Strapi content service; the API also supports forms, attachments, eligibility, bus-pass submissions, and an intake/review workflow. For review, the shown path is worker request → controller → review service, which reads intake data and event history and retrieves the form version. The API’s bus-pass integration reaches the separate ICM middleware. Edges are limited to README statements and shown source/index references; unsampled wiring is not asserted.

Main entry points: [`Apps/MyssApi/Services/Intake/ReviewService.cs`](https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Services/Intake/ReviewService.cs) (Review decisions), [`Apps/MyssWebclient/src/App.tsx`](https://github.com/bcgov/myss/blob/dev/Apps/MyssWebclient/src/App.tsx) (Web application), [`Apps/MyssApi/Program.cs`](https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Program.cs) (HTTP API), [`Apps/MyssApi/Controllers/Intake/ReviewApplicationsController.cs`](https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Controllers/Intake/ReviewApplicationsController.cs) (Review endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web client"]
  node_client["Web application<br/>[App.tsx]"]
  node_formsui["Forms and intake UI"]
  node_reviewui["Worker review UI"]
end

subgraph group_api["MySS API"]
  node_api_entry["HTTP API<br/>[Program.cs]"]
  node_forms["Form management<br/>[FormsService.cs]"]
  node_attachments["Attachment handling"]
  node_buspass["Bus-pass submission"]
  node_eligibility["Eligibility rates"]
end

subgraph group_intake["Application workflow"]
  node_intake_api["Intake endpoints"]
  node_review_controller["Review endpoints"]
  node_review_service["Review decisions<br/>[ReviewService.cs]"]
  node_answers["Application answers"]
  node_intake_db[("Intake database<br/>[IntakeDbContext.cs]")]
  node_event_store[("Application event store<br/>[EventStore.cs]")]
end

subgraph group_content["Content service"]
  node_strapi_forms["Form specifications<br/>[form-spec.ts]"]
  node_strapi_rates["Eligibility rate content"]
end

subgraph group_icm["ICM integration"]
  node_icm_submit["ICM bus-pass endpoint"]
  node_icm_submitter["ICM workflow submitter"]
  node_icm_client["ICM client library<br/>[BusPassService.cs]"]
  node_oauth_service["OAuth token service"]
  node_oauth_repo["OAuth token repository"]
end

node_resident(("Resident or worker"))

node_resident -.->|"uses"| node_client
node_client -.->|"calls API"| node_api_entry
node_formsui -.->|"renders within"| node_client
node_reviewui -.->|"renders within"| node_client
node_api_entry -.->|"routes requests"| node_intake_api
node_api_entry -.->|"routes requests"| node_review_controller
node_review_controller -->|"calls"| node_review_service
node_review_service -->|"reads answers"| node_intake_db
node_review_service -->|"loads and appends events"| node_event_store
node_review_service -->|"retrieves form version"| node_strapi_forms
node_intake_db -->|"stores"| node_answers
node_strapi_forms -.->|"serves form specifications"| node_forms
node_strapi_rates -.->|"provides rates"| node_eligibility
node_buspass -.->|"submits over HTTP"| node_icm_submit
node_icm_submit -->|"delegates submission"| node_icm_submitter
node_icm_submitter -.->|"uses client"| node_icm_client
node_oauth_service -->|"requests token"| node_oauth_repo

click node_client "https://github.com/bcgov/myss/blob/dev/Apps/MyssWebclient/src/App.tsx"
click node_formsui "https://github.com/bcgov/myss/blob/dev/Apps/MyssWebclient/src/widgets/intake/ApplicationForm.tsx"
click node_reviewui "https://github.com/bcgov/myss/blob/dev/Apps/MyssWebclient/src/widgets/review/ReviewApplication.tsx"
click node_api_entry "https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Program.cs"
click node_forms "https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Services/FormsService.cs"
click node_attachments "https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Services/AttachmentsService.cs"
click node_buspass "https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Services/BusPassSubmissionService.cs"
click node_eligibility "https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Providers/StrapiEligibilityRateProvider.cs"
click node_intake_api "https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Controllers/Intake/IntakeApplicationsController.cs"
click node_review_controller "https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Controllers/Intake/ReviewApplicationsController.cs"
click node_review_service "https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Services/Intake/ReviewService.cs"
click node_answers "https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Data/Intake/ApplicationAnswers.cs"
click node_intake_db "https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Data/Intake/IntakeDbContext.cs"
click node_event_store "https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Services/Platform/EventStore.cs"
click node_strapi_forms "https://github.com/bcgov/myss/blob/dev/Apps/MyssContent/src/api/form-spec/services/form-spec.ts"
click node_strapi_rates "https://github.com/bcgov/myss/blob/dev/Apps/MyssContent/src/api/eligibility-rate/services/eligibility-rate.ts"
click node_icm_submit "https://github.com/bcgov/myss/blob/dev/Apps/IcmApi.Host/Controllers/BusPassController.cs"
click node_icm_submitter "https://github.com/bcgov/myss/blob/dev/Apps/IcmApi.Host/Services/IcmBusPassSubmitter.cs"
click node_icm_client "https://github.com/bcgov/myss/blob/dev/Apps/IcmApi/Services/BusPassService.cs"
click node_oauth_service "https://github.com/bcgov/myss/blob/dev/Apps/IcmApi/Services/OAuthTokenService.cs"
click node_oauth_repo "https://github.com/bcgov/myss/blob/dev/Apps/IcmApi/Repositories/OAuthTokenRepository.cs"

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_client,node_formsui,node_reviewui toneBlue
class node_api_entry,node_forms,node_attachments,node_buspass,node_eligibility toneAmber
class node_intake_api,node_review_controller,node_review_service,node_answers,node_intake_db,node_event_store toneMint
class node_strapi_forms,node_strapi_rates,node_resident toneRose
class node_icm_submit,node_icm_submitter,node_icm_client,node_oauth_service,node_oauth_repo toneIndigo
```

## Components

### Web client

- [Web application](https://github.com/bcgov/myss/blob/dev/Apps/MyssWebclient/src/App.tsx): `Apps/MyssWebclient/src/App.tsx`
- [Forms and intake UI](https://github.com/bcgov/myss/blob/dev/Apps/MyssWebclient/src/widgets/intake/ApplicationForm.tsx): `Apps/MyssWebclient/src/widgets/intake/ApplicationForm.tsx`
- [Worker review UI](https://github.com/bcgov/myss/blob/dev/Apps/MyssWebclient/src/widgets/review/ReviewApplication.tsx): `Apps/MyssWebclient/src/widgets/review/ReviewApplication.tsx`

### MySS API

- [HTTP API](https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Program.cs): `Apps/MyssApi/Program.cs`
- [Form management](https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Services/FormsService.cs): `Apps/MyssApi/Services/FormsService.cs`
- [Attachment handling](https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Services/AttachmentsService.cs): `Apps/MyssApi/Services/AttachmentsService.cs`
- [Bus-pass submission](https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Services/BusPassSubmissionService.cs): `Apps/MyssApi/Services/BusPassSubmissionService.cs`
- [Eligibility rates](https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Providers/StrapiEligibilityRateProvider.cs): `Apps/MyssApi/Providers/StrapiEligibilityRateProvider.cs`

### Application workflow

- [Intake endpoints](https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Controllers/Intake/IntakeApplicationsController.cs): `Apps/MyssApi/Controllers/Intake/IntakeApplicationsController.cs`
- [Review endpoints](https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Controllers/Intake/ReviewApplicationsController.cs): `Apps/MyssApi/Controllers/Intake/ReviewApplicationsController.cs`
- [Review decisions](https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Services/Intake/ReviewService.cs): `Apps/MyssApi/Services/Intake/ReviewService.cs`
- [Application answers](https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Data/Intake/ApplicationAnswers.cs): `Apps/MyssApi/Data/Intake/ApplicationAnswers.cs`
- [Intake database](https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Data/Intake/IntakeDbContext.cs): `Apps/MyssApi/Data/Intake/IntakeDbContext.cs`
- [Application event store](https://github.com/bcgov/myss/blob/dev/Apps/MyssApi/Services/Platform/EventStore.cs): `Apps/MyssApi/Services/Platform/EventStore.cs`

### Content service

- [Form specifications](https://github.com/bcgov/myss/blob/dev/Apps/MyssContent/src/api/form-spec/services/form-spec.ts): `Apps/MyssContent/src/api/form-spec/services/form-spec.ts`
- [Eligibility rate content](https://github.com/bcgov/myss/blob/dev/Apps/MyssContent/src/api/eligibility-rate/services/eligibility-rate.ts): `Apps/MyssContent/src/api/eligibility-rate/services/eligibility-rate.ts`

### ICM integration

- [ICM bus-pass endpoint](https://github.com/bcgov/myss/blob/dev/Apps/IcmApi.Host/Controllers/BusPassController.cs): `Apps/IcmApi.Host/Controllers/BusPassController.cs`
- [ICM workflow submitter](https://github.com/bcgov/myss/blob/dev/Apps/IcmApi.Host/Services/IcmBusPassSubmitter.cs): `Apps/IcmApi.Host/Services/IcmBusPassSubmitter.cs`
- [ICM client library](https://github.com/bcgov/myss/blob/dev/Apps/IcmApi/Services/BusPassService.cs): `Apps/IcmApi/Services/BusPassService.cs`
- [OAuth token service](https://github.com/bcgov/myss/blob/dev/Apps/IcmApi/Services/OAuthTokenService.cs): `Apps/IcmApi/Services/OAuthTokenService.cs`
- [OAuth token repository](https://github.com/bcgov/myss/blob/dev/Apps/IcmApi/Repositories/OAuthTokenRepository.cs): `Apps/IcmApi/Repositories/OAuthTokenRepository.cs`

### Other components

- **Resident or worker**

## Connections

- Resident or worker → Web application: uses
- Web application → HTTP API: calls API
- Forms and intake UI → Web application: renders within
- Worker review UI → Web application: renders within
- HTTP API → Intake endpoints: routes requests
- HTTP API → Review endpoints: routes requests
- Review endpoints → Review decisions: calls (evidence: `Apps/MyssApi/Controllers/Intake/ReviewApplicationsController.cs`)
- Review decisions → Intake database: reads answers (evidence: `Apps/MyssApi/Services/Intake/ReviewService.cs`)
- Review decisions → Application event store: loads and appends events (evidence: `Apps/MyssApi/Services/Intake/ReviewService.cs`)
- Review decisions → Form specifications: retrieves form version (evidence: `Apps/MyssApi/Services/Intake/ReviewService.cs`)
- Intake database → Application answers: stores (evidence: `Apps/MyssApi/Data/Intake/IntakeDbContext.cs`)
- Form specifications → Form management: serves form specifications
- Eligibility rate content → Eligibility rates: provides rates
- Bus-pass submission → ICM bus-pass endpoint: submits over HTTP
- ICM bus-pass endpoint → ICM workflow submitter: delegates submission (evidence: `Apps/IcmApi.Host/Controllers/BusPassController.cs`)
- ICM workflow submitter → ICM client library: uses client
- OAuth token service → OAuth token repository: requests token (evidence: `Apps/IcmApi/Services/OAuthTokenService.cs`)
