Version: 2.0
Status: β
Production Ready
Last Updated: December 2024
UrbanLenz is a comprehensive Canadian housing market intelligence platform providing 10-year historical analytics, AI-powered insights, and real-time data collection across 6 major cities and 99 neighborhoods.
π Live Application: https://urbanlenz-prod.web.app
π Landing Page: https://urbanlenz-prod.web.app/landing
π API Endpoint: https://urbanlenz-api-lizy7jaiza-uc.a.run.app
- Node.js 20.x or later
- npm or yarn
- gcloud CLI + Firebase CLI
# Clone and install
cd d:\dev\urbanLenz
npm install
# Terminal 1: Backend
cd backend
npm run dev # http://localhost:3001
# Terminal 2: Frontend
cd frontend
npm run dev # http://localhost:3000# Deploy backend
.\deploy-backend-prod.ps1
# Deploy frontend
.\deploy-frontend-prod.ps1
# Deploy agents
cd backend
firebase deploy --only functions --project=urbanlenz-prodSee QUICKSTART.md for detailed instructions
| Guide | Purpose |
|---|---|
| MASTER_DOCUMENTATION.md | Complete platform documentation |
| DEPLOYMENT_GUIDE.md | Deployment instructions (all environments) |
| QUICKSTART.md | Quick start guide |
| Guide | Purpose |
|---|---|
| AI_AGENTS_GUIDE.md | 20 AI agents - deployment & monitoring |
| UI_UX_GUIDE.md | Professional UI/UX enhancements |
| DATA_COLLECTION_GUIDE.md | Data sources & collection |
| Document | Purpose |
|---|---|
| ARCHITECTURE.md | Technical architecture |
| CHANGELOG.md | Version history |
| DESIGN_SYSTEM.md | UI design system |
| VALUE_STRATEGY.md | Product strategy |
- 40 Quarters of Data: Q1 2015 - Q4 2024
- Market Cycle Analysis: 5 complete phases
- 10-Year CAGR: Compound annual growth rates
- Interactive Charts: Timeline, cycles, comparisons
- Floating Interface: Always accessible
- Modal Design: Full-featured chat window
- Context-Aware: Knows city/neighborhood
- Smart Responses: GPT-4 powered
- 20 AI Agents: Operating 24/7
- 10+ Data Sources: 100% FREE
- Self-Healing: Multi-source fallback
- Cost: $7/month (vs $2,000 premium)
- 6 Cities: Toronto, Vancouver, Montreal, Calgary, Ottawa, Edmonton
- 99 Neighborhoods: Complete coverage
- 9,405 Data Points: Historical metrics
- 5 Market Cycles: Complete analysis
Frontend: Next.js 14 + React 18 + TypeScript + Tailwind CSS
Backend: Express + TypeScript + Firebase Functions
Database: Cloud Firestore + JSON files
Infrastructure: GCP + Firebase + Cloud Run
AI: OpenAI GPT-4 + 20 automated agents
| Environment | Backend URL | Frontend URL | Purpose |
|---|---|---|---|
| Local | localhost:3001 | localhost:3000 | Development |
| Dev | urbanlenz-api-dev-*.run.app | urbanlenz-dev.web.app | Testing |
| Staging | staging-url | urbanlenz-staging.web.app | Pre-production |
| Production | urbanlenz-api-lizy7jaiza-uc.a.run.app | urbanlenz-prod.web.app | Live |
| Metric | Status |
|---|---|
| Version | 2.0 |
| Cities | 6 (Toronto, Vancouver, Montreal, Calgary, Ottawa, Edmonton) |
| Neighborhoods | 99 with complete data |
| Historical Data | 40 quarters (10 years) |
| Data Points | 9,405 across all metrics |
| AI Agents | 20 deployed |
| Production | β Live |
| Monthly Cost | ~$70-100 |
- 10-year historical data (40 quarters)
- 6 cities, 99 neighborhoods
- 20 AI data collection agents
- Professional UI/UX redesign
- Floating AI assistant
- Production deployment
- Firebase Authentication
- Cloud Firestore integration
- Environment testing (local, staging, production)
- Custom domain configuration
- Additional data source integration
- Performance optimization
- Neighborhood comparison tools
- Investment portfolio tracking
- Email alerts for market changes
- PDF report generation
- Mobile app (React Native)
- Always Accessible: Fixed position button
- Professional Modal: Gradient design, smooth animations
- Full-Featured: Chat history, suggestions, PDF export
- Modern Hero: Dark gradient background, animated orbs
- Feature Grid: 6 cards with elegant hover effects
- Professional Typography: 60px headings, gradient text
- Colors: Sky blue gradients, dark slate backgrounds
- Typography: Inter font, 5 weight scales
- Spacing: 4px-64px scale
- Shadows: 4 levels with color glows
See UI_UX_GUIDE.md for details
Housing Data (8 agents):
- CMHC, StatCan, Municipal (3 cities), Census, Open Data, Smart Fetcher
Economic Data (2 agents):
- Bank of Canada, Economic Indicators
Sentiment Analysis (2 agents):
- News & Sentiment, Community Sentiment
AI Enhancement (4 agents):
- Data Validator, Smart Fetcher, Health Monitor, Quality Checker
Main API (1 agent):
- Express Server
Scheduled Versions (8 agents):
- Automated cron jobs for all core agents
# Deploy all 20 agents
cd backend
firebase deploy --only functions --project=urbanlenz-staging
# Test agent
Invoke-RestMethod -Uri "https://us-central1-urbanlenz-staging.cloudfunctions.net/cmhcAgent" -Method POSTSee AI_AGENTS_GUIDE.md for complete guide
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check |
| GET | /api/cities |
List all cities |
| GET | /api/cities/:id |
City details |
| GET | /api/cities/:id/neighborhoods |
Neighborhoods list |
| GET | /api/cities/:id/neighborhoods/:nid/metrics |
10-year metrics |
| GET | /api/cities/:id/neighborhoods/:nid/opportunity-score |
Opportunity score |
| POST | /api/chat |
AI chat interface |
| POST | /api/insights |
Generate insights |
# Get cities
Invoke-RestMethod -Uri "https://urbanlenz-api-lizy7jaiza-uc.a.run.app/api/cities"
# Get Toronto neighborhoods
Invoke-RestMethod -Uri "https://urbanlenz-api-lizy7jaiza-uc.a.run.app/api/cities/toronto/neighborhoods"
# Get Yorkville 10-year data
Invoke-RestMethod -Uri "https://urbanlenz-api-lizy7jaiza-uc.a.run.app/api/cities/toronto/neighborhoods/yorkville/metrics"Authentication: Firebase Authentication (Email/Password)
Authorization: Firebase ID token verification
Network: HTTPS only, CORS configured
Data Protection: Firestore security rules
Input Validation: Zod schemas
Secrets: Firebase Functions config
| Service | Cost |
|---|---|
| Cloud Functions | $0-10 (free tier covers most) |
| Cloud Run | $20-30 |
| Firestore | $5-10 |
| Firebase Hosting | $0 (free tier) |
| Firebase Auth | $0 (free tier) |
| AI Agents | $7-15 |
| OpenAI API | $5-10 (optional) |
| Total | $70-100/month |
Premium Data Alternatives: $2,000/month
UrbanLenz FREE Strategy: $7/month
Savings: $1,993/month (99.6% reduction!)
# Backend health
Invoke-RestMethod -Uri "http://localhost:3001/health"
# Frontend
# Open http://localhost:3000
# Test: City selection, AI assistant, authentication# Backend tests
cd backend
npm test
# Frontend build test
cd frontend
npm run buildcd backend
npm install
npm run build
npm run devcd frontend
npm install
rm -rf .next
npm run dev- Check
NEXT_PUBLIC_API_URLin.env.local - Ensure backend allows frontend domain
# Check function exists
firebase functions:list --project=urbanlenz-staging
# Redeploy
firebase deploy --only functions:cmhcAgent --project=urbanlenz-stagingSee DEPLOYMENT_GUIDE.md for comprehensive troubleshooting
v2.0 (December 2024):
- 10-year historical data (40 quarters)
- 20 AI data collection agents
- Professional UI/UX redesign
- 6 cities, 99 neighborhoods
v1.4.0 (November 2024):
- Firebase deployment
- Analytics integration
- Feedback system
v1.0.0 (Initial Release):
- 3 cities MVP
- Basic metrics
- Rule-based insights
See CHANGELOG.md for complete history
Areas where contributions are welcome:
- Data Integration: Connect additional data sources
- AI Enhancement: Improve LLM prompts and agents
- UI/UX: Mobile optimization, accessibility
- Testing: Unit tests, integration tests
- Documentation: Tutorials, API examples
- Documentation: See guides above
- Issues: Create GitHub issue
- Questions: Check inline code comments
This project is for demonstration and educational purposes. Modify as needed for your use case.
Built with β€οΈ for urban developers, investors, and municipalities seeking data-driven market intelligence.