UrbanReflex is an open-source smart city platform that transforms road segments into linked data nodes, integrating environmental monitoring, infrastructure status, and citizen reports. AI-powered classification and prioritization help city teams manage issues efficiently, while NGSI-LD open data ensures transparency and interoperability.
See the code
A smart city intelligence platform that bridges fragmented urban data sources into a unified NGSI-LD ecosystem, empowering communities and city managers with real-time infrastructure insights and open data access
Explore the platform »
🐛 Report Bug
|
✨ Request Feature
|
💬 Join Discussion
|
📚 Documentation
UrbanReflex is an open-source smart city platform designed to address critical urban challenges through integrated data-driven solutions, combining real-time environmental monitoring with citizen engagement tools for transparent, efficient urban governance.
Built on NGSI-LD standards, the platform unifies infrastructure data, air quality monitoring, and citizen reports into actionable intelligence. Through open data access, AI-powered analytics, and real-time insights, it enables communities and city managers to make informed decisions that drive sustainable urban development and transparent governance.
This release focuses on developer experience improvements, automation, and production readiness.
just install automatically installs UV + all dependencies.env) and frontend (.env.local)ModuleNotFoundError for backend models packageSee CHANGELOG.md for full release notes.
✅ Just task runner # https://just.systems/
✅ Docker Desktop # https://www.docker.com/
✅ 8GB RAM minimum
# 1. Clone repository
git clone https://github.com/minhe51805/UrbanReflex.git
cd UrbanReflex
# 2. Install Just (if not already installed)
winget install Casey.Just # Windows
brew install just # macOS
cargo install just # Linux
# 3. Install all dependencies (one command!)
just install
# ✅ Auto-installs UV, Python packages, npm packages
# 4. Setup environment files
just setup-env
# ✅ Creates .env and src/frontend/.env.local from examples
# 5. Start all services (one command!)
just dev
# ✅ Starts MongoDB, Orion-LD, and Scheduler with Docker Compose
Done! 🎉
Note: To run backend/frontend locally (without Docker), use separate terminals:
just backend-dev # Terminal 2: Backend dev server just frontend-dev # Terminal 3: Frontend dev server
If just install fails with UV path errors:
# Option 1: Restart terminal and try again
just install
# Option 2: Install backend separately
just backend-install
# Option 3: Manual UV installation
irm https://astral.sh/uv/install.ps1 | iex
# Restart terminal, then: uv sync --all-extras
Make sure databases are running:
just db-start
just db-logs # Check for errors
Edit .env for backend:
GEMINI_API_KEY=your-key # For AI chatbot
PINECONE_API_KEY=your-key # For vector search
OPENAQ_API_KEY=your-key # For real air quality data
Edit src/frontend/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:8000
App works without API keys (uses mock data)
| Technology | Purpose |
|---|---|
| FastAPI | High-performance async API framework |
| Python 3.10+ | Backend runtime |
| MongoDB | Document database for users and reports |
| Orion-LD | NGSI-LD compliant context broker |
| Redis | In-memory caching and sessions |
| Gemini AI | Natural language understanding |
| Pinecone | Vector search for semantic similarity |
| Technology | Purpose |
|---|---|
| Next.js 16 | React framework with App Router |
| TypeScript | Type-safe development |
| Tailwind CSS | Utility-first styling |
| MapLibre GL | Interactive WebGL mapping |
| Chart.js | Data visualization |
| Framer Motion | Smooth UI animations |
| Technology | Purpose |
|---|---|
| Docker Compose | Multi-service orchestration |
| Just | Task automation |
| UV | Fast Python package manager |
| Husky | Git hooks for code quality |
UrbanReflex/
├── src/
│ ├── backend/ # FastAPI Backend
│ │ ├── app.py # Main application entry
│ │ ├── routers/ # API endpoint definitions
│ │ ├── models/ # Database models
│ │ ├── schemas/ # Pydantic validation schemas
│ │ ├── ai_service/ # Gemini AI & Pinecone integration
│ │ └── utils/ # Utility functions
│ └── frontend/ # Next.js 16 Frontend
│ ├── app/ # App Router pages
│ ├── components/ # React components
│ ├── contexts/ # State management
│ ├── lib/ # API clients & utilities
│ └── types/ # TypeScript definitions
├── scripts/ # Data fetching & processing scripts
├── docs/ # Project documentation
├── open_data/ # Open datasets (GeoJSON, NDJSON)
├── schemas/ # JSON schemas for data validation
├── .justfile # Just task automation recipes
├── pyproject.toml # Python dependencies (PEP 518)
├── docker-compose.yml # Container orchestration
└── LICENSE # GPL-3.0 license
just install # Install UV + backend deps + frontend deps (one command!)
just setup-env # Create .env and src/frontend/.env.local from examples
just dev # Start databases + show instructions for backend/frontend
just backend-install # Install backend dependencies only
just backend-dev # Start backend API (port 8000)
just frontend-install # Install frontend dependencies only
just frontend-dev # Start frontend app (port 3000)
just db-start # Start MongoDB + Orion-LD
just db-stop # Stop databases
just db-restart # Restart databases
just db-logs # View database logs
just db-clean # Remove all database data (with confirmation)
just format # Format all code (Black + Prettier)
just lint # Run linters (Flake8 + ESLint)
just test # Run backend tests
just info # Show project info, ports, and quick start guide
just health # Check backend health endpoint
just clean # Clean build artifacts and cache
just stop-all # Stop all running services
just code # Open project in VS Code
| Document | Description |
|---|---|
| API Reference | Complete REST API documentation |
| Architecture | System design and components |
| Development Setup | Local development guide |
| Data Model | NGSI-LD entity definitions |
| User Guide | End-user manual |
| Code Style Guide | Coding conventions |
We are excited that you are interested in contributing to this project! Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
Read through our contributing guidelines to learn about our submission process, coding rules, and more.
Want to report a bug, contribute some code, or improve the documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.
| Metric | Badge |
|---|---|
| 🌟 Stars | |
| 🍴 Forks | |
| 👁️ Watchers | |
| 👥 Contributors | |
| 📝 Commits | |
| 🐛 Issues | |
| 🎯 Pull Requests | |
| 📅 Last Commit | |
| 📦 Code Size | |
| 📜 License |
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Key Points:
UrbanReflex v0.2.0 — Smart City Intelligence Platform
UrbanReflex is an open-source smart city platform that transforms road segments into linked data nodes, integrating environmental monitoring, infrastructure status, and citizen reports. AI-powered classification and prioritization help city teams manage issues efficiently, while NGSI-LD open data ensures transparency and interoperability.
See the code
A smart city intelligence platform that bridges fragmented urban data sources into a unified NGSI-LD ecosystem, empowering communities and city managers with real-time infrastructure insights and open data access
Explore the platform »
🐛 Report Bug
|
✨ Request Feature
|
💬 Join Discussion
|
📚 Documentation
UrbanReflex is an open-source smart city platform designed to address critical urban challenges through integrated data-driven solutions, combining real-time environmental monitoring with citizen engagement tools for transparent, efficient urban governance.
Built on NGSI-LD standards, the platform unifies infrastructure data, air quality monitoring, and citizen reports into actionable intelligence. Through open data access, AI-powered analytics, and real-time insights, it enables communities and city managers to make informed decisions that drive sustainable urban development and transparent governance.
This release focuses on developer experience improvements, automation, and production readiness.
just install automatically installs UV + all dependencies.env) and frontend (.env.local)ModuleNotFoundError for backend models packageSee CHANGELOG.md for full release notes.
✅ Just task runner # https://just.systems/
✅ Docker Desktop # https://www.docker.com/
✅ 8GB RAM minimum
# 1. Clone repository
git clone https://github.com/minhe51805/UrbanReflex.git
cd UrbanReflex
# 2. Install Just (if not already installed)
winget install Casey.Just # Windows
brew install just # macOS
cargo install just # Linux
# 3. Install all dependencies (one command!)
just install
# ✅ Auto-installs UV, Python packages, npm packages
# 4. Setup environment files
just setup-env
# ✅ Creates .env and src/frontend/.env.local from examples
# 5. Start all services (one command!)
just dev
# ✅ Starts MongoDB, Orion-LD, and Scheduler with Docker Compose
Done! 🎉
Note: To run backend/frontend locally (without Docker), use separate terminals:
just backend-dev # Terminal 2: Backend dev server just frontend-dev # Terminal 3: Frontend dev server
If just install fails with UV path errors:
# Option 1: Restart terminal and try again
just install
# Option 2: Install backend separately
just backend-install
# Option 3: Manual UV installation
irm https://astral.sh/uv/install.ps1 | iex
# Restart terminal, then: uv sync --all-extras
Make sure databases are running:
just db-start
just db-logs # Check for errors
Edit .env for backend:
GEMINI_API_KEY=your-key # For AI chatbot
PINECONE_API_KEY=your-key # For vector search
OPENAQ_API_KEY=your-key # For real air quality data
Edit src/frontend/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:8000
App works without API keys (uses mock data)
| Technology | Purpose |
|---|---|
| FastAPI | High-performance async API framework |
| Python 3.10+ | Backend runtime |
| MongoDB | Document database for users and reports |
| Orion-LD | NGSI-LD compliant context broker |
| Redis | In-memory caching and sessions |
| Gemini AI | Natural language understanding |
| Pinecone | Vector search for semantic similarity |
| Technology | Purpose |
|---|---|
| Next.js 16 | React framework with App Router |
| TypeScript | Type-safe development |
| Tailwind CSS | Utility-first styling |
| MapLibre GL | Interactive WebGL mapping |
| Chart.js | Data visualization |
| Framer Motion | Smooth UI animations |
| Technology | Purpose |
|---|---|
| Docker Compose | Multi-service orchestration |
| Just | Task automation |
| UV | Fast Python package manager |
| Husky | Git hooks for code quality |
UrbanReflex/
├── src/
│ ├── backend/ # FastAPI Backend
│ │ ├── app.py # Main application entry
│ │ ├── routers/ # API endpoint definitions
│ │ ├── models/ # Database models
│ │ ├── schemas/ # Pydantic validation schemas
│ │ ├── ai_service/ # Gemini AI & Pinecone integration
│ │ └── utils/ # Utility functions
│ └── frontend/ # Next.js 16 Frontend
│ ├── app/ # App Router pages
│ ├── components/ # React components
│ ├── contexts/ # State management
│ ├── lib/ # API clients & utilities
│ └── types/ # TypeScript definitions
├── scripts/ # Data fetching & processing scripts
├── docs/ # Project documentation
├── open_data/ # Open datasets (GeoJSON, NDJSON)
├── schemas/ # JSON schemas for data validation
├── .justfile # Just task automation recipes
├── pyproject.toml # Python dependencies (PEP 518)
├── docker-compose.yml # Container orchestration
└── LICENSE # GPL-3.0 license
just install # Install UV + backend deps + frontend deps (one command!)
just setup-env # Create .env and src/frontend/.env.local from examples
just dev # Start databases + show instructions for backend/frontend
just backend-install # Install backend dependencies only
just backend-dev # Start backend API (port 8000)
just frontend-install # Install frontend dependencies only
just frontend-dev # Start frontend app (port 3000)
just db-start # Start MongoDB + Orion-LD
just db-stop # Stop databases
just db-restart # Restart databases
just db-logs # View database logs
just db-clean # Remove all database data (with confirmation)
just format # Format all code (Black + Prettier)
just lint # Run linters (Flake8 + ESLint)
just test # Run backend tests
just info # Show project info, ports, and quick start guide
just health # Check backend health endpoint
just clean # Clean build artifacts and cache
just stop-all # Stop all running services
just code # Open project in VS Code
| Document | Description |
|---|---|
| API Reference | Complete REST API documentation |
| Architecture | System design and components |
| Development Setup | Local development guide |
| Data Model | NGSI-LD entity definitions |
| User Guide | End-user manual |
| Code Style Guide | Coding conventions |
We are excited that you are interested in contributing to this project! Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
Read through our contributing guidelines to learn about our submission process, coding rules, and more.
Want to report a bug, contribute some code, or improve the documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.
| Metric | Badge |
|---|---|
| 🌟 Stars | |
| 🍴 Forks | |
| 👁️ Watchers | |
| 👥 Contributors | |
| 📝 Commits | |
| 🐛 Issues | |
| 🎯 Pull Requests | |
| 📅 Last Commit | |
| 📦 Code Size | |
| 📜 License |
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Key Points:
UrbanReflex v0.2.0 — Smart City Intelligence Platform