Multilingual Smart City AI Assistant & Spatial GIS Map for Adama, Ethiopia.
# Adama AI City Information Assistant 🇪🇹
An advanced, production-ready, full-stack smart city digital assistant specialized for Adama City, Ethiopia.
This platform serves as a multilingual conversational AI gateway and interactive spatial GIS system designed to help citizens, tourists, business owners, and students navigate local municipal services, locate businesses, perform radial coordinate searches, and submit AI-categorized hazard tickets.
---
## 🏗️ Architecture Design
The assistant leverages a modern, loosely-coupled, high-performance monorepo architecture:
```mermaid
graph TD
subgraph Frontend [Next.js 15 App Client]
UI[Tailwind & Framer Motion UI] --> Map[Leaflet.js Interactive GIS Map]
UI --> Voice[Browser Speech Recognition & Synthesis]
UI --> WS_Client[WebSocket Real-time Client]
end
subgraph Backend [FastAPI Service Container]
API[FastAPI Routers] --> WS_Server[WebSocket Server]
API --> Auth[JWT Security Service]
API --> Ingest[Ingestion & Seeding Pipeline]
subgraph AIEngine [AI RAG & Routing Engine]
Dual[Dual-Mode Router]
Dual -->|OPENAI_API_KEY present| OpenAI[OpenAI gpt-4o-mini & Text Embeddings]
Dual -->|Fallback / Off-grid| FailSafe[Local Multilingual Semantic Rule-Engine]
OpenAI --> Vector[Persistent ChromaDB Store]
end
end
subgraph Database [PostgreSQL Database Container]
Postgres[(PostgreSQL Engine)] --> PostGIS[PostGIS Geoproximity Extension]
end
WS_Client |ws://ws/chat| WS_Server
UI |HTTP REST| API
API Postgres
FailSafe -->|Keyword Maps| Ingest
```
---
## 🌟 Key Features
1. **Multilingual AI Interface:** Out-of-the-box native localization for:
- **English (`en`)**
- **Afaan Oromo (`or`)**
- **Amharic (`am`)**
Features automated language detection heuristics and toggle switches.
2. **Dual-Mode Conversational Engine:**
- **AI/RAG Mode:** Automatically activates when `OPENAI_API_KEY` is supplied, running OpenAI neural models and vector retrievals in ChromaDB.
- **Local Semantic Engine (Fail-safe):** Operates entirely offline/withou …