How us-trustee-program/bankruptcy-oversight-support-systems works
Project Type and Purpose
• This is a full-stack case management system (CAMS) for the U.S. Trustee Program.
• It consists of:
– A React-based single-page application (user-interface).
– A suite of Azure Functions (backend) exposing HTTP and queue endpoints.
– Common shared TypeScript libraries (common, dev-tools).
– Infrastructure as code (Bicep) under ops/cloud-deployment.
– End-to-end, unit, DAST and accessibility test pipelines in GitHub Actions.
File Structure
• Top-level directories:
– user-interface: frontend React app, tests, Playwright e2e config, static web assets.
– backend: Azure Function Apps (api and dataflows), shared adapters, controllers, use-cases, gateways.
– common: domain and API utilities shared across frontend & backend.
– dev-tools: scripts for data generation, cosmos records, API key creation.
– ops/cloud-deployment: Bicep templates for Azure resources (Function Apps, Cosmos DB, SQL DB, Storage Queues, App Insights, Key Vault, VNETs).
– test: DAST and e2e test harnesses.
README
• Confirms full-stack case management system for USTP.
• Points to extensive architecture docs under docs/architecture.
Main Components
a. User Layer
– Browser (React SPA).
– CDN / Azure Static Web App.
b. Identity & Security
– Okta Authorization Server (OAuth2).
– Azure Key Vault (secrets for functions).
– Feature flags (App Configuration or custom feature-flag service).
c. API Layer
– Azure Function App “api”:
• HTTP-triggered functions (cases, courts, orders, me, healthcheck, etc.).
• Auth middleware (Okta gateway).
– Azure Function App “dataflows”:
• Timer or queue-triggered functions for batch migrations and event processing.
• Storage Queues as triggers and outputs.
d. Business Logic Layer
– Controllers invoke Use-Cases.
– Use-Cases coordinate gateways and domain logic.
– Adapters/Gateways for data access:
• Cosmos DB (Mongo API) repositories.
• ACMS and DXTR external systems via REST.
• SQL Database healthchecks.
• Azure Storage queues.
e. Persistence Layer
– Cosmos DB for cases, notes, users’ sessions, runtime state.
– Azure SQL DB for ancillary health checks.
– Storage Queues for inter-function communication.
f. Observability & Monitoring
– Azure Application Insights for telemetry (function logs, performance).
– GitHub Actions for CI/CD, DAST, SCA scans, e2e tests.
g. Infrastructure
– Bicep templates under ops/cloud-deployment define resource groups, VNETs, private endpoints, networking, Key Vault, Managed Identity, App Insights, Cosmos DB, SQL, Storage Accounts, Function Apps, Web Apps.
Relationships & Data Flow
1. User → Browser SPA → API via HTTPS
2. Browser authenticates via Okta → receives tokens.
3. Functions API verifies token via Okta gateway.
4. API function invokes controller → use-case → gateway → Cosmos DB or external system.
5. Dataflows functions triggered by queue or timer → update data in Cosmos or send messages to other queues.
6. App Insights collects logs/metrics.
7. GitHub Actions deploys Bicep templates and application code to Azure.
Architectural Patterns & Design Principles
• Clean Architecture (controllers → use-cases → gateways).
• Serverless microservices (Azure Functions).
• Domain-driven modules in common library.
• Infrastructure as Code (Bicep).
• CI/CD pipelines via GitHub Actions reusable workflows.
• Test pyramid: unit tests (lib, common), integration (functions), e2e (Playwright), security (DAST/SCA).
Final Checklist
• Components: Browser SPA, Okta, Static Web App, Function Apps (api, dataflows), Cosmos DB, SQL DB, Storage Queues, App Insights, Key Vault, ACMS/DXTR external systems.
• Data flows: HTTP, Queue, Timer.
• Auth flow: OAuth2 via Okta.
• Infra layers: VNET/private endpoints for DB access.