DEV Community

Cover image for VenueFlow AI
Shoaib Khan
Shoaib Khan

Posted on

VenueFlow AI



 ๐ŸŸ๏ธ 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)