尚未检测到更新。GitHub 发布版本后会显示在这里。
AI-powered investment scoring and Q&A for Dubai real estate — DuckDB + ChromaDB + LLM
翻译准备中
正在加载完整 README。
查看完整 README ↗AI-powered investment scoring and Q&A for Dubai apartments, built on real Dubai Land Department open data: 47,677 registered apartment sales and Ejari rent contracts across 29 communities (January–September 2026). It computes rental yields, measures price momentum and supply pressure, scores communities, and answers questions with citations. A community without enough rent data gets "insufficient data", never an estimate.
Stack: Next.js 16 + FastAPI + DuckDB + ChromaDB + Groq (LLM). Bayut API optional for live listings.
graph TB
DLD[DLD open-data exports<br/>sales, Ejari rents, projects] --> Loader[dld_loader.py<br/>clean + map communities]
Loader --> DuckDB[(DuckDB<br/>sales, rents, projects + views)]
DuckDB --> Reports[build_reports.py<br/>one report per community]
Reports --> ChromaDB[(ChromaDB<br/>market reports)]
UI[Next.js 16 UI :3000] -->|REST| API[FastAPI :8000]
API --> Router{Query Router}
Router -->|Structured| DuckDB
Router -->|Semantic| ChromaDB
API -.->|Optional live listings| Bayut[Bayut API]
DuckDB --> Scores[Investment Scoring]
Scores --> LLM[LLM Generation<br/>Groq / OpenAI / OpenRouter]
ChromaDB --> LLM
LLM --> |Answer + Citations| UI
subgraph "4-Factor Scoring"
S1[Rental Yield 40]
S2[Supply Pressure 25]
S3[Price Momentum 20]
S4[Liquidity 15]
end
S1 --> Scores
S2 --> Scores
S3 --> Scores
S4 --> Scores
git clone https://github.com/ahmedbasolan/dubai-property-bot.git
cd dubai-property-bot
1. Export the data. DLD's open-data gateway requires a captcha per search, so
the raw exports are a manual step (about 10 minutes). On
dubailand.gov.ae/en/open-data/real-estate-data,
download CSVs into data/raw/dld/, named transactions-*.csv, rents-*.csv and
projects-*.csv:
| Tab | Filters |
|---|---|
| Transactions | Sales · Residential · Unit · a date range in the current year |
| Rents | Registration Date · Residential · one month at a time (larger ranges can fail) |
| Project | Completion Date · current year |
The gateway only serves the current year. Exact filters, column codes and what
each export contains are in
docs/plans/2026-10-23-real-dld-data.md.
2. Build and run.
make setup # loader -> DuckDB -> community reports -> ChromaDB
cp .env.example .env
# Add at least one LLM key: GROQ_API_KEY (free tier), OPENAI_API_KEY or OPENROUTER_API_KEY
# Optional: BAYUT_API_KEY for live listings (RapidAPI)
make run-api # http://localhost:8000 (docs at /docs)
make run-ui # http://localhost:3000
Re-export and run make setup again to refresh. Adding more rent months fills in
yields for more communities.
Docker (optional): docker compose up --build. The API container runs the same
pipeline on start, so data/raw/dld/ must hold the exports.
Live demo: https://dubai-property-bot.vercel.app. One Vercel project serves the frontend and
the API as two Services; see docs/deploy.md. The demo runs without a server
LLM key, so the chatbot answers from the data unless you add your own key in its settings.
| Route | Purpose |
|---|---|
/ | Dashboard: KPIs, top communities, latest registered sales |
/communities | Leaderboard with yield, momentum, supply and liquidity grades |
/properties | Registered sales, paged, filterable by community and bedrooms |
/compare | Up to 3 sales side by side |
/map | Leaflet map of the 29 communities (OpenStreetMap coordinates) |
/trends | Quarterly median price/sqft, sales volume, same-project momentum |
/calculator | Mortgage + short-term-rental calculators |
/chat | RAG chat advisor (markdown answers with tables) |
Brand assets: /brand/brand-book.html, /brand/luxury-gold.html, /brand/showcase.html
Investment Scoring. Each community gets a composite score (20–100) from four factors DLD data actually supports:
| Factor | Weight | Measure |
|---|---|---|
| Rental yield | 40 | Per project, median new Ejari rent per m² ÷ median ready price per m²; the community's median across projects |
| Supply pressure | 25 | Off-plan sales per ready sale in 2026: units still to be handed over |
| Price momentum | 20 | Median change of the same projects from Q1 to Q3 2026 |
| Liquidity | 15 | Ready sales registered |
Each factor is graded A–F and mapped to 1–5 points. Yield bands are absolute (≥7.5% is A); the others were set from the 2026 distribution across communities. Recommendations are bands on that same score: INVEST ≥ 70, HOLD ≥ 50, AVOID < 50. No yield, no score: a community needs at least 3 projects with both new rents and ready sales, and 30 such contracts; otherwise it's "INSUFFICIENT DATA". Momentum needs at least 5 projects sold in both quarters, otherwise it's left out and the other weights are rescaled.
Why per m² and same-project. Ejari rows carry no bedroom count, so rents and sales are compared per square metre, and within the same project: pooling every rent against every sale put International City at 11.6% because a third of its rents came from one newer tower (like for like it's 8.75%). Raw community medians move with which buildings sold (Majan's median rose 52% in two quarters, Marina's 10%), while comparing the same projects shows most communities softened 4–10% over 2026.
Net yield = gross yield × (1 − 8% management − 5% vacancy). It is before service charges, which DLD doesn't publish, and every place it's shown says so.
All from Dubai Land Department open data, January–September 2026, cleaned by
src/dld_loader.py:
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗