# adithya-charan/claimpath-ai architecture

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

- Interactive diagram: https://gitdiagram.com/adithya-charan/claimpath-ai
- Repository: https://github.com/adithya-charan/claimpath-ai

## Overview

ClaimPath AI is a prototype benefits-discovery and application-preparation assistant. A citizen describes their circumstances, reviews proposed profile facts, receives deterministic scheme evaluations, then gets scheme guidance, a document checklist, and self-reported application tracking. The graph includes the AI proposal layer, rules engine, scheme catalogue, privacy controls, and reviewer administration. Edges follow the documented journey and the sampled API wiring; several UI-to-API and unsampled route details are not shown, so those connections are omitted rather than inferred.

Main entry points: [`api/app/main.py`](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/main.py) (API application), [`web/components/app/results-view.tsx`](https://github.com/adithya-charan/claimpath-ai/blob/main/web/components/app/results-view.tsx) (Eligibility results), [`api/app/routers/session.py`](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/routers/session.py) (Profile and facts), [`api/app/services/catalogue.py`](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/services/catalogue.py) (Scheme catalogue)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_journey["Citizen experience"]
  node_assistant_ui["Situation assistant<br/>[assistant-view.tsx]"]
  node_results_ui["Eligibility results<br/>[results-view.tsx]"]
  node_scheme_ui["Scheme details<br/>[scheme-view.tsx]"]
  node_checklist_ui["Document checklist<br/>[checklist-view.tsx]"]
  node_tracker_ui["Application tracker<br/>[tracker-view.tsx]"]
end

subgraph group_profile_ai["Profile and AI"]
  node_profile_api["Profile and facts<br/>[session.py]"]
  node_fact_registry["Fact registry<br/>[facts.py]"]
  node_ai_service["AI proposal service<br/>[service.py]"]
  node_ai_provider["AI providers"]
end

subgraph group_benefits["Benefits evaluation"]
  node_catalogue["Scheme catalogue<br/>[catalogue.py]"]
  node_seed_catalogue["Seed catalogue<br/>[catalogue.py]"]
  node_eligibility["Rules engine<br/>[engine.py]"]
  node_condition_rules["Condition evaluator<br/>[conditions.py]"]
  node_scheme_store[("Scheme records<br/>[scheme.py]")]
end

subgraph group_application["Application support"]
  node_application_api["Application tracking<br/>[applications.py]"]
  node_reminders["In-app reminders<br/>[reminders.py]"]
  node_portal_help["Guided portal help<br/>[portal.py]"]
  node_demo_portal["Demo portal<br/>[page.tsx]"]
end

subgraph group_platform["API and governance"]
  node_admin_api["Reviewer administration<br/>[admin.py]"]
  node_api_entry["API application<br/>[main.py]"]
  node_session_security["Session security<br/>[security.py]"]
  node_database[("Application database<br/>[session.py]")]
end

node_citizen(("Citizen"))
node_official_portal(("Official portal"))

node_citizen -->|"describes situation"| node_assistant_ui
node_assistant_ui -.->|"proposes facts"| node_ai_service
node_ai_service -->|"dispatches inference"| node_ai_provider
node_ai_service -->|"validates facts"| node_fact_registry
node_citizen -->|"confirms facts"| node_profile_api
node_profile_api -->|"validates profile"| node_fact_registry
node_profile_api -.->|"persists profile"| node_database
node_citizen -->|"requests eligibility"| node_results_ui
node_results_ui -.->|"requests evaluation"| node_eligibility
node_catalogue -->|"builds engine input"| node_eligibility
node_eligibility -->|"evaluates clauses"| node_condition_rules
node_catalogue -.->|"reads schemes"| node_scheme_store
node_seed_catalogue -.->|"seeds records"| node_scheme_store
node_eligibility -->|"returns results"| node_results_ui
node_results_ui -->|"opens scheme"| node_scheme_ui
node_scheme_ui -->|"gets application help"| node_portal_help
node_portal_help -->|"opens official site"| node_official_portal
node_scheme_ui -->|"starts checklist"| node_checklist_ui
node_checklist_ui -.->|"updates checklist"| node_application_api
node_checklist_ui -->|"tracks application"| node_tracker_ui
node_tracker_ui -.->|"reports status"| node_application_api
node_application_api -->|"loads scheme"| node_catalogue
node_application_api -.->|"stores events"| node_database
node_api_entry -->|"registers route"| node_admin_api
node_api_entry -->|"registers route"| node_profile_api
node_api_entry -->|"initializes sessions"| node_database
node_admin_api -->|"manages catalogue"| node_catalogue
node_session_security -->|"uses session store"| node_database
node_api_entry -->|"starts reminder loop"| node_reminders
node_portal_help -->|"offers demo flow"| node_demo_portal

click node_assistant_ui "https://github.com/adithya-charan/claimpath-ai/blob/main/web/components/app/assistant-view.tsx"
click node_results_ui "https://github.com/adithya-charan/claimpath-ai/blob/main/web/components/app/results-view.tsx"
click node_scheme_ui "https://github.com/adithya-charan/claimpath-ai/blob/main/web/components/app/scheme-view.tsx"
click node_checklist_ui "https://github.com/adithya-charan/claimpath-ai/blob/main/web/components/app/checklist-view.tsx"
click node_tracker_ui "https://github.com/adithya-charan/claimpath-ai/blob/main/web/components/app/tracker-view.tsx"
click node_profile_api "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/routers/session.py"
click node_fact_registry "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/facts.py"
click node_ai_service "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/ai/service.py"
click node_ai_provider "https://github.com/adithya-charan/claimpath-ai/tree/main/api/app/ai"
click node_catalogue "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/services/catalogue.py"
click node_seed_catalogue "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/seed/catalogue.py"
click node_eligibility "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/eligibility/engine.py"
click node_condition_rules "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/eligibility/conditions.py"
click node_scheme_store "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/models/scheme.py"
click node_application_api "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/services/applications.py"
click node_reminders "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/services/reminders.py"
click node_portal_help "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/routers/portal.py"
click node_demo_portal "https://github.com/adithya-charan/claimpath-ai/blob/main/web/app/demo-portal/page.tsx"
click node_admin_api "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/routers/admin.py"
click node_api_entry "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/main.py"
click node_session_security "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/core/security.py"
click node_database "https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/db/session.py"

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_assistant_ui,node_results_ui,node_scheme_ui,node_checklist_ui,node_tracker_ui toneBlue
class node_profile_api,node_fact_registry,node_ai_service,node_ai_provider toneAmber
class node_catalogue,node_seed_catalogue,node_eligibility,node_condition_rules,node_scheme_store toneMint
class node_application_api,node_reminders,node_portal_help,node_demo_portal toneRose
class node_admin_api,node_api_entry,node_session_security,node_database,node_citizen,node_official_portal toneIndigo
```

## Components

### Citizen experience

- [Situation assistant](https://github.com/adithya-charan/claimpath-ai/blob/main/web/components/app/assistant-view.tsx): `web/components/app/assistant-view.tsx`
- [Eligibility results](https://github.com/adithya-charan/claimpath-ai/blob/main/web/components/app/results-view.tsx): `web/components/app/results-view.tsx`
- [Scheme details](https://github.com/adithya-charan/claimpath-ai/blob/main/web/components/app/scheme-view.tsx): `web/components/app/scheme-view.tsx`
- [Document checklist](https://github.com/adithya-charan/claimpath-ai/blob/main/web/components/app/checklist-view.tsx): `web/components/app/checklist-view.tsx`
- [Application tracker](https://github.com/adithya-charan/claimpath-ai/blob/main/web/components/app/tracker-view.tsx): `web/components/app/tracker-view.tsx`

### Profile and AI

- [Profile and facts](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/routers/session.py): `api/app/routers/session.py`
- [Fact registry](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/facts.py): `api/app/facts.py`
- [AI proposal service](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/ai/service.py): `api/app/ai/service.py`
- [AI providers](https://github.com/adithya-charan/claimpath-ai/tree/main/api/app/ai): `api/app/ai`

### Benefits evaluation

- [Scheme catalogue](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/services/catalogue.py): `api/app/services/catalogue.py`
- [Seed catalogue](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/seed/catalogue.py): `api/app/seed/catalogue.py`
- [Rules engine](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/eligibility/engine.py): `api/app/eligibility/engine.py`
- [Condition evaluator](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/eligibility/conditions.py): `api/app/eligibility/conditions.py`
- [Scheme records](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/models/scheme.py): `api/app/models/scheme.py`

### Application support

- [Application tracking](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/services/applications.py): `api/app/services/applications.py`
- [In-app reminders](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/services/reminders.py): `api/app/services/reminders.py`
- [Guided portal help](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/routers/portal.py): `api/app/routers/portal.py`
- [Demo portal](https://github.com/adithya-charan/claimpath-ai/blob/main/web/app/demo-portal/page.tsx): `web/app/demo-portal/page.tsx`

### API and governance

- [Reviewer administration](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/routers/admin.py): `api/app/routers/admin.py`
- [API application](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/main.py): `api/app/main.py`
- [Session security](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/core/security.py): `api/app/core/security.py`
- [Application database](https://github.com/adithya-charan/claimpath-ai/blob/main/api/app/db/session.py): `api/app/db/session.py`

### Other components

- **Citizen**
- **Official portal**

## Connections

- Citizen → Situation assistant: describes situation (evidence: `README.md`)
- Situation assistant → AI proposal service: proposes facts
- AI proposal service → AI providers: dispatches inference (evidence: `api/app/ai/service.py`)
- AI proposal service → Fact registry: validates facts
- Citizen → Profile and facts: confirms facts (evidence: `README.md`)
- Profile and facts → Fact registry: validates profile (evidence: `api/app/routers/session.py`)
- Profile and facts → Application database: persists profile (evidence: `api/app/routers/session.py`)
- Citizen → Eligibility results: requests eligibility (evidence: `README.md`)
- Eligibility results → Rules engine: requests evaluation
- Scheme catalogue → Rules engine: builds engine input (evidence: `api/app/services/catalogue.py`)
- Rules engine → Condition evaluator: evaluates clauses (evidence: `api/app/eligibility/engine.py`)
- Scheme catalogue → Scheme records: reads schemes (evidence: `api/app/services/catalogue.py`)
- Seed catalogue → Scheme records: seeds records
- Rules engine → Eligibility results: returns results (evidence: `README.md`)
- Eligibility results → Scheme details: opens scheme (evidence: `README.md`)
- Scheme details → Guided portal help: gets application help (evidence: `README.md`)
- Guided portal help → Official portal: opens official site (evidence: `README.md`)
- Scheme details → Document checklist: starts checklist (evidence: `README.md`)
- Document checklist → Application tracking: updates checklist
- Document checklist → Application tracker: tracks application (evidence: `README.md`)
- Application tracker → Application tracking: reports status
- Application tracking → Scheme catalogue: loads scheme (evidence: `api/app/services/applications.py`)
- Application tracking → Application database: stores events
- API application → Reviewer administration: registers route (evidence: `api/app/main.py`)
- API application → Profile and facts: registers route (evidence: `api/app/main.py`)
- API application → Application database: initializes sessions (evidence: `api/app/main.py`)
- Reviewer administration → Scheme catalogue: manages catalogue (evidence: `api/app/routers/admin.py`)
- Session security → Application database: uses session store (evidence: `api/app/core/security.py`)
- API application → In-app reminders: starts reminder loop (evidence: `api/app/main.py`)
- Guided portal help → Demo portal: offers demo flow (evidence: `README.md`)
