Building a Smart Parking App with AI Support & Real-Time Geolocation
Full-Stack Developer
Urban parking is a daily frustration — you can't know if a spot is available until you drive there. Tam Tam Park reimagines parking as a community-driven, AI-assisted experience. I built a hybrid mobile app that lets users discover nearby parking in real-time, shares private parking spaces, and includes an AI support agent that actually understands the product — because it's powered by RAG, not generic prompts.
The Urban Parking Problem
Finding parking in Indian cities is a daily time sink. There's no way to know if a spot is free without physically driving there. Private parking spaces sit empty while public spots are overcrowded. And existing parking apps are glorified maps with no real-time intelligence or community features.
No way to check parking availability without physically being there
Private parking spaces are underutilized while public spots are overcrowded
Existing solutions lack real-time data — they show static listings, not live availability
Support queries about parking rules, pricing, and features overwhelm small teams
Native app development for both iOS and Android doubles development cost
Real-Time Intelligence + AI Support + Hybrid Delivery
Three architectural bets: (1) GeoFire geohash indexing for efficient proximity queries on Firestore, (2) RAG-based AI support that answers from actual product documentation, and (3) Next.js static export + Capacitor for a single codebase deployed to web, iOS, and Android.
GeoFire Proximity Engine
Firebase Firestore doesn't support native geo queries. GeoFire adds geohash indexing on top, enabling 'find parking within 2km' queries that scale without scanning every document — reducing read costs by 85%.
RAG-Powered AI Agent (TAMI)
Generated embeddings from support documentation via a script, stored them in Firestore. User queries are matched via cosine similarity, then sent to Google Gemini with relevant context — producing accurate, grounded responses instead of hallucinations.
Real-Time Firestore Channels
4 concurrent onSnapshot listeners for different data streams (availability, bookings, user state, notifications). Sub-second propagation means the UI always reflects current state.
Capacitor Native Bridge
Next.js static export wraps into native iOS/Android shells via Capacitor 6. Native features (push notifications, AdMob, camera) accessed through Capacitor plugins without maintaining separate native codebases.
System Architecture
Interactive architecture map — click any node to trace its connections.
Data Flows (click a node to filter)
From Web App to Native Platform
The project evolved from a web-only prototype to a full native mobile platform with AI capabilities — each phase building on the previous architecture.
Phase 1: Core Map & Discovery
Built the Google Maps integration with custom markers, GeoFire proximity search, and basic parking spot CRUD. Proved the real-time Firestore model worked for live availability updates.
Phase 2: Capacitor Native Delivery
Wrapped the Next.js static export in Capacitor shells. Added push notifications, AdMob for monetization, and phone authentication via Firebase Auth Capacitor plugin.
Phase 3: AI Support Agent
Built the RAG pipeline: document embedding generation script → Firestore vector storage → cosine similarity matching → Gemini context injection. Named the agent TAMI.
Phase 4: Community Features
Added private parking space sharing, timezone-aware scheduling (moment-timezone), image upload with react-easy-crop, and booking confirmation workflows.
A Smart Parking Ecosystem
The final platform is a complete parking ecosystem — discover, book, share, and get AI support — delivered as a native experience on iOS, Android, and web from a single codebase.
Real-time parking discovery within configurable radius using GeoFire geohash proximity queries
AI support agent (TAMI) powered by RAG with Vertex AI embeddings — answers from actual documentation, not generic prompts
Sub-second availability updates via 4 concurrent Firestore onSnapshot channels
Single codebase deployed to Web, iOS, and Android via Next.js + Capacitor
Community parking sharing with timezone-aware scheduling and booking confirmations
Smart Architecture, Real Savings
The architectural decisions — GeoFire indexing, RAG instead of fine-tuning, Capacitor instead of React Native — delivered measurable cost and performance benefits.
What I Took Away
“GeoFire is essential for Firebase geo queries”
Without geohash indexing, proximity queries on Firestore scan every document. GeoFire's indexing reduced read operations by 85% — the difference between a viable product and an unusable cost structure.
“RAG beats fine-tuning for support bots”
Fine-tuning a model on support docs is expensive and goes stale. RAG with embeddings means updating support responses is as simple as updating a document and re-running the embedding script.
“Capacitor's sweet spot is content + native features”
For apps that are primarily content/map-based with sprinkled native features (push, camera, GPS), Capacitor delivers 90% of native UX at 30% of the development cost. It wouldn't work for a camera-intensive app.
Tech Stack
Frontend
Native
Backend
Maps & Geo
AI
Building an AI-Powered Diagnostic Platform from Zero
Hairscope.ai • May 2024 – Present