

๐๏ธ I built VenueFlow AI โ real-time crowd intelligence for 100,000+ capacity stadiums.
Built for the Google Build with AI program. Here's what's under the hood:
โก The Core Problem
How do you route 105,000 fans to the right gate โ instantly, without chaos?
๐ง The Solution: Min-Heap Priority Queue
Instead of brute-forcing every gate option, I implemented a composite scoring algorithm:
score = queue_length / throughput + ฮฑ ยท distance
โ O(N + k log N) time complexity
โ Each routing query: ~O(log 20) โ constant time
โ Full rebalance of 105K users: ~450,000 ops in < 50ms
That's not a guess โ that's math.
๐๏ธ Full-Stack, Production-Grade
โข Python Flask + WebSockets backend
โข React 19 + Tailwind CSS 4 frontend
โข Google Gemini AI for the fan assistant & crowd context
โข Dual persistence: Redis โ falls back to local JSON automatically
โข Google Maps API with Haversine fallback for zero-downtime routing
๐ค AI-Powered
Every chat query injects live crowd context into Gemini โ so fans get answers that actually reflect what's happening in the venue right now.
๐ The UX Insight
I used cardinal directions (N/S/E/W) as spatial anchors โ because fans already think this way inside a circular stadium. Reduced time-to-decision without a single extra click.
Building this taught me that the right data structure isn't a detail โ it's the whole product.
link : https://venueflow-service-1015826998904.us-central1.run.app/
Top comments (0)