BI stack for the Tunisian used-car market: ETL, a PostgreSQL star schema warehouse, a FastAPI backend, and a trilingual (Derja/French/English) chatbot, in Docker Compose.
# π Tunisian Automobile Market Analyzer & Price Index
**A full BI stack for the Tunisian used-car market** β synthetic-data ETL, a PostgreSQL star schema warehouse, a FastAPI backend, and a trilingual (Derja πΉπ³ Β· French π«π· Β· English π¬π§) chatbot, all wrapped in a one-command Docker Compose stack.
---
## πΌοΈ Preview
---
## β¨ Key Features
- π€ **Trilingual chatbot** β ask in Tunisian Derja, French, or English; a rule-based NLU engine detects the language, classifies intent, and replies in kind β no external LLM, fully offline and reproducible
- ποΈ **Kimball-style star schema** β `fact_car_listings` joined against `dim_car_model`, `dim_seller_location`, and `dim_date` in PostgreSQL
- π **Reproducible ETL pipeline** β pandas + SQLAlchemy, with a realistic depreciation-curve pricing model (age, mileage, condition, fuel type, transmission)
- π **6 ready-to-run BI queries** β price index, depreciation curve, regional index, fuel-type adoption trend, best-value finder, transmission/seller premium
- π» **Built-in web chat UI** β a real webpage with live stat tiles, a browsable car catalog, and a chat panel; no Swagger/Postman needed to try it
- π³ **One-command stack** β `docker-compose up` boots Postgres, Adminer, and the API together
- π **Light & dark mode** β the web UI follows your OS theme automatically
---
## π§° Tech Stack
| Layer | Technology |
|---|---|
| ETL & data generation | Python, pandas, NumPy |
| Warehouse loading | SQLAlchemy 2.0 |
| Database | PostgreSQL 16 (star schema) |
| API | FastAPI, Pydantic, Uvicorn |
| Frontend | Vanilla HTML / CSS / JS (no build step, no framework) |
| Chatbot NLU | Custom rule engine (regex + keyword scoring) |
| DB admin | Adminer |
| Orchestration | Docker Compose |
---
## πΌοΈ Screenshots Gallery
| Desktop Dashboard | Dark Mode |
|:---:|:---:|
| | |
| Mobile View | Trilingual Chat, close up |
|:---:|:---:|
| | |
---
## π Getting Started
### Prerequisites
- Docker + Docker Compose
### 1. Clone and β¦