How qaizar-master/govflow-sih-demo works
GovFlow is a prototype interoperability and workflow platform: citizens submit service applications and consent, GovFlow asynchronously verifies information across simulated departmental systems, and officers review and return decisions. Its distinct stages include identity binding, registry pre-fill, document and data validation, workflow orchestration, decision write-back, and audit/SLA monitoring. The graph also shows the API, connector framework, persistence, and web interfaces. Relationships use the excerpts, SOURCE INDEX references, or README; unsampled implementation details are represented only where documented.
Main entry points: engine.ts Workflow engine · applications.ts Application service · app Citizen and staff UI · app.ts Express API
Components 25
User experience
- Citizen and staff UI
apps/web/app - Application views
apps/web/components/govflow/application.tsx
API and access
- Express API
apps/api/src/app.ts - Application routes
apps/api/src/routes/applications.ts - Authentication routes
apps/api/src/routes/auth.ts - Authentication and scoping
apps/api/src/middleware/auth.ts
Application workflow
- Application service
packages/core/src/applications.ts - Workflow engine
packages/core/src/workflow/engine.ts - Workflow worker
workers/workflow-worker/src/main.ts - Pre-fill and reconciliation
packages/core/src/prefill - Document processing
packages/core/src/documents - Data validation
packages/core/src/validation
Department integration
- Connector registry
packages/core/src/connector-registry.ts - Connector adapters
packages/connector-sdk/src - Mappings and service forms
packages/contracts/src/mapping.ts - Simulated departments
services/mock-departments/src/server.ts - Identity crosswalk and SSO
packages/core/src/identity
Platform services
- Job queue
packages/core/src/queue.ts - PostgreSQL
packages/core/src/db.ts - Audit log
packages/core/src/audit.ts - Notifications and exceptions
packages/core/src/notifications.ts - SLA and monitoring
packages/core/src/sla.ts
Other components
- Citizen
- Review officer
- Administrator
Connections 34
- Citizen → Citizen and staff UI: uses
- Review officer → Citizen and staff UI: uses
- Administrator → Citizen and staff UI: uses
- Citizen and staff UI → Express API: REST / JSON
- Citizen and staff UI → Application views: renders
apps/web/components/govflow/application.tsx - Express API → Application routes: mounts
apps/api/src/app.ts - Express API → Authentication routes: mounts
apps/api/src/app.ts - Application routes → Authentication and scoping: checks access
apps/api/src/routes/applications.ts - Application routes → Application service: creates and reads
apps/api/src/routes/applications.ts - Authentication routes → Identity crosswalk and SSO: lists identifier links
apps/api/src/routes/auth.ts - Application service → Workflow engine: starts and resumes
packages/core/src/applications.ts - Application service → Pre-fill and reconciliation: reconciles
packages/core/src/applications.ts - Application service → Audit log: records actions
packages/core/src/applications.ts - Application service → Notifications and exceptions: notifies applicant
packages/core/src/applications.ts - Application service → SLA and monitoring: assesses SLA
packages/core/src/applications.ts - Workflow worker → Workflow engine: runs workflow
workers/workflow-worker/src/main.ts - Workflow engine → Job queue: enqueues steps
packages/core/src/workflow/engine.ts - Job queue → Workflow worker: dispatches jobs
- Workflow engine → Connector registry: gets connectors
packages/core/src/workflow/engine.ts - Workflow engine → Identity crosswalk and SSO: resolves identifiers
packages/core/src/workflow/engine.ts - Workflow engine → Data validation: produces report
packages/core/src/workflow/engine.ts - Workflow engine → Document processing: processes documents
packages/core/src/workflow/engine.ts - Workflow engine → Notifications and exceptions: notifies roles
packages/core/src/workflow/engine.ts - Workflow engine → Connector registry: dispatches decisions
packages/core/src/workflow/engine.ts - Connector registry → Connector adapters: uses adapters
packages/core/src/connector-registry.ts - Connector adapters → Mappings and service forms: transforms fields
packages/connector-sdk/src/base-connector.ts - Connector adapters → Simulated departments: connects to systems
- Identity crosswalk and SSO → PostgreSQL: reads links
packages/core/src/identity/crosswalk.ts - Pre-fill and reconciliation → Connector registry: gets connectors
packages/core/src/prefill/index.ts - Pre-fill and reconciliation → Identity crosswalk and SSO: resolves identifiers
packages/core/src/prefill/index.ts - Application service → PostgreSQL: stores workflow state
packages/core/src/applications.ts - Audit log → PostgreSQL: appends entries
packages/core/src/audit.ts - Workflow worker → PostgreSQL: shares workflow state
- Express API → Simulated departments: health and failure control