Large-scale sporting venues often struggle with one persistent problem: long queues and inefficient crowd distribution.
This project was developed using AntiGravity, leveraging AI-assisted engineering to rapidly design, iterate, and deploy a full-stack solution.
From food stalls to entry gates, attendees spend unnecessary time waiting โ not because capacity is insufficient, but because demand is unevenly distributed.
To tackle this, I built an AI-powered Adaptive Queue System that replaces physical queues with a dynamic, intelligent system.
๐ง The Idea
Instead of standing in line, users:
Join a virtual queue
Get assigned to the optimal service point
Receive updates on wait time and movement
The system continuously optimizes crowd flow in real time.
Think of it as a queue optimization engine, not just a ticketing system.
โ๏ธ Tech Stack
MERN Stack
MongoDB โ data persistence
Express.js โ backend APIs
React โ frontend UI
Node.js โ server runtime
Firebase
Real-time capabilities
Push notifications
Google Cloud Run
Backend deployment
Scalable containerized environment
๐๏ธ System Architecture
Backend (Node + Express)
REST APIs for:
Event management
Queue operations
Authentication
Core logic:
Queue position assignment
Wait time estimation
Load balancing across stalls
Frontend (React)
User interface for:
Viewing events
Joining queues
Tracking queue status
Cloud Infrastructure
Backend deployed on Google Cloud Run
MongoDB hosted remotely (Atlas)
Firebase for real-time extensions
๐ How It Works
- Event Creation
Admins create events with:
- Joining the Queue
Users:
Select an event
Join a virtual queue
System:
Assigns queue position
Stores data in MongoDB
- Intelligent Queue Handling
The system:
Tracks queue length per stall
Estimates wait time
Can dynamically reroute users
โ๏ธ Deployment (Google Cloud Run)
One of the most interesting parts was deploying the backend using Cloud Run.
Key challenges solved:
Handling environment variables (MongoDB URI, JWT)
Ensuring server listens on process.env.PORT
Fixing build issues (package-lock.json sync)
๐ What Makes This โAI-Poweredโ?
Instead of static queues, the system uses:
Dynamic scoring logic
Real-time queue balancing
Intelligent stall assignment
Example concept:
Score = QueueLength ร AvgServiceTime
Lower score โ better stall
๐ Results
Eliminates physical queues
Reduces waiting time
Improves crowd distribution
Scales easily using cloud infrastructure
๐ฎ Future Enhancements
Real-time Firebase sync
Indoor navigation
Predictive wait time using historical

data
Admin analytics dashboard
๐ฏ Final Thoughts
This project highlights how simple intelligence + good system design can solve real-world problems at scale.
Itโs not just about managing queues โ itโs about optimizing human movement in constrained environments.

Top comments (0)