An end-to-end demo that mixes classic property filtering with AI ranking and AI powered market insights. The repo bundles a NestJS + Prisma backend, a Vite/React frontend, a Dockerized Postgres database, and Python helpers for LLM ranking and POI precompute.
We all know how tedious finding the perfect new home in a big city can be. From having to doomscroll through thousands of properties, to fake properties that don't exist, to duplicate announcements and to having to chat with tens of owners/agents. This is where we come in.
We provide a filtered, fully personalized and automated experience for our clients. Log into our platform, create an account, and desribe what you are looking for. From your profile description, we run an analysis on the available properties and use our AI-powered reasoning system to find you the properties best tailored for your needs.
- Best-match real estate AI-powered lookup
- AI-powered property price comparison to surrounding similar offers
- Fully automated chat with agent/owner
- Smart-filter that determines individual benefits for each property
- Address validation for each listing
- AI powered description of each listing based on the listed images
NOTE : In order to test the functionality locally, on your device you will need Gemini and Grok API keys
git clone https://github.com/nchristiann/rentAI.git
cd rentAI/project
# 1) start Postgres
cd infrastructure
docker compose up -d
# 2) configure backend env & deps
cd ../backend
cp .env.example .env # add your secrets manually afterwards
npm install
npx prisma db push
npx prisma generate
# 3) run backend
npm run start:dev
# 4) configure frontend env & deps
cd ../frontend
cp .env.example .env.local # optional, only if you need custom base URL
npm install
# 5) run frontend
npm run devBackend runs on http://localhost:3000, the Vite dev server defaults to http://localhost:5173 with a proxy so the React app can call /api/... without CORS issues.
| Layer | Details |
|---|---|
| Framework | NestJS with feature modules (listings, preferences, ai, grok, auth, etc.) |
| ORM | Prisma connected to Postgres via DATABASE_URL |
| Database | Postgres (Docker compose file in infrastructure/docker-compose.yml) |
| AI helpers | Python scripts in backend/src/ai (LLM reranker, POI precompute) + the new GrokClient |
Important commands (run inside backend/):
npm install # install dependencies
npx prisma db push # sync schema to local DB
npx prisma generate # regenerate Prisma client
npm run start:dev # start Nest in watch modeThe /api/ai/rerank endpoint now auto-detects which provider to use:
- If
RERANK_LLM=grokorGROK_API_KEYis present, the Nest service calls Grok directly via the newGrokClient. - Otherwise it falls back to Gemini (same payload/prompt, still available if you keep the Python dependency installed).
To enable Grok everywhere, add to backend/.env:
GROK_API_KEY="sk-your-key"
GROK_MODEL="grok-beta" # optional override
GROK_API_URL="https://api.x.ai/v1/chat/completions"Restart the backend after editing .env.
- Vite + React single-page app (
frontend/src). - Context providers for auth/preferences, a
Listings.jsxpage with algorithmic filters, two-step AI flow, and Grok badges. - Leaflet map overlay (
components/MapOverlay.jsx) for spatial exploration.
Key commands (inside frontend/):
npm install
npm run dev # start Vite dev server with proxy
npm run build # production build (requires Node 22.12+ per .nvmrc)To point the UI at a different backend origin, edit frontend/.env.example (or .env.local) and set VITE_API_BASE_URL.
docker compose up -dinsideinfrastructure/starts Postgres on port 5432 with deterministic seed SQL scripts (listings, sellers, etc.).- Optional extras: run
infrastructure/init/add_images_unsplash.sqlorseed_listings_extra.sqlto load demo imagery and neighborhoods. - For POI metrics, execute
python backend/src/ai/precompute_worker_v2.py --forceonce Postgres is populated.
Use Prisma Studio (npx prisma studio) or plain psql to inspect data.
| Symptom | Likely cause | Fix |
|---|---|---|
| Frontend overlay says "[AI Fallback]" | /api/ai/rerank failed (missing key, timeout) |
Inspect backend logs; ensure Grok/Gemini env vars are set |
Cannot find module '@google/genai' |
Backend deps not installed | npm install in backend/ |
npm run build warns about Node version |
Node < 22.12.0 | nvm install 22.12.0 && nvm use |
404 /api/listings in dev |
Proxy misconfigured | Run frontend via npm run dev (Vite proxy) or set VITE_API_BASE_URL |
| Empty listings table | Seeds not applied | docker compose exec postgres psql ... -f infrastructure/init/seed_listings.sql |
- Create a feature branch, keep commits scoped.
- Run lint/build/tests for both backend and frontend where relevant.
- Ensure new environment variables have sane defaults and are documented here.
- Open a PR with a short demo note or screenshots.