System Architecture & Technology Stack
The five layers of RADAR, the components inside them, how data moves between them, and the recommended open-source technology stack.
In short
- RADAR has five layers on top of existing systems: integration, bridge (MER), intelligence, decision support, and users & channels.
- Identity, audit and observability cut across every layer.
- The recommended stack is open source and government-ownable: OpenHIM, HAPI FHIR, PostgreSQL, NATS, Python/R analytics, an on-premise LLM served by vLLM, and Keycloak.
- RADAR is not a big-data problem — volumes are modest. The hard parts are reliability, integration, audit and safe AI.
Why it matters
The architecture fixes where each responsibility lives, so the connector, analytics, AI and UI teams can work in parallel without stepping on each other. It also has to be something KNPHI can run after October 2029: every choice here favours tools that are well documented, widely used in African health information systems, and free of licence lock-in.
How this document connects
← Builds on
03 · Minimum Event RecordThe MER is the core data contract the architecture is built around.Informs →
05 · InteroperabilityThe architecture fixes where the interoperability layer sits.06 · Intelligence LayerAnalytics run as services inside the intelligence layer.07 · DMT-PHE & AI AgentThe agent and rules engine run inside the decision-support layer.11 · Security & InfrastructureThe component list defines what must be hosted and secured.1Quality goals that drive the design
| Goal | What it means for RADAR | Design response |
|---|---|---|
| Available during outbreaks | Load and attention spike exactly when the system matters most | Stateless services, queues between stages, degraded modes, tested restores |
| Data residency | Identifiable data stays on Government-authorised infrastructure Proposal | Production on KNPHI/DHA infrastructure; on-prem LLM; dev on non-identifiable data only |
| Auditable | Every recommendation, confirmation and override is time-stamped and attributable | Append-only audit log; Provenance on every MER change |
| Incremental | Start with four sources; add streams without rebuilding | One connector pattern; MER as stable contract; event bus decouples producers and consumers |
| Operable by KNPHI | Small ops team after handover | Few moving parts, containers, infrastructure-as-code, runbooks, managed upgrades |
| Low-connectivity tolerant | County EOCs may lose power or internet | Light web UI, offline-capable forms, SMS alerts, back-entry with true timestamps |
2The five layers
| Layer | Responsibility | Detail in |
|---|---|---|
| Integration | Connect to sources, land raw data unchanged, validate, map to standard codes | doc 05 |
| Bridge (MER) | Hold event identities, timestamps and links; publish changes | doc 03 |
| Intelligence | Linkage, baselines, anomaly detection, fusion, forecasts, risk scores, signal cards | doc 06 |
| Decision support | Trigger-card rules, AI agent, human confirmation, audit | doc 07 |
| Users & channels | EOC dashboard, DMT-PHE workspace, alerts, partner APIs (GHEC-AI) | doc 08 |
3Components and the path of one record
- Ingest. A connector pulls the week's KABS reports through the gateway and lands the raw file unchanged.
- Validate, map, code. Records are checked against the source schema, mapped to MER/FHIR fields, and coded (syndrome, species, admin unit). Failures go to quarantine.
- Link. The linker matches a cluster of livestock abortions to an existing suspected-RVF MER in the same sub-county, or opens a new one.
- Publish. The MER service writes the change (with Provenance) and publishes an event on the bus.
- Analyse. Analytics workers recompute baselines and fusion scores; a signal card is written with its evidence.
- Decide. The rules engine evaluates the RVF trigger card; the agent drafts a cited recommendation; an officer confirms Level 2 in the DMT-PHE workspace.
- Act and record. The decision lands in the audit log; the outbound gateway notifies the level owner and sends the GHEC-AI hand-off.
4Recommended technology stack
Each choice is a recommendation for the Technical Working Group to confirm in the Technical Product Profile (TPP). All are open source. Recommended
| Component | Recommendation | Why | Alternatives |
|---|---|---|---|
| Gateway / interoperability layer | OpenHIM (or LATTICE where operational) | Reference interoperability layer of OpenHIE; routing, client auth, ATNA audit, mediators; MPL 2.0 | Kong / NGINX + custom audit |
| Connector orchestration | Dagster | Asset-based pipelines with lineage, retries and schedules; Python-native | Apache Airflow, Prefect |
| Raw landing | S3-compatible object storage | Immutable raw files allow re-processing when mappings improve | Ceph RGW, SeaweedFS, MinIO |
| MER & FHIR server | HAPI FHIR JPA on PostgreSQL | Most widely used open FHIR R4 server; profile validation, subscriptions, terminology | Microsoft FHIR server, Medplum |
| Database | PostgreSQL 16+ with PostGIS and pgvector | One reliable engine for relational, spatial and vector search; strong tooling for backup | TimescaleDB extension for time series |
| Event bus | NATS JetStream | Single small binary with persistence; enough for RADAR's volumes; easy to operate | Apache Kafka / Redpanda if DHA standardises on them |
| Record linkage | Splink | Open, explainable Fellegi–Sunter linkage at scale | Custom rules only |
| Analytics | Python (statsmodels, scikit-learn) + R surveillance package | Farrington Flexible, EARS, CUSUM are mature in R; Python for pipelines and fusion | — |
| Rules engine | Versioned decision tables (YAML/JSON) evaluated in code, under test | Trigger cards stay readable by epidemiologists and deterministic | DMN engine (e.g. Camunda) if KNPHI prefers BPMN tools |
| AI agent | Python service (FastAPI) with thin orchestration; tools via MCP | Small, auditable code path; MCP standardises tool access | LangGraph or similar if complexity grows |
| LLM serving | vLLM on on-prem GPU; open-weight model chosen by evaluation | Data never leaves Government infrastructure; OpenAI-compatible API | Government-authorised hosted endpoint |
| Web application | React + TypeScript; MapLibre maps with offline tiles | Production-grade UI; the Streamlit prototype remains a reference only | — |
| Analyst dashboards | Apache Superset | Self-service charts for KNPHI analysts on read-only replicas | Metabase, Grafana |
| Identity & access | Keycloak (OIDC) | SSO, MFA, role-based access; can federate with Government identity later | — |
| Alerts | SMS gateway + email | Reaches officers without the app open | WhatsApp Business API (policy check) |
| Observability | Prometheus, Grafana, Loki, OpenTelemetry | Metrics, logs and traces in one place; alerting on pipeline failures | — |
| Runtime & delivery | Containers on k3s/RKE2; CI with image scanning and signing | Same deployment model from dev to production; small footprint | Docker Compose for the MVP only |
5Environments
Development environments may use approved non-identifiable data; production runs within KNPHI/DHA-approved on-premise or other Government-authorised infrastructure. Proposal The budget includes hosting subscriptions in Periods 1 and 3 (US$4,000 each), the latter to keep the platform running through evaluation and handover. Any cloud hosting that carries live data must itself be Government-authorised. Proposal
6Sizing and hardware
RADAR's data volumes are small by modern standards. Published figures give a sense of scale: KABS received about 11,400 livestock reports in its first two years; one county's community EBS produced about 8,700 signals in a year. Research Even nationally, structured records will be in the low millions over the grant — comfortably handled by a single well-configured PostgreSQL server. The compute-heavy component is LLM inference.
The proposal describes the budgeted server as hosting the RADAR development platform, integrated surveillance databases, analytics engines, AI services and decision-support tools. Proposal Whether it becomes the production host at KNPHI, a development/staging host, or both is a decision for the TPP. Open
| Dell PowerEdge R770 (budgeted, US$36,095) | Specification Research |
|---|---|
| Form factor & CPU | 2U, two Intel Xeon 6 processors (up to 86 P-cores or 144 E-cores each) |
| Memory | 32 DDR5 DIMM slots, up to 8 TB |
| Storage | Up to 40 E3.S NVMe or 24 × 2.5" SATA; BOSS-N1 mirrored boot |
| GPU | Up to 2 double-width 450 W GPUs, or 6 single-width 75 W GPUs |
| Security | TPM 2.0, silicon root of trust, secure boot, self-encrypting drives, system lockdown |
- GPU. Running an LLM on-premise needs at least one data-centre GPU (for example a 48 GB-class card for a mid-size open-weight model). Confirm whether the quoted server configuration includes one; if not, budget it or agree a Government-authorised hosted model endpoint. Open
- Single point of failure. One server hosts everything. Plan a second node or a Government-cloud standby for recovery (see doc 11).
Indicative configuration Recommended: 2 × mid-range Xeon 6 P-core CPUs, 512 GB RAM, 8 × NVMe in RAID 10, mirrored boot, 1–2 × 48 GB-class GPUs, dual power supplies, iDRAC Enterprise. Finalise after a load test of the MVP.
7Designing for low connectivity
- A light web UI that loads quickly on weak links; static assets cached by the browser.
- Offline-capable forms for county officers, syncing when the link returns, with the officer's original action time preserved.
- SMS alerts for escalations so no one depends on having the app open.
- Starlink connectivity at KNPHI and implementation sites is budgeted across all three periods. Proposal
- A documented paper fallback (the existing DMT-PHE tools) with back-entry when systems return (doc 08).
8Architecture decision log
Decisions are recorded as short Architecture Decision Records (ADRs) in the code repository. Initial set to confirm at the first Technical Working Group: Recommended
| ADR | Decision | Status |
|---|---|---|
| 001 | MER implemented as FHIR R4 profiles on HAPI FHIR, built on Kenya Core | Proposed |
| 002 | Escalation level is always computed by the deterministic rules engine; the LLM never sets it | Proposed |
| 003 | LLM runs on Government infrastructure; no identifiable data to public AI services | Proposed (aligns with proposal) |
| 004 | NATS JetStream as event bus | Proposed |
| 005 | OpenHIM as gateway unless LATTICE covers the source | Proposed |
| 006 | Raw data landed unchanged and retained for re-processing | Proposed |
| 007 | Production UI rebuilt in React; Streamlit prototype kept for research only | Proposed |
9Open questions
- Where exactly will production run? KNPHI data centre, DHA-designated facility or Government cloud — and who operates it day to day. Owner: KNPHI + DHA · before TPP sign-off
- Does the server quote include GPUs? Owner: WSU finance + engineering · month 1
- Does DHA mandate specific platforms (e.g. a national HIE gateway, Kafka) that should replace the recommendations above? Owner: DHA liaison · month 2
- What does the enterprise software partner own — UI, hardening, or both? Owner: WSU · partner selection
Sources
- INV-110654 proposal — RADAR Conceptual Design; Budget (server, hosting, internet); Data Access (production hosting, security controls).
- Stage-gate paper — Gate 1 milestone 2 (Technical Product Profile and architecture sign-off); Gate 2 milestone 2 (product hardening).
- Dell Technologies — PowerEdge R770 specification sheet.
- OpenHIM — About the OpenHIM (OpenHIE interoperability layer).
- KABS and EBS volumes — see sources in doc 02.