How bcgov/myss-api works
MySelfServe API serves the BC income-assistance self-service portal. Clients and workers enter through FastAPI routes; authentication and role checks protect operations, domain services coordinate workflows, and Siebel/ICM supplies case-management functions. Service-request submission includes PIN validation, optional PDF generation, and draft handling; monthly reports use PIN checks and a Redis-backed period cache. The README also documents registration, eligibility, employment plans, payments, attachments, notifications, and administration. Several of those branches are represented from the tree and SOURCE INDEX; their internal calls were not sampled.
Main entry points: routers Other feature routes · main.py FastAPI application · service_requests/service.py Service request workflow · monthly_reports/service.py Monthly reports
Components 26
API and access
- FastAPI application
app/main.py - JWT access control
app/auth/dependencies.py - Service request routes
app/routers/service_requests.py - Registration routes
app/routers/registration.py - Admin routes
app/routers/admin/ao.py - Attachment routes
app/routers/attachments.py - Other feature routes
app/routers
Business domains
- Registration workflow
app/domains/registration/service.py - Service request workflow
app/domains/service_requests/service.py - Draft persistence
app/domains/service_requests/draft_repository.py - Monthly reports
app/domains/monthly_reports/service.py - Eligibility calculation
app/domains/eligibility/calculator.py - Payments
app/domains/payment/service.py - Attachment handling
app/domains/attachments/service.py - Employment plans
app/domains/employment_plans/service.py - Notifications
app/domains/notifications/service.py - PIN validation
app/domains/account/pin_service.py - PDF generation
app/domains/service_requests/pdf_generation_service.py
ICM integration
- ICM client provider
app/services/icm/deps.py - ICM HTTP client
app/services/icm/client.py - ICM feature clients
app/services/icm
State and messaging
- Redis cache
app/cache/redis_client.py - PostgreSQL database
app/db/session.py - Email background tasks
app/workers/tasks/send_bulk_email.py
Other components
- Portal client
- Siebel / ICM
Connections 26
- Portal client → FastAPI application: calls API
README.md - FastAPI application → Service request routes: registers routes
app/main.py - FastAPI application → Registration routes: registers routes
app/main.py - FastAPI application → Other feature routes: registers routes
app/main.py - FastAPI application → Admin routes: registers routes
app/main.py - Service request routes → JWT access control: requires role
app/routers/service_requests.py - Service request routes → Service request workflow: delegates to
app/routers/service_requests.py - Service request workflow → Draft persistence: uses drafts
app/domains/service_requests/service.py - Service request workflow → PIN validation: validates PIN
app/domains/service_requests/service.py - Service request workflow → PDF generation: generates PDF
app/domains/service_requests/service.py - Service request workflow → ICM feature clients: finalizes request
app/domains/service_requests/service.py - Registration routes → Registration workflow: delegates to
app/routers/registration.py - Monthly reports → PIN validation: validates PIN
app/domains/monthly_reports/service.py - Monthly reports → Redis cache: reads and writes
app/domains/monthly_reports/service.py - Monthly reports → ICM feature clients: requests report data
app/domains/monthly_reports/service.py - ICM client provider → ICM HTTP client: creates clients
app/services/icm/deps.py - ICM feature clients → ICM HTTP client: uses HTTP client
app/services/icm/service_requests.py - ICM HTTP client → Siebel / ICM: sends REST calls
README.md - Attachment routes → Attachment handling: delegates to
app/routers/attachments.py - Admin routes → ICM client provider: gets ICM client
app/routers/admin/ao.py - Other feature routes → Monthly reports: feature routing
- Other feature routes → Eligibility calculation: feature routing
- Other feature routes → Payments: feature routing
- Other feature routes → Employment plans: feature routing
- Other feature routes → Notifications: feature routing
- Notifications → Email background tasks: queues email