# enamulkarim/simple architecture

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

- Interactive diagram: https://gitdiagram.com/enamulkarim/simple
- Repository: https://github.com/enamulkarim/simple

## Overview

Spondon appears to be a Bangladesh SRHR programme monitoring and reporting platform: staff use role-gated dashboards to review programme activity, indicators, approvals and reports, while field data is also ingested from KoboToolbox. The tree and excerpts identify programme-specific data models, CIPRB fistula and MPDSR workflows, and indicator computation. The README is empty, and most API, reporting and dashboard implementations were not sampled; those subsystems are represented conservatively, with uncertain connections omitted rather than inferred.

Main entry points: [`frontend/src/App.tsx`](https://github.com/enamulkarim/simple/blob/master/frontend/src/App.tsx) (Route and access), [`indicators/service.py`](https://github.com/enamulkarim/simple/blob/master/indicators/service.py) (Indicator computation), [`programs/models/client.py`](https://github.com/enamulkarim/simple/blob/master/programs/models/client.py) (Programme records), [`programs/ciprb_handlers.py`](https://github.com/enamulkarim/simple/blob/master/programs/ciprb_handlers.py) (CIPRB handlers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["Route and access<br/>[App.tsx]"]
  node_approvals_ui["Manager approvals"]
  node_ciprb_ui["CIPRB dashboard<br/>[CIPRBDashboard.tsx]"]
  node_tracker_ui["Progress tracker"]
end

subgraph group_ingest["Field data intake"]
  node_webhook["Kobo webhook dispatch<br/>[webhook.py]"]
  node_programme_handlers["Programme handlers<br/>[bandhu_handlers.py]"]
  node_ciprb_handlers["CIPRB handlers<br/>[ciprb_handlers.py]"]
  node_fistula_handlers["Fistula handlers"]
end

subgraph group_domain["Programme records"]
  node_programme_records[("Programme records<br/>[client.py]")]
  node_fistula_cases[("Fistula case stages<br/>[ciprb_models.py]")]
  node_mpdsr_records[("MPDSR records<br/>[models.py]")]
  node_reconciliation["CIPRB reconciliation<br/>[reconcile.py]"]
end

subgraph group_insight["Monitoring and reporting"]
  node_indicator_service["Indicator computation<br/>[service.py]"]
  node_bandhu_indicators["Bandhu indicators<br/>[bandhu.py]"]
  node_phd_indicators["PHD indicators<br/>[phd.py]"]
  node_ciprb_indicators["CIPRB indicators<br/>[ciprb.py]"]
  node_reporting["Reports and narrative"]
end

node_staff(("Programme staff"))

node_staff -->|"opens"| node_app
node_app -->|"routes to"| node_approvals_ui
node_app -->|"routes to"| node_ciprb_ui
node_app -->|"routes to"| node_tracker_ui
node_webhook -.->|"dispatches to"| node_programme_handlers
node_webhook -.->|"dispatches to"| node_ciprb_handlers
node_programme_handlers -->|"writes"| node_programme_records
node_ciprb_handlers -->|"updates stages"| node_fistula_cases
node_ciprb_handlers -->|"handles cases"| node_mpdsr_records
node_fistula_handlers -->|"creates cases"| node_fistula_cases
node_reconciliation -.->|"reconciles"| node_mpdsr_records
node_indicator_service -->|"computes with"| node_bandhu_indicators
node_indicator_service -->|"computes with"| node_phd_indicators
node_indicator_service -->|"computes with"| node_ciprb_indicators
node_bandhu_indicators -->|"reads"| node_programme_records
node_phd_indicators -->|"reads"| node_programme_records
node_ciprb_indicators -->|"reads"| node_fistula_cases
node_tracker_ui -.->|"uses"| node_indicator_service
node_reporting -.->|"reports on"| node_programme_records

click node_app "https://github.com/enamulkarim/simple/blob/master/frontend/src/App.tsx"
click node_approvals_ui "https://github.com/enamulkarim/simple/blob/master/frontend/src/pages/ManagerApprovals.tsx"
click node_ciprb_ui "https://github.com/enamulkarim/simple/blob/master/frontend/src/pages/CIPRBDashboard.tsx"
click node_tracker_ui "https://github.com/enamulkarim/simple/blob/master/frontend/src/pages/ProgressTracker.tsx"
click node_webhook "https://github.com/enamulkarim/simple/blob/master/programs/webhook.py"
click node_programme_handlers "https://github.com/enamulkarim/simple/blob/master/programs/bandhu_handlers.py"
click node_ciprb_handlers "https://github.com/enamulkarim/simple/blob/master/programs/ciprb_handlers.py"
click node_fistula_handlers "https://github.com/enamulkarim/simple/blob/master/fistula/webhook_handlers.py"
click node_programme_records "https://github.com/enamulkarim/simple/blob/master/programs/models/client.py"
click node_fistula_cases "https://github.com/enamulkarim/simple/blob/master/fistula/ciprb_models.py"
click node_mpdsr_records "https://github.com/enamulkarim/simple/blob/master/mpdsr/models.py"
click node_reconciliation "https://github.com/enamulkarim/simple/blob/master/mpdsr/reconcile.py"
click node_indicator_service "https://github.com/enamulkarim/simple/blob/master/indicators/service.py"
click node_bandhu_indicators "https://github.com/enamulkarim/simple/blob/master/indicators/bandhu.py"
click node_phd_indicators "https://github.com/enamulkarim/simple/blob/master/indicators/phd.py"
click node_ciprb_indicators "https://github.com/enamulkarim/simple/blob/master/indicators/ciprb.py"
click node_reporting "https://github.com/enamulkarim/simple/tree/master/reports"

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_app,node_approvals_ui,node_ciprb_ui,node_tracker_ui toneBlue
class node_webhook,node_programme_handlers,node_ciprb_handlers,node_fistula_handlers toneAmber
class node_programme_records,node_fistula_cases,node_mpdsr_records,node_reconciliation toneMint
class node_indicator_service,node_bandhu_indicators,node_phd_indicators,node_ciprb_indicators,node_reporting toneRose
class node_staff toneIndigo
```

## Components

### Web experience

- [Route and access](https://github.com/enamulkarim/simple/blob/master/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Manager approvals](https://github.com/enamulkarim/simple/blob/master/frontend/src/pages/ManagerApprovals.tsx): `frontend/src/pages/ManagerApprovals.tsx`
- [CIPRB dashboard](https://github.com/enamulkarim/simple/blob/master/frontend/src/pages/CIPRBDashboard.tsx): `frontend/src/pages/CIPRBDashboard.tsx`
- [Progress tracker](https://github.com/enamulkarim/simple/blob/master/frontend/src/pages/ProgressTracker.tsx): `frontend/src/pages/ProgressTracker.tsx`

### Field data intake

- [Kobo webhook dispatch](https://github.com/enamulkarim/simple/blob/master/programs/webhook.py): `programs/webhook.py`
- [Programme handlers](https://github.com/enamulkarim/simple/blob/master/programs/bandhu_handlers.py): `programs/bandhu_handlers.py`
- [CIPRB handlers](https://github.com/enamulkarim/simple/blob/master/programs/ciprb_handlers.py): `programs/ciprb_handlers.py`
- [Fistula handlers](https://github.com/enamulkarim/simple/blob/master/fistula/webhook_handlers.py): `fistula/webhook_handlers.py`

### Programme records

- [Programme records](https://github.com/enamulkarim/simple/blob/master/programs/models/client.py): `programs/models/client.py`
- [Fistula case stages](https://github.com/enamulkarim/simple/blob/master/fistula/ciprb_models.py): `fistula/ciprb_models.py`
- [MPDSR records](https://github.com/enamulkarim/simple/blob/master/mpdsr/models.py): `mpdsr/models.py`
- [CIPRB reconciliation](https://github.com/enamulkarim/simple/blob/master/mpdsr/reconcile.py): `mpdsr/reconcile.py`

### Monitoring and reporting

- [Indicator computation](https://github.com/enamulkarim/simple/blob/master/indicators/service.py): `indicators/service.py`
- [Bandhu indicators](https://github.com/enamulkarim/simple/blob/master/indicators/bandhu.py): `indicators/bandhu.py`
- [PHD indicators](https://github.com/enamulkarim/simple/blob/master/indicators/phd.py): `indicators/phd.py`
- [CIPRB indicators](https://github.com/enamulkarim/simple/blob/master/indicators/ciprb.py): `indicators/ciprb.py`
- [Reports and narrative](https://github.com/enamulkarim/simple/tree/master/reports): `reports`

### Other components

- **Programme staff**

## Connections

- Programme staff → Route and access: opens (evidence: `frontend/src/App.tsx`)
- Route and access → Manager approvals: routes to (evidence: `frontend/src/App.tsx`)
- Route and access → CIPRB dashboard: routes to (evidence: `frontend/src/App.tsx`)
- Route and access → Progress tracker: routes to (evidence: `frontend/src/App.tsx`)
- Kobo webhook dispatch → Programme handlers: dispatches to (evidence: `programs/bandhu_handlers.py`)
- Kobo webhook dispatch → CIPRB handlers: dispatches to
- Programme handlers → Programme records: writes (evidence: `programs/bandhu_handlers.py`)
- CIPRB handlers → Fistula case stages: updates stages (evidence: `programs/ciprb_handlers.py`)
- CIPRB handlers → MPDSR records: handles cases (evidence: `programs/ciprb_handlers.py`)
- Fistula handlers → Fistula case stages: creates cases (evidence: `fistula/webhook_handlers.py`)
- CIPRB reconciliation → MPDSR records: reconciles
- Indicator computation → Bandhu indicators: computes with (evidence: `indicators/service.py`)
- Indicator computation → PHD indicators: computes with (evidence: `indicators/service.py`)
- Indicator computation → CIPRB indicators: computes with (evidence: `indicators/service.py`)
- Bandhu indicators → Programme records: reads (evidence: `indicators/bandhu.py`)
- PHD indicators → Programme records: reads (evidence: `indicators/phd.py`)
- CIPRB indicators → Fistula case stages: reads (evidence: `indicators/ciprb.py`)
- Progress tracker → Indicator computation: uses
- Reports and narrative → Programme records: reports on
