Epidemic Spread Simulation System for Rwanda — React/TS frontend + FastAPI backend
# Epidemic Spread Simulation System
An AI-driven epidemic spread simulation platform for public health planning
and outbreak preparedness. Frontend design generated by
Magic Patterns
(source design);
backend built to give the core flow (auth, disease parameters, SEIR
simulation) a real implementation instead of mock data.
- `src/` — React + TypeScript + Tailwind frontend
- `backend/` — FastAPI + SQLAlchemy backend (see `backend/README.md`)
## Running locally
**Backend** (terminal 1):
```bash
cd backend
python -m venv venv
./venv/Scripts/activate
pip install -r requirements.txt
cp .env.example .env
uvicorn app.main:app --reload --port 8000
```
**Frontend** (terminal 2):
```bash
npm install
npm run dev
```
Open `
localhost`. Sign in with one of the demo accounts shown on
the login screen (click one to autofill) — these are real accounts, seeded
into the backend database on first run.
## What's real vs. mock
| Module | Status |
| ------------------------------------ | -------------------------------------------------------------- |
| Auth (register/login/session) | **Real** — JWT, bcrypt, persisted users |
| RBAC | **Real** — enforced server-side, matches `src/lib/rbac.ts` |
| Disease parameter presets | **Real** — served from the backend, seeded on first run |
| SEIR simulation | **Real** — SciPy `solve_ivp` ODE integration, persisted runs |
| Everything else (Population, Agent-Based, Interventions, Geographic, Healthcare Capacity, Scenario Comparison, Reports, Admin/Officer/Policy dashboards) | Frontend mock data from the original Magic Patterns export |
See `backend/README.md` for API details and how to extend further modules.