Transform 6 months of civil engineering into 6 minutes of AI-powered diagnosis
InfraFlow is a forensic infrastructure agent that moves urban planning from capacity-based expansion to efficiency-based geometric optimization. Instead of widening roadsโwhich induces demandโInfraFlow diagnoses congestion root causes and auto-generates Uninterrupted Flow Interchanges (UFI).
- ๐ Forensic Discovery: 24-hour "Time-Machine" traffic probing with Google Routes API
- ๐ง Cognitive Processing: Gemini Thinking Mode for intelligent design selection
- ๐๏ธ Generative Design: Auto-generated DDI, Roundabout, and optimized signal geometries
- ๐ฎ Digital Twin: SUMO micro-simulation for validation
- ๐ Impact Visualization: Before/after comparison with LOS, travel time, and COโ metrics
- Docker & Docker Compose
- Node.js 18+ (for local development)
- Python 3.11+ (for local development)
# Clone the repository
git clone https://github.com/your-org/infraflow.git
cd infraflow
# Copy environment template
cp backend/.env.example backend/.env
# Edit .env with your API keys
# Start all services
docker-compose up -d
# Access the application
# Frontend: http://localhost:3000
# API Docs: http://localhost:8000/docs# Backend
cd backend
python -m venv venv
venv\Scripts\activate # Windows
pip install -r requirements.txt
uvicorn main:app --reload
# Frontend (new terminal)
cd frontend
npm install
npm run devโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FRONTEND (React + Deck.gl) โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ MapView โ โInspector โ โ Thinking โ โ Impact โ โ
โ โ(Pin Drop)โ โ Panel โ โ Trace โ โ Slider โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BACKEND (FastAPI) โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ/v1/forensics โ โ/v1/architect โ โ/v1/simulationโ โ
โ โ โข probe โ โ โข generate โ โ โข run โ โ
โ โ โข status โ โ โข design โ โ โข results โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ PostgreSQL โ โ Redis โ โ SUMO โ
โ + PostGIS โ โ (Cache) โ โ (Simulation) โ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/forensics/probe |
Initiate 24-hour traffic probe |
| GET | /v1/forensics/probe/{id}/status |
Check probe status |
| GET | /v1/forensics/probe/{id}/friction-curve |
Get friction analysis |
| POST | /v1/architect/generate |
Generate AI-powered design |
| GET | /v1/architect/design/{id} |
Get design result |
| GET | /v1/architect/thinking-trace/{id} |
Get Gemini reasoning |
| POST | /v1/simulation/run |
Run SUMO simulation |
| GET | /v1/simulation/sumo-results/{id} |
Get simulation results |
Copy .env.example to .env and configure:
# Required
GOOGLE_MAPS_API_KEY=your_key_here
GEMINI_API_KEY=your_key_here
# Database
DATABASE_URL=postgresql+asyncpg://infraflow:infraflow@localhost:5432/infraflow
# Optional
SUMO_HOME=/path/to/sumo
DEBUG=true| Design | Conflict Points | Best For |
|---|---|---|
| Roundabout | 8 (vs 32) | Arterial junctions, balanced flow |
| DDI | 18 (vs 32) | Heavy left turns, highway interchanges |
| Signal Optimized | 24 (vs 32) | Constrained spaces, moderate volumes |
# Backend tests
cd backend
pytest tests/ -v
# Frontend tests
cd frontend
npm testMIT License - see LICENSE for details.
Made with ๐ง by the InfraFlow Team