# Ethiopian RTA Severity Predictor — Full Stack Web App
A production-grade full stack application that predicts road traffic accident
severity in Addis Ababa, Ethiopia using a Stacking Ensemble ML model.
---
## Tech Stack
| Layer | Technology |
|-----------|-----------------------------------|
| Frontend | React 18, Recharts, Framer Motion |
| Backend | FastAPI, Python 3.9+ |
| ML Model | sklearn Stacking Ensemble |
| Styling | Custom CSS with design system |
---
## Model Performance
| Metric | Score |
|-------------------|--------|
| Test Accuracy | 90.82% |
| ROC-AUC | 0.9822 |
| F1 (Weighted) | 90.91% |
| F1 (Macro) | 88.25% |
| Precision (Weight)| 91.14% |
| Recall (Weighted) | 90.82% |
---
## Quick Start
### Linux / macOS
```bash
chmod +x start.sh
./start.sh
```
### Windows
**Using Batch:**
```
Double-click start.bat
```
**Using PowerShell:**
```powershell
.\start.ps1
```
### Manual Start
**Backend:**
```bash
cd backend
pip install -r requirements.txt
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
```
**Frontend:**
```bash
cd frontend
npm install
npm start
```
---
## Project Structure
```
rta_webapp/
├── backend/
│ ├── main.py # FastAPI app
│ ├── requirements.txt
│ └── model/
│ ├── best_rta_model.pkl
│ └── model_metadata.json
├── frontend/
│ ├── public/
│ │ └── index.html
│ ├── src/
│ │ ├── App.js
│ │ ├── index.js
│ │ ├── index.css # Global design system
│ │ ├── components/
│ │ │ ├── Navbar.js
│ │ │ └── Navbar.css
│ │ └── pages/
│ │ ├── Home.js # Landing page with metrics
│ │ ├── Predict.js # Interactive prediction form
│ │ ├── Dashboard.js # Charts and model analytics
│ │ └── About.js # Technical documentation
│ └── package.json
├── start.sh # Linux/macOS launcher
├── start.bat # Windows la …