ResRoute is a full-stack, self-healing delivery routing platform with:
- FastAPI backend for route orchestration, risk scoring, analytics, and settings APIs
- React + Vite frontend dashboard for dispatch, history, analytics, and configuration
- Shared Python AI risk/disruption logic in the root
ai/package
backend/: FastAPI servicefrontend_version1/: React + TypeScript applicationai/: canonical AI logic and tests
- Python 3.10+
- Node.js 18+
- npm 9+
Copy .env.example from the repo root (or backend/.env.example) to .env and update values.
OSRM_BASE_URLNOMINATIM_BASE_URLNOMINATIM_USER_AGENT
ORS_BASE_URLORS_API_KEYOPENWEATHER_API_KEYGOOGLE_APPLICATION_CREDENTIALSFIREBASE_CREDENTIALSFIREBASE_CREDENTIALS_PATH(legacy fallback)REROUTE_RISK_THRESHOLD
VITE_API_BASE_URLVITE_GOOGLE_MAPS_API_KEY
cd backend
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reload --host 0.0.0.0 --port 8000Health check:
curl http://localhost:8000/healthcd frontend_version1
npm install
npm run devProduction build:
npm run buildpython -m pytest ai/tests -q- Live-first behavior is implemented for routes, analytics/history, disruptions, and settings.
frontend_version1/src/services/mockData.tsis intentionally retained as a documented fallback source for demo/offline usage.