-
-
Cambridge region interactive map
-
Waterloo-Kitchener region interactive map
-
Website homepage
-
Auth0 Signup Page
-
Information Gathering process for New Users
-
User Lifestyle Preference
-
Main Dashboard Page
-
Feature Display on the dashbaord page (1,2/3)
-
Feature Display on the dashbaord page (3/3) and User Info Display
-
Feature 1: Location Intelligence / Address Analysis Tool
-
Feature 1 Output Result: Livability Hexagon Representation
-
Feature 1 Output Result: Livability Breakdown
-
Feature 1 Output Result: Cost total and Breakdown
-
Feature 1 Output Result: Solana Interpretation and Further AI Analysis
-
Feature 2: Urban Cost Heatmap Zoomed out to the entire KWC region, displaying major malls in blue circles
-
Feature 2: Urban Cost Heatmap / Cost Density Map
-
Feature 2: Urban Cost Heatmap with Area Seleted and results displayed on the left sidebar
-
Feature 3: Neighbourhood Comparison Feature: Input Locations
-
Feature 3: Neighbourhood Comparison Feature: Output
-
Feature 3: Neighbourhood Comparison Feature: Output in Hexagon Display
-
Feature 3: Neighbourhood Comparison Feature: Output in more details
-
Feature 3: Neighbourhood Comparison Feature: Output in more details
LOO-K — Know the True Cost Before You Sign
Inspiration
Moving to a new city is one of the biggest financial decisions a young person makes — yet most people base it entirely on rent price alone. As students at the University of Waterloo, we watched friends sign leases based on a single number on Kijiji, only to discover hidden costs: long commutes eating into their time and money, expensive grocery options in the area, poor transit access, or noisy streets affecting their quality of life.
"The rent looks affordable — but what does it actually cost to live there?"
That question is what LOO-K was built to answer. We wanted to build a tool that gives renters and newcomers a complete, data-driven picture of any address — not just the monthly rent, but the true total cost of living, scored against real livability factors.
The name LOO-K is a nod to our home city of Waterloo — look before you lease.
What It Does
LOO-K is a full-stack neighbourhood intelligence platform with three core features:
1. Livability Report (Address Analysis)
Enter any address in the Waterloo-Kitchener region and receive an instant AI-powered report including:
- An overall livability score out of 10
- Per-category scores: commute, healthcare, parks & recreation, noise/pollution, groceries, and transit
- A true monthly cost estimate broken down by rent, commute, groceries, utilities, entertainment, and transport
- Pros and warnings specific to that location
- A natural-language AI summary powered by Gemini 2.5 Flash
- A Solana blockchain record of the livability score written on-chain as an immutable memo transaction
2. Urban Cost Heatmap
An interactive choropleth map of the Waterloo-Kitchener region where each zone is colour-coded by cost density and livability. Click any zone to explore the breakdown for that neighbourhood.
3. Neighbourhood Comparison
Select two addresses — via search autocomplete or by clicking directly on the map — and generate a side-by-side comparison including:
- Radar chart overlay of all livability factors
- Cost breakdown table with per-category winner chips
- Animated dual factor bars
- AI summaries and pros/warnings for each location
- An overall verdict declaring the better choice
How We Built It
Architecture Overview
$$ \text{User} \xrightarrow{\text{HTTPS}} \text{Frontend (HTML/CSS/JS)} \xrightarrow{\text{POST /api/cost-analysis}} \text{FastAPI Backend} \xrightarrow{} \begin{cases} \text{Gemini AI} \ \text{Google Maps API} \ \text{Solana Devnet} \end{cases} $$
Frontend
- Pure HTML, CSS, JavaScript — no frontend framework, intentionally lightweight for demo speed
- Google Maps JavaScript API with Places Autocomplete for address input and interactive map markers
- Chart.js for radar charts and data visualization
- Auth0 SPA SDK for user authentication and onboarding
- Dark-mode design system built from scratch with CSS custom properties, responsive grid layouts, and glassmorphism-lite card styling
Backend
- FastAPI (Python) serving a single
/api/cost-analysisendpoint - Cost estimates calculated from real regional data for the Waterloo-Kitchener area using coordinates and category weighting
- Gemini 2.5 Flash generates the AI livability analysis, pros/warnings, and natural-language summary with a constrained token budget for speed
- Async parallel execution using
asyncioto keep response times under 15 seconds
Blockchain Layer
- Solana Web3.py SDK writes each livability score to Solana Devnet as an immutable memo transaction
- A persistent keypair is stored server-side and auto-funded via the Devnet faucet airdrop
- Each analysis result includes a Solana Explorer link for on-chain verification
The livability score formula uses a weighted average:
$$ S_{\text{overall}} = \frac{\sum_{i=1}^{n} w_i \cdot s_i}{\sum_{i=1}^{n} w_i} $$
Where \( w_i \) is the category weight (commute weighted highest) and \( s_i \in [0, 10] \) is the per-factor score derived from proximity data and regional cost indices.
Challenges We Faced
1. Async performance with Gemini
The Gemini API calls were initially taking 25–30 seconds, making the app feel broken. We tuned max_output_tokens from 2048 down to 512 and set hard async timeouts, cutting response time to ~10–15 seconds.
2. Script loading race conditions
Adding defer to the Auth0 SDK scripts caused our inline boot() function to execute before the SDK loaded, silently breaking login. We diagnosed it by tracing the LookAuth is undefined error and fixed it by wrapping boot() in a DOMContentLoaded listener.
3. Solana wallet persistence
The Solana keypair was being regenerated on every server restart, making the wallet address and balance unpredictable. We implemented a file-based keypair cache (solana_wallet.json) and an auto-airdrop function to keep the wallet funded on Devnet without any manual steps.
4. URL path encoding across environments
Early in development, navigation links contained /Portal%20website/ (a URL-encoded folder name with spaces) causing widespread 404 errors across the app. We audited every navigation path and standardized all routes to /frontend/....
5. Google Maps tile loading blocking UX The map spinner on the address analysis page waited for all map tiles to finish loading before hiding — which could take 4–6 seconds on slow connections. We fixed it by detaching the spinner from tile load events entirely and hiding it immediately after the Maps API initializes.
What We Learned
- AI output quality vs. speed is a real trade-off. Smaller token budgets produce faster, punchier answers — often better for a UI card than a wall of text.
- Blockchain as a trust layer, not a core product. Writing a score to Solana adds a verifiable audit trail without changing the user experience at all.
- Auth flows are fragile. Browser caching of Auth0 tokens across sessions caused more debugging time than any backend issue.
- Performance is a feature. A beautiful UI means nothing if it takes 8 seconds to show the first pixel — deferred scripts, preconnect hints, and async calls matter.
- How to build a full product in a single hackathon sprint: backend API, AI integration, blockchain, auth, multiple frontend pages, and a polished design system.
What's Next
- [ ] Expand coverage beyond Waterloo-Kitchener to all major Canadian cities
- [ ] Pull real-time rental listing data via APIs (Rentals.ca, Kijiji)
- [ ] Add commute time calculator based on user's workplace address
- [ ] ElevenLabs voice readout — read the livability report aloud
- [ ] Export reports as PDF for sharing with roommates or family
- [ ] Mobile app using the same FastAPI backend
Built With
python fastapi gemini-ai solana google-maps-api auth0 chart.js javascript html css uvicorn
Built at Hack Canada 2026 — Waterloo, ON
Built With
- auth0
- blackboard.io
- css3
- github
- google-maps
- google-places
- html5
- javascript
- leaflet.js
- python



Log in or sign up for Devpost to join the conversation.