# South African Pothole Detection System
**Student ID: 2021749524**
A comprehensive infrastructure monitoring system designed specifically for South African roads.
## Quick Start
### Prerequisites
- Python 3.8+
- Node.js 16+
- npm
### Running the System
#### 1. Start Backend Server
```bash
cd backend
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
python3 app.py
```
#### 2. Start Frontend Dashboard (New Terminal)
```bash
cd dashboard
npm install
npm run dev
```
#### 3. Open Dashboard
```bash
open
localhost
```
## Features
- **π Automated Detection**: Automatic pothole severity classification
- **πΊοΈ Interactive Map**: Real-time South African road monitoring
- **πΈ Image Upload**: Upload and analyze pothole photos
- **π Analytics Dashboard**: Performance metrics and insights
- **π Real-time Updates**: Live data synchronization
## Project Structure
```
pothole-detection-system/
βββ backend/ # FastAPI backend server
βββ dashboard/ # React frontend dashboard
βββ docs/ # Documentation files
βββ README.md # This file
```
## API Endpoints
- `GET /health` - Health check
- `GET /reports` - Get all reports
- `POST /report` - Create new report
- `POST /image/{report_id}` - Upload image to report
- `POST /maintenance/assign` - Assign maintenance team
- `POST /maintenance/close` - Close maintenance report
## Demo Features
1. **Add New Report**: Upload pothole images with automated analysis
2. **Interactive Map**: View pothole locations across South Africa
3. **Report Management**: Track and manage pothole reports
4. **Real-time Updates**: See changes instantly across all components
## Troubleshooting
- **Port 8000 busy**: `lsof -ti:8000 | xargs kill -9`
- **Frontend errors**: Check browser console
- **Backend errors**: Check terminal output
---