# ehealthafrica/sda_toolbox architecture

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

- Interactive diagram: https://gitdiagram.com/ehealthafrica/sda_toolbox
- Repository: https://github.com/ehealthafrica/sda_toolbox

## Overview

SDA Toolbox is a data-analysis application for campaign operations and settlement data: users upload files, run validation, analysis, compilation, or reporting, then review and download results. The React app exposes these workflows through a dashboard and feature pages, with a shared API client connecting to the Python toolbox. The README documents additional capabilities not represented by sampled backend excerpts; their presence is included, but uncertain internal call wiring is omitted.

Main entry points: [`src/frontend/src/api/client.ts`](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/api/client.ts) (API client), [`src/frontend/src/App.tsx`](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/App.tsx) (Application shell), [`src/frontend/src/components/dashboard/DashboardPage.tsx`](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/dashboard/DashboardPage.tsx) (Dashboard), [`src/frontend/src/components/h2h/H2HTrackingPage.tsx`](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/h2h/H2HTrackingPage.tsx) (Campaign tracking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_app["Application shell<br/>[App.tsx]"]
  node_dashboard["Dashboard<br/>[DashboardPage.tsx]"]
  node_api["API client<br/>[client.ts]"]
end

subgraph group_campaign["Campaign analysis"]
  node_tracking["Campaign tracking"]
  node_reach["REACH analysis"]
  node_contact["Contact analysis"]
  node_targetarea["Target area<br/>[TargetAreaPage.tsx]"]
  node_backendtracking["Tracking analysis"]
  node_backendtarget["Target-area generation"]
  node_submissionreview["Submission review"]
end

subgraph group_quality["MLoS quality"]
  node_mlosqc["MLoS QC<br/>[MlosQcPage.tsx]"]
  node_mlosops["MLoS operations<br/>[MlosOpsPage.tsx]"]
  node_uuid["UUID checker"]
  node_backendmlos["MLoS validation and fixes"]
end

subgraph group_planning["Planning and compiler"]
  node_microcombine["Microplan combine"]
  node_dipvalidate["DIP validation"]
  node_dipmerge["DIP map merger<br/>[DipMergerPage.tsx]"]
  node_dipgenerate["DIP generator"]
  node_compiler["Compiler tools<br/>[TracksPage.tsx]"]
  node_backendplanfeld["Microplan processing"]
  node_backendcompiler["Dataset aggregation"]
end

subgraph group_platform["Reporting and shared services"]
  node_dailyreport["Daily report"]
  node_postreport["Post-implementation report"]
  node_backendreports["Campaign reporting"]
  node_jobrouter["Job endpoints<br/>[router.py]"]
  node_jobstore[("Job store<br/>[store.py]")]
end

node_analyst(("Data analyst"))

node_analyst -->|"uses"| node_app
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_tracking
node_app -->|"renders"| node_reach
node_app -->|"renders"| node_contact
node_app -->|"renders"| node_targetarea
node_app -->|"renders"| node_mlosqc
node_app -->|"renders"| node_mlosops
node_app -->|"renders"| node_uuid
node_app -->|"renders"| node_microcombine
node_app -->|"renders"| node_dipvalidate
node_app -->|"renders"| node_dipmerge
node_app -->|"renders"| node_dipgenerate
node_app -->|"renders"| node_compiler
node_app -->|"renders"| node_dailyreport
node_app -->|"renders"| node_postreport
node_dashboard -->|"requests job data"| node_api
node_tracking -->|"submits tracking"| node_api
node_reach -->|"submits analysis"| node_api
node_contact -->|"submits analysis"| node_api
node_targetarea -->|"submits generation"| node_api
node_mlosqc -->|"submits QC"| node_api
node_mlosops -->|"submits operations"| node_api
node_uuid -->|"checks identifiers"| node_api
node_microcombine -->|"submits combine"| node_api
node_dipvalidate -->|"submits validation"| node_api
node_dipmerge -->|"submits merge"| node_api
node_dipgenerate -->|"submits generation"| node_api
node_compiler -->|"submits compilation"| node_api
node_dailyreport -->|"requests report"| node_api
node_postreport -->|"requests report"| node_api
node_api -->|"calls tracking routes"| node_backendtracking
node_api -->|"calls target-area routes"| node_backendtarget
node_api -->|"calls QC routes"| node_backendmlos
node_api -->|"calls microplan routes"| node_backendplanfeld
node_api -->|"calls compiler routes"| node_backendcompiler
node_api -->|"calls report routes"| node_backendreports
node_api -->|"requests job summary"| node_jobrouter
node_jobrouter -->|"reads job data"| node_jobstore

click node_app "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/App.tsx"
click node_dashboard "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/dashboard/DashboardPage.tsx"
click node_api "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/api/client.ts"
click node_tracking "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/h2h/H2HTrackingPage.tsx"
click node_reach "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/reach/ReachAnalysisPage.tsx"
click node_contact "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/contactAnalysis/ContactAnalysisPage.tsx"
click node_targetarea "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/targetArea/TargetAreaPage.tsx"
click node_mlosqc "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/mlos/MlosQcPage.tsx"
click node_mlosops "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/mlosOps/MlosOpsPage.tsx"
click node_uuid "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/uuidChecker/UuidCheckerPage.tsx"
click node_microcombine "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/microplan/MicroplanCombinePage.tsx"
click node_dipvalidate "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/microplanValidate/ValidateDipPage.tsx"
click node_dipmerge "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/dipMapMerger/DipMergerPage.tsx"
click node_dipgenerate "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/dipGenerator/DipGeneratorPage.tsx"
click node_compiler "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/compilerTracks/TracksPage.tsx"
click node_dailyreport "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/dailyReport/DailyReportPage.tsx"
click node_postreport "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/postImplementation/PostImplementationPage.tsx"
click node_backendtracking "https://github.com/ehealthafrica/sda_toolbox/tree/master/src/toolbox/apps/tracking"
click node_backendtarget "https://github.com/ehealthafrica/sda_toolbox/tree/master/src/toolbox/target_area"
click node_backendmlos "https://github.com/ehealthafrica/sda_toolbox/tree/master/src/toolbox/apps/mlos"
click node_backendplanfeld "https://github.com/ehealthafrica/sda_toolbox/tree/master/src/toolbox/apps/planfeld"
click node_backendcompiler "https://github.com/ehealthafrica/sda_toolbox/tree/master/src/toolbox/apps/aggregators"
click node_backendreports "https://github.com/ehealthafrica/sda_toolbox/tree/master/src/toolbox/apps/tracking/reporter"
click node_jobrouter "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/toolbox/job_tracker/router.py"
click node_jobstore "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/toolbox/job_tracker/store.py"
click node_submissionreview "https://github.com/ehealthafrica/sda_toolbox/blob/master/src/toolbox/campaign/submission_reviewer.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_app,node_dashboard,node_api toneBlue
class node_tracking,node_reach,node_contact,node_targetarea,node_backendtracking,node_backendtarget,node_submissionreview toneAmber
class node_mlosqc,node_mlosops,node_uuid,node_backendmlos toneMint
class node_microcombine,node_dipvalidate,node_dipmerge,node_dipgenerate,node_compiler,node_backendplanfeld,node_backendcompiler toneRose
class node_dailyreport,node_postreport,node_backendreports,node_jobrouter,node_jobstore,node_analyst toneIndigo
```

## Components

### Frontend

- [Application shell](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/App.tsx): `src/frontend/src/App.tsx`
- [Dashboard](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/dashboard/DashboardPage.tsx): `src/frontend/src/components/dashboard/DashboardPage.tsx`
- [API client](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/api/client.ts): `src/frontend/src/api/client.ts`

### Campaign analysis

- [Campaign tracking](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/h2h/H2HTrackingPage.tsx): `src/frontend/src/components/h2h/H2HTrackingPage.tsx`
- [REACH analysis](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/reach/ReachAnalysisPage.tsx): `src/frontend/src/components/reach/ReachAnalysisPage.tsx`
- [Contact analysis](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/contactAnalysis/ContactAnalysisPage.tsx): `src/frontend/src/components/contactAnalysis/ContactAnalysisPage.tsx`
- [Target area](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/targetArea/TargetAreaPage.tsx): `src/frontend/src/components/targetArea/TargetAreaPage.tsx`
- [Tracking analysis](https://github.com/ehealthafrica/sda_toolbox/tree/master/src/toolbox/apps/tracking): `src/toolbox/apps/tracking`
- [Target-area generation](https://github.com/ehealthafrica/sda_toolbox/tree/master/src/toolbox/target_area): `src/toolbox/target_area`
- [Submission review](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/toolbox/campaign/submission_reviewer.py): `src/toolbox/campaign/submission_reviewer.py`

### MLoS quality

- [MLoS QC](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/mlos/MlosQcPage.tsx): `src/frontend/src/components/mlos/MlosQcPage.tsx`
- [MLoS operations](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/mlosOps/MlosOpsPage.tsx): `src/frontend/src/components/mlosOps/MlosOpsPage.tsx`
- [UUID checker](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/uuidChecker/UuidCheckerPage.tsx): `src/frontend/src/components/uuidChecker/UuidCheckerPage.tsx`
- [MLoS validation and fixes](https://github.com/ehealthafrica/sda_toolbox/tree/master/src/toolbox/apps/mlos): `src/toolbox/apps/mlos`

### Planning and compiler

- [Microplan combine](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/microplan/MicroplanCombinePage.tsx): `src/frontend/src/components/microplan/MicroplanCombinePage.tsx`
- [DIP validation](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/microplanValidate/ValidateDipPage.tsx): `src/frontend/src/components/microplanValidate/ValidateDipPage.tsx`
- [DIP map merger](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/dipMapMerger/DipMergerPage.tsx): `src/frontend/src/components/dipMapMerger/DipMergerPage.tsx`
- [DIP generator](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/dipGenerator/DipGeneratorPage.tsx): `src/frontend/src/components/dipGenerator/DipGeneratorPage.tsx`
- [Compiler tools](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/compilerTracks/TracksPage.tsx): `src/frontend/src/components/compilerTracks/TracksPage.tsx`
- [Microplan processing](https://github.com/ehealthafrica/sda_toolbox/tree/master/src/toolbox/apps/planfeld): `src/toolbox/apps/planfeld`
- [Dataset aggregation](https://github.com/ehealthafrica/sda_toolbox/tree/master/src/toolbox/apps/aggregators): `src/toolbox/apps/aggregators`

### Reporting and shared services

- [Daily report](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/dailyReport/DailyReportPage.tsx): `src/frontend/src/components/dailyReport/DailyReportPage.tsx`
- [Post-implementation report](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/frontend/src/components/postImplementation/PostImplementationPage.tsx): `src/frontend/src/components/postImplementation/PostImplementationPage.tsx`
- [Campaign reporting](https://github.com/ehealthafrica/sda_toolbox/tree/master/src/toolbox/apps/tracking/reporter): `src/toolbox/apps/tracking/reporter`
- [Job endpoints](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/toolbox/job_tracker/router.py): `src/toolbox/job_tracker/router.py`
- [Job store](https://github.com/ehealthafrica/sda_toolbox/blob/master/src/toolbox/job_tracker/store.py): `src/toolbox/job_tracker/store.py`

### Other components

- **Data analyst**

## Connections

- Data analyst → Application shell: uses
- Application shell → Dashboard: renders
- Application shell → Campaign tracking: renders
- Application shell → REACH analysis: renders
- Application shell → Contact analysis: renders
- Application shell → Target area: renders
- Application shell → MLoS QC: renders
- Application shell → MLoS operations: renders
- Application shell → UUID checker: renders
- Application shell → Microplan combine: renders
- Application shell → DIP validation: renders
- Application shell → DIP map merger: renders
- Application shell → DIP generator: renders
- Application shell → Compiler tools: renders
- Application shell → Daily report: renders
- Application shell → Post-implementation report: renders
- Dashboard → API client: requests job data
- Campaign tracking → API client: submits tracking
- REACH analysis → API client: submits analysis
- Contact analysis → API client: submits analysis
- Target area → API client: submits generation
- MLoS QC → API client: submits QC
- MLoS operations → API client: submits operations
- UUID checker → API client: checks identifiers
- Microplan combine → API client: submits combine
- DIP validation → API client: submits validation
- DIP map merger → API client: submits merge
- DIP generator → API client: submits generation
- Compiler tools → API client: submits compilation
- Daily report → API client: requests report
- Post-implementation report → API client: requests report
- API client → Tracking analysis: calls tracking routes
- API client → Target-area generation: calls target-area routes
- API client → MLoS validation and fixes: calls QC routes
- API client → Microplan processing: calls microplan routes
- API client → Dataset aggregation: calls compiler routes
- API client → Campaign reporting: calls report routes
- API client → Job endpoints: requests job summary
- Job endpoints → Job store: reads job data
