An AI-powered web application designed to improve the experience of spectators attending live sporting events. StadiumGenie helps visitors navigate the stadium, locate facilities, discover food courts, find parking, receive emergency guidance, and interact with an AI chatbot using both text and voice.
- Project Overview
- Problem Statement
- Solution
- Key Highlights
- Features
- AI Integration
- System Architecture
- Technology Stack
- Project Structure
- Installation
- Environment Variables
- API Documentation
- Security Features
- Testing
- Accessibility
- Screenshots
- Future Enhancements
- Hackathon Submission
- Developer
- License
Large sporting events such as the FIFA World Cup attract thousands of spectators. Visitors often struggle with:
- Finding stadium gates
- Locating food courts
- Finding restrooms
- Parking guidance
- Emergency assistance
- Match information
- Accessibility support
StadiumGenie is an AI-powered stadium assistant that solves these problems through an intuitive web application powered by Generative AI.
The application combines modern web technologies with AI to provide fast, interactive, and intelligent assistance for visitors.
Visitors attending major sporting events frequently experience:
- Confusion while navigating inside large stadiums
- Difficulty locating important facilities
- Long queues due to lack of guidance
- Delayed responses during emergencies
- Lack of real-time assistance
- Accessibility challenges for differently-abled visitors
Traditional static maps are difficult to use and cannot answer user-specific questions.
StadiumGenie provides a centralized AI-powered assistant capable of:
- Answering stadium-related questions
- Providing navigation assistance
- Locating parking zones
- Finding food courts
- Guiding users to emergency facilities
- Supporting voice interaction
- Offering quick access to important match information
The system uses OpenRouter's Large Language Model to generate intelligent responses while also supporting a local knowledge base as a fallback for stadium-specific information.
- π€ AI-powered chatbot
- π€ Voice input support
- π Text-to-Speech responses
- πΊοΈ Interactive stadium map
- π Smart parking finder
- π Food court locator
- π Emergency assistance
- π Match schedule
- π Stadium navigation
- βΏ Accessibility information
- π Secure backend
- β‘ Fast API responses
- π± Responsive user interface
The primary objectives of StadiumGenie are:
- Improve visitor experience
- Reduce navigation confusion
- Provide AI-powered assistance
- Improve accessibility
- Support emergency situations
- Reduce waiting time for information
- Enhance fan engagement during events
- Football Fans
- Stadium Visitors
- Families
- Tourists
- Event Organizers
- Volunteers
- Security Personnel
- Emergency Response Teams
The dashboard serves as the central hub of StadiumGenie and provides users with:
- Live match information
- Weather updates
- Stadium overview
- Quick navigation cards
- Access to all major services
- Responsive and modern interface
The AI chatbot enables users to ask stadium-related questions in natural language.
- Stadium navigation
- Gate information
- Parking guidance
- Food court locations
- Restroom locations
- Emergency assistance
- Accessibility information
- Match-related queries
- General visitor assistance
The chatbot responds instantly using Generative AI while also supporting predefined stadium knowledge for reliable answers.
StadiumGenie supports voice-based interaction.
- Speech-to-Text
- Text-to-Speech
- Hands-free interaction
- AI-generated spoken responses
- Improved accessibility
Users can simply press the microphone button, ask a question, and receive both text and spoken responses.
The stadium map helps visitors navigate easily.
- Stadium Gates
- Parking Zones
- Food Courts
- Restrooms
- Medical Center
- Metro Station
- Wheelchair Access
- VIP Lounge
- Team Store
Interactive hotspots allow users to quickly locate important facilities.
Visitors can quickly identify available parking areas.
Features include:
- Parking Zone A
- Parking Zone B
- Recommended parking based on stadium entrance
- Parking guidance
- Easy navigation
Helps visitors discover nearby food options.
Available information includes:
- Food Court A
- Food Court B
- Snacks
- Beverages
- Fast Food
- Seating Areas
Provides immediate access to important emergency information.
Includes:
- Medical Center
- First Aid
- Emergency Contacts
- Exit Guidance
- Safety Instructions
Displays important match information such as:
- Match Name
- Kick-off Time
- Venue Information
- Schedule Overview
Designed to improve accessibility for every visitor.
Features include:
- Wheelchair-accessible entrances
- Elevator information
- Accessible routes
- Voice interaction
- Clear navigation
StadiumGenie uses OpenRouter AI to provide intelligent responses to user queries.
User
β
βΌ
Frontend (HTML + CSS + JavaScript)
β
POST /chat
β
Node.js + Express Server
β
OpenRouter AI API
β
AI Response
β
Displayed to User
- Natural Language Understanding
- Intelligent Question Answering
- Context-aware Responses
- Stadium Information Assistance
- Voice Interaction Support
To improve reliability, StadiumGenie also includes a local knowledge base containing predefined information such as:
- Gates
- Parking
- Food Courts
- Medical Centers
- Restrooms
- Wheelchair Access
- Metro Station
If AI services are unavailable, the application can still answer common stadium-related questions using local data.
User
β
βΌ
StadiumGenie Frontend
HTML β’ CSS β’ JavaScript
β
Fetch API (POST)
β
βΌ
Node.js + Express Server
β
βββββββββββββββββ΄ββββββββββββββββ
β β
βΌ βΌ
OpenRouter AI API Local Knowledge Base
β β
βββββββββββββββββ¬ββββββββββββββββ
βΌ
AI Response Returned
β
βΌ
Displayed to User
- HTML5
- CSS3
- JavaScript (ES6)
- Node.js
- Express.js
- OpenRouter API
- Large Language Model (LLM)
- Helmet
- Express Rate Limit
- Input Validation
- Request Size Limiting
- API Timeout Handling
- Jest
- Supertest
- Visual Studio Code
- Git
- GitHub
- Postman
StadiumGenie/
β
βββ img/
β
βββ public/
β βββ dashboard.html
β βββ chatbot.html
β βββ map.html
β βββ parking.html
β βββ food.html
β βββ emergency.html
β βββ schedule.html
β βββ styles.css
β βββ script.js
β
βββ tests/
β βββ server.test.js
β
βββ server.js
βββ package.json
βββ package-lock.json
βββ .env
βββ .gitignore
βββ README.md
β AI Chatbot
β Voice Assistant
β Stadium Navigation
β Interactive Map
β Smart Parking
β Food Court Locator
β Emergency Assistance
β Match Schedule
β Accessibility Support
β Secure Backend
β API Integration
β Responsive Design
Follow these steps to run StadiumGenie locally.
git clone https://github.com/Jan1827/StadiumGenie.git
cd StadiumGenienpm installCreate a .env file in the project root.
OPENROUTER_API_KEY=your_openrouter_api_key
PORT=3000
β οΈ Never commit your.envfile to GitHub.
node server.jsor
npm startVisit:
http://localhost:3000
The application will automatically load the dashboard page.
| Variable | Description |
|---|---|
| OPENROUTER_API_KEY | OpenRouter API Key |
| PORT | Server Port |
Handles user queries and returns AI-generated responses.
{
"message": "Where is Gate 4?"
}{
"reply": "Gate 4 is located on the west side of the stadium near Food Court B."
}{
"reply": "Sorry, I couldn't process your request."
}Security was an important consideration during development. The backend includes several protections to improve reliability and reduce common web vulnerabilities.
Helmet is used to set secure HTTP headers and improve protection against common attacks.
β Secure HTTP headers
β Clickjacking protection
β MIME sniffing prevention
β Improved browser security
The /chat endpoint is protected using express-rate-limit.
Benefits:
- Prevents API abuse
- Limits excessive requests
- Helps reduce spam
- Protects backend resources
Incoming JSON payloads are limited to prevent excessively large requests.
express.json({
limit: "20kb"
});User messages are validated before processing.
Checks include:
- Valid string input
- Maximum message length
- Empty input handling
This helps prevent invalid requests and improves application stability.
Requests to the AI service use timeout handling to avoid hanging requests.
Benefits:
- Faster error recovery
- Better user experience
- Prevents long waits
The backend uses controlled CORS settings to allow only required HTTP methods and improve request handling.
Unexpected errors are handled gracefully without exposing sensitive server information.
The backend was tested using Jest and Supertest.
The project includes automated tests for:
- Chat API endpoint
- Input validation
- Error handling
- Intent detection
- Utility functions
- Response generation
npm test- Jest
- Supertest
β 6 Test Suites
β 15 Tests Passed
β No Failing Tests
β Stable Backend
Several optimizations were implemented to improve responsiveness and reliability.
- Fast API communication
- Lightweight frontend
- Efficient request handling
- Optimized local knowledge lookup
- Reduced unnecessary processing
- Graceful AI fallback mechanism
| Home 1 | Home 2 | Home 3 |
|---|---|---|
![]() |
![]() |
![]() |
| Dashboard 1 | Dashboard 2 |
|---|---|
![]() |
![]() |
| Map 1 | Map 2 | Map 3 |
|---|---|---|
![]() |
![]() |
![]() |
| Parking 1 | Parking 2 |
|---|---|
![]() |
![]() |
| Food 1 | Food 2 |
|---|---|
![]() |
![]() |
| Emergency 1 | Emergency 2 |
|---|---|
![]() |
![]() |
| Schedule 1 | Schedule 2 |
|---|---|
![]() |
![]() |
The project can be extended with additional smart features such as:
- Live crowd density monitoring
- Indoor GPS navigation
- Real-time parking availability
- Food ordering and seat delivery
- Live match statistics
- Ticket management
- Lost & Found assistance
- Multi-language AI support
- Push notifications
- Personalized recommendations
During the development of StadiumGenie, several technical challenges were encountered and successfully addressed.
- Integrated the OpenRouter API for AI-powered responses.
- Implemented fallback handling to ensure the chatbot remains functional if the AI service is unavailable.
- Added Speech Recognition for voice input.
- Implemented Text-to-Speech to provide spoken responses.
- Secured the backend using Helmet.
- Protected the
/chatendpoint with express-rate-limit. - Added input validation and request size limits.
- Implemented timeout handling for external API requests.
- Wrote automated backend tests using Jest and Supertest.
- Verified API functionality, utility functions, and error handling.
- Achieved successful execution of all test cases.
StadiumGenie can be adapted for various venues and events, including:
- π Sports Stadiums
- π΅ Concert Venues
- πͺ Festivals
- π University Campuses
- π Shopping Malls
- β Airports
- π Railway Stations
- π€ Convention Centers
- π Museums and Tourist Attractions
| Feature | Status |
|---|---|
| AI Chatbot | β |
| OpenRouter Integration | β |
| Voice Recognition | β |
| Text-to-Speech | β |
| Interactive Stadium Map | β |
| Parking Finder | β |
| Food Court Locator | β |
| Emergency Assistance | β |
| Match Schedule | β |
| Accessibility Support | β |
| Responsive Design | β |
| Express Backend | β |
| Secure API | β |
| Helmet Security | β |
| Rate Limiting | β |
| Input Validation | β |
| Timeout Handling | β |
| Jest Testing | β |
| Supertest Testing | β |
Challenge: Smart Stadiums & Tournament Operations
Develop an AI-powered assistant that enhances the experience of visitors attending large sporting events by providing intelligent assistance, navigation, and accessibility support.
- β AI-powered conversational assistance
- β Interactive stadium navigation
- β Voice-enabled interaction
- β Emergency support information
- β Smart parking guidance
- β Food court discovery
- β Accessibility-focused features
- β Secure and scalable backend architecture
This project provided practical experience with:
- Building full-stack web applications
- REST API development with Express.js
- Integrating Large Language Models (LLMs)
- Designing responsive user interfaces
- Backend security best practices
- Automated backend testing
- Error handling and validation
- Voice-enabled web applications
- Git and GitHub collaboration
Planned improvements include:
- π΄ Real-time stadium occupancy
- π° Indoor navigation
- π Live GPS tracking
- π Food ordering and seat delivery
- π Ticket management
- π Multi-language support
- π² Push notifications
- πΉ CCTV-based crowd analysis
- π Ώ Live parking availability
- π Analytics dashboard for organizers
Janhavi Ojha
Java Developer | Web Developer | AI Enthusiast
- Java
- JavaScript
- HTML5
- CSS3
- Node.js
- Express.js
- REST APIs
- Git & GitHub
- Generative AI
Contributions are welcome!
- Fork the repository.
- Create a new feature branch.
- Commit your changes.
- Push the branch.
- Open a Pull Request.
This project is licensed under the MIT License.
You are free to use, modify, and distribute this project in accordance with the license terms.
If you found this project useful, consider giving it a β on GitHub.
Your support helps motivate further development and improvements.
















