Projects
INN-SIGHT preview
Hack the 6ix 2026 - MLH Best Use of Gemini API

INN-SIGHT

An AI feasibility consultant for short-term-rental development: drop a hotel or homestay onto a real Toronto parcel, stress-test it against a year of extreme-weather weekends, and get an investor-grade memo where every number is source-linked, backed by a deterministic simulation core that a six-specialist Gemini briefing only narrates.

The Problem

Deciding what to build on a given lot, a boutique hotel or a six-room homestay, concrete or mass timber, gas heat or heat pumps, is a slow, expensive, consultant-driven feasibility question whose answer flips with building size, structural system, climate stress, and local zoning. INN-SIGHT compresses that into an interactive tool: place a development on a real Toronto parcel, toggle its design, stress-test it against extreme-weather weekends, and get an investor-style memo with construction cost, annual energy cost, and lifetime carbon, each number source-linked, plus a zoning and building-code compliance overlay showing what you are actually allowed to build there, not just what you should.

My Role

Full-stack and AI engineer on a team of 3 and the top committer (54 of 92 commits): built the deterministic simulation model and its sourced benchmark library and the server-side Auth0 JWT verification, and worked across the Next.js frontend and the FastAPI service. Teammates led the Gemini agent orchestration and the MapLibre and Three.js building layer.

The Approach

  • Split the system across a hard determinism boundary: a pure, dependency-light Python model library maps (BuildingConfig, StressScenario) to an OptionResult with no randomness and no wall clock, so the memo's numbers are byte-for-byte reproducible; a FastAPI service wraps it; and a thin Next.js client renders it. The numbers in the memo never depend on a live service being up.
  • The team's six-specialist Gemini briefing (market, environment, neighbourhood, green-ratio, friction, and compliance) runs in parallel and is merged by a synthesiser 'boss', while the deterministic simulation stays the source of truth for every A/B number the memo reports.
  • A parametric Three.js building renders in true geographic metre-space on the real parcel polygon over a MapLibre satellite base, with neighbouring OpenStreetMap footprints extruded at tagged heights and empty lots found live through the OSM Overpass API.
  • Ran a year-pack stress matrix of five scenarios in parallel under hard time budgets (live pulls capped at 9 seconds, the Open-Meteo ERA5 climate archive at 8, the whole run at 50), falling back to a labelled deterministic fast mode so the stress button can never hang.
  • Enforced an honesty-first data layer: every constant is a Benchmark record carrying a source URL or an explicit estimate flag, so there are no orphan numbers anywhere in the product, surfaced to the user as a real-versus-simulated ledger.
  • Every network integration sits behind a feature flag so the core loop runs with no API keys at all, identical runs are fingerprint-cached in MongoDB Atlas so Gemini is never re-billed, and Auth0 RS256 JWTs are verified server-side rather than gating only the UI.

Key Decisions

  • A deterministic core behind a hard network boundary was the central architectural bet: the simulation is a pure function library, so the memo stays reproducible and the live demo survives a dead API or a missing key, the opposite of a typical hackathon build that collapses the moment a service rate-limits.
  • Gemini narrates, it never calculates. The model runs at temperature 0.2 with a strict JSON response schema and a deterministic fallback provider that returns valid empty schemas, so a missing key degrades only the prose while the computed A/B numbers are untouched, and a semaphore caps concurrency to protect the credit budget.
  • Every number carries a source or an ESTIMATE flag. Making that a data-model invariant, a Benchmark record fact-checked against primary sources during the build, rather than a convention, is what lets the memo footnote itself and makes the 'investor-grade' claim honest.
  • The headline result is pinned by a test: a boutique hotel must recommend the mass-timber-and-heat-pump option and a 6-room homestay must recommend against it for the same swap, so the demo's money moment cannot silently regress.
  • The compliance overlay is deliberately a transparent side-by-side of zoning and building-code heuristics, explicitly not a pass/fail permit gate, because overstating legal certainty would be the easiest way to make the whole tool untrustworthy.

Impact & Results

  • Won MLH Best Use of Gemini API at Hack the 6ix 2026 on a team of 3.
  • The recommendation flips on real economics: for an 80-room hotel, switching to mass timber and heat pumps abates carbon at $156 per tonne over a 60-year life, under Canada's $170-per-tonne federal benchmark, so the memo recommends it and emissions drop from 298 to 170 tCO2e a year; for a 6-room homestay the same swap is $358 per tonne, fails the bar, and the memo says build concrete.
  • 63 benchmark constants back every number, each carrying a live source URL or an explicit estimate flag, enforced by the data model so no figure in the memo is unsourced.
  • 62 pytest cases lock the behaviour, including the flip test that pins the headline recommendation, with the heat-wave scenario anchored on Toronto's real 36.2C heat event of July 2026; generated hotel load curves were checked against a metered full-service hotel study, landing the overnight trough at 66% of peak, inside the published 44-67% band.
  • Green AI that audits itself: each memo meters and prints its own Gemini footprint, roughly 0.5 gCO2e per analysis, kept small by fingerprint caching in MongoDB (identical runs are never re-billed) and by letting the model narrate pre-computed numbers instead of doing arithmetic.

The Stack

GeminiFastAPIPythonPydanticShapelyNext.js 15React 19TypeScriptMapLibre GLThree.jsPixi.jsMongoDB AtlasAuth0OpenStreetMap OverpassOpen-Meteo ERA5Electricity MapsStay22ElevenLabs

What I Learned

  • When reality contradicts the green narrative, the honest fix is better economics, not fudged numbers. Heat pumps don't pay back on Ontario bills, so we reframed the call as dollars per tonne abated against the federal benchmark, which let the tool recommend timber truthfully where it earns it.
  • A recommendation engine earns trust by being willing to refuse: the homestay flipping to concrete became our single most persuasive proof point.
  • Determinism is a demo asset. A hard network boundary, fingerprint caching, and a labelled deterministic fast mode are what keep a live multi-agent demo reliable through a 50-second cold start and on-stage time pressure.