Inspiration

Finding the right neighborhood in Cape Town is overwhelming. With diverse areas, varying safety levels, and dramatic price differences, residents need intelligent tools beyond basic property filters. Traditional search tools lack the contextual intelligence people need for life-changing housing decisions.

I was inspired to create Cape Town Insights after recognizing that scattered urban data - crime statistics, school locations, transport routes, healthcare facilities - could be unified through AI to provide comprehensive neighborhood intelligence.

What it does

Cape Town Insights is an AI-powered urban analytics platform that transforms how people discover Cape Town neighborhoods using 6 real public datasets and MongoDB Atlas Vector Search.

Core Features:

  • AI-Powered Chat: Natural language queries like "Find safe, family-friendly areas under R25,000 with good schools"
  • Vector Search: MongoDB Atlas semantic neighborhood matching using 768-dimension embeddings
  • Comprehensive Market Insights: Real-time analysis across 8,000+ data points from 6 databases
  • Interactive Mapping: Geospatial visualization with neighborhood boundaries and infrastructure overlay
  • Smart Comparisons: Side-by-side analysis with AI-generated recommendations

Real Data Integration:

  • 🎓 1,479 Cape Town Schools with geospatial data
  • 🏥 41 Public Hospitals with classifications and services
  • 🚌 1,466 Taxi Routes for transport connectivity
  • 🛡️ 6,568 Crime Incidents for safety scoring
  • 🏠 18 Neighborhoods with demographics and housing
  • 💰 86 Rental Properties with market trends

How we built it

MongoDB Atlas Integration:

  • Vector Search: 768-dimension embeddings with cosine similarity for neighborhood matching
  • Geospatial Indexing: $near queries for location-based searches
  • Complex Aggregations: Multi-stage pipelines for real-time analytics across 6 collections
  • Atlas Search: Combined text and vector search for natural language querying

Google Cloud Services:

  • Cloud Run: Containerized deployment for scalable backend
  • Gemini AI: Natural language processing via Google AI Studio API
  • Cloud Build: Automated CI/CD pipeline

Application Stack:

  • Frontend: React.js with TypeScript, Material-UI
  • Backend: Node.js with Express.js RESTful API
  • Maps: Google Maps JavaScript API for geospatial visualization
  • State Management: React Query for efficient data fetching

Key Technical Achievements:

  • MongoDB Vector Search with semantic neighborhood similarity
  • Real-time AI analysis across 6 databases simultaneously
  • Geospatial queries for infrastructure proximity analysis
  • Production deployment with automated CI/CD

Challenges we ran into

MongoDB Vector Search Implementation: Setting up Atlas vector search indexes and optimizing 768-dimension embeddings for neighborhood characteristics required deep understanding of semantic similarity.

Multi-Database Analytics: Coordinating real-time analysis across 6 different collections (schools, hospitals, crime, transport, rentals, neighborhoods) while maintaining sub-second response times.

Geospatial Data Complexity: Implementing accurate $near queries for proximity calculations and polygon boundary visualization for Cape Town suburbs.

AI Context Awareness: Fine-tuning Gemini prompts to provide locally-relevant responses using comprehensive urban data from all databases.

Data Integration Scale: Processing and analyzing 8,000+ data points from diverse public datasets while maintaining data accuracy and consistency.

Accomplishments that we're proud of

Perfect MongoDB Challenge Alignment: Successfully integrated 6 public datasets with MongoDB Vector Search and Google Cloud AI to help users understand urban data.

Advanced Atlas Features: Implemented Vector Search, geospatial indexing, and complex aggregations in production.

Real Data Scale: 8,000+ verified data points from authentic Cape Town public datasets.

Production Deployment: Full Google Cloud Run deployment with automated CI/CD pipeline.

AI-Powered Insights: Gemini AI generates comprehensive analysis across all 6 databases simultaneously.

What we learned

MongoDB Atlas Mastery: Deep understanding of Vector Search capabilities, geospatial queries, and aggregation pipelines for real-time urban analytics.

AI Integration: How to effectively combine Google Gemini AI with MongoDB data for contextual, location-aware responses.

Urban Data Patterns: Discovered correlations between crime data, infrastructure density, and neighborhood livability through comprehensive analysis.

Google Cloud Ecosystem: Hands-on experience with Cloud Run, AI Studio API, and automated deployment pipelines.

Scalable Architecture: Building systems that handle complex multi-database queries while maintaining performance.

What's next for Cape Town Insights

Multi-City Expansion: Framework designed for easy replication to Johannesburg, Durban, and other South African cities.

Enhanced AI Features: Predictive analytics for property value trends and market forecasting using historical data patterns.

Real-time Data Integration: API connections for live crime, transport, and market data updates.

Advanced Analytics: Custom ML models for investment potential scoring and neighborhood growth predictions.

Mobile Application: Native iOS/Android apps for location-based neighborhood discovery.

Community Features: User reviews, photos, and crowd-sourced neighborhood insights integration.

Built With

Share this project:

Updates