Skip to content

arymn7/rentscope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RentScope 🗺️🏠

Devpost: https://devpost.com/software/soft-submission

Toronto Student Housing Map Assistant (MCP-based, multi-agent)

RentScope is a map-first assistant that helps students choose neighbourhoods by visualizing rent, commute, safety signals, and amenities; producing ranked, explainable recommendations instead of scattered listings.

Why RentScope

Finding student housing is chaotic:

  • Rent alone doesn’t tell the full story
  • Commute time, safety, and amenities matter differently for everyone
  • “Safety” and “livability” are hard to compare objectively
  • Most tools force tab-hopping and gut-feel decisions

RentScope turns those tradeoffs into a calm, visual map experience with clear reasoning behind every recommendation.

What It Does

  • Students add the places they care about most (campus, work, etc.)
  • RentScope generates:
    • A rent heatmap
    • Ranked neighbourhood shortlists
    • Evidence-backed explanations for each score
  • Users can explore neighbourhoods, compare tradeoffs, and understand why one area outranks another

Repo Structure

  • frontend/ — Next.js + Tailwind + Leaflet
  • orchestrator/ — Node.js API + Gemini agent manager
  • mcp_server/ — Python FastAPI MCP server + tools
  • data/ — sample datasets + Snowflake SQL scripts

Architecture Rules (enforced)

  • Frontend -> Orchestrator only
  • Orchestrator -> MCP tools only (no Snowflake direct)
  • Agents only interpret MCP tool outputs (JSON-only, validated)
  • MongoDB stores shortlists, tool cache, and analysis runs

Data Sources (public)

Quickstart (Docker)

  1. Create an environment variable with your Gemini key (PowerShell):
$env:GEMINI_API_KEY="your_key_here"
  1. Run the stack:
docker compose up --build
  1. Open the app: http://localhost:3000

Local Dev (without Docker)

MCP Server

cd mcp_server
python -m venv .venv
.\.venv\Scripts\activate
pip install -r requirements.txt
uvicorn app:app --reload --port 7000

Orchestrator

cd orchestrator
npm install
$env:MCP_URL="http://localhost:7000"
$env:MONGO_URI="mongodb://localhost:27017"
$env:GEMINI_API_KEY="your_key_here"
npm run dev

Frontend

cd frontend
npm install
$env:NEXT_PUBLIC_ORCHESTRATOR_URL="http://localhost:4000"
npm run dev

Demo Script

Use the built-in demo shortlist button in the UI, or call the API directly:

curl -X POST http://localhost:4000/api/analyze \
  -H "Content-Type: application/json" \
  -d @data/sample/seed_demo.json

Optional: seed MongoDB with the same demo shortlist:

pip install pymongo
python data/seed_mongo.py

MCP Tools (JSON I/O)

  • crime_summary(lat, lon, radius_m, window_days)
    • returns {counts_by_type, rate_hint, trend_hint, source, updated_at}
  • commute_proxy(lat, lon, campus_lat, campus_lon)
    • returns {distance_km, est_minutes, near_transit_hint, source}
  • nearby_pois(lat, lon, categories, radius_m)
    • returns {results:[{name, category, dist_m}], counts_by_category, source}

Snowflake Setup

SQL scripts live in data/snowflake/:

  • create_tables.sql
  • load_sample.sql

Set these env vars for Snowflake access (MCP server):

SNOWFLAKE_ACCOUNT
SNOWFLAKE_USER
SNOWFLAKE_PASSWORD
SNOWFLAKE_WAREHOUSE
SNOWFLAKE_DATABASE
SNOWFLAKE_SCHEMA
SNOWFLAKE_ROLE (optional)

MongoDB Collections

  • shortlists
  • analysis_cache
  • analysis_runs

Notes & Safety

  • This MVP reports “higher/lower incident density” based on available open data only.
  • Crime locations in the demo data are approximate; treat results as indicative.
  • Agent outputs are validated JSON with retries; deterministic fallbacks run if Gemini is unavailable.

About

RentScope is a production-style, map-first housing intelligence system using multi-agent AI, MCP tooling, and real public data to deliver explainable neighbourhood rankings for students.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors