Skip to content

Jan1827/StadiumGenie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏟️ StadiumGenie – AI Smart Stadium Assistant

Hackathon Node.js JavaScript OpenRouter AI License

πŸ€– Your Smart Companion for a Seamless Stadium Experience

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.


πŸ“‘ Table of Contents


πŸ“– Project Overview

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.


❗ Problem Statement

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.


πŸ’‘ Solution

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.


🌟 Key Highlights

  • πŸ€– 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

🎯 Objectives

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

πŸ‘₯ Target Users

  • Football Fans
  • Stadium Visitors
  • Families
  • Tourists
  • Event Organizers
  • Volunteers
  • Security Personnel
  • Emergency Response Teams

✨ Features

🏠 Smart Dashboard

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

πŸ€– AI Chatbot

The AI chatbot enables users to ask stadium-related questions in natural language.

Capabilities

  • 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.


🎀 Voice Assistant

StadiumGenie supports voice-based interaction.

Features

  • 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.


πŸ—ΊοΈ Interactive Stadium Map

The stadium map helps visitors navigate easily.

Includes

  • 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.


πŸš— Smart Parking Finder

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

πŸ” Food Court Locator

Helps visitors discover nearby food options.

Available information includes:

  • Food Court A
  • Food Court B
  • Snacks
  • Beverages
  • Fast Food
  • Seating Areas

πŸš‘ Emergency Assistance

Provides immediate access to important emergency information.

Includes:

  • Medical Center
  • First Aid
  • Emergency Contacts
  • Exit Guidance
  • Safety Instructions

πŸ“… Match Schedule

Displays important match information such as:

  • Match Name
  • Kick-off Time
  • Venue Information
  • Schedule Overview

β™Ώ Accessibility Support

Designed to improve accessibility for every visitor.

Features include:

  • Wheelchair-accessible entrances
  • Elevator information
  • Accessible routes
  • Voice interaction
  • Clear navigation

πŸ€– AI Integration

StadiumGenie uses OpenRouter AI to provide intelligent responses to user queries.

AI Workflow

User
   β”‚
   β–Ό
Frontend (HTML + CSS + JavaScript)
   β”‚
POST /chat
   β”‚
Node.js + Express Server
   β”‚
OpenRouter AI API
   β”‚
AI Response
   β”‚
Displayed to User

AI Features

  • Natural Language Understanding
  • Intelligent Question Answering
  • Context-aware Responses
  • Stadium Information Assistance
  • Voice Interaction Support

Local Knowledge Base

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.


πŸ—οΈ System Architecture

                    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

πŸ’» Technology Stack

Frontend

  • HTML5
  • CSS3
  • JavaScript (ES6)

Backend

  • Node.js
  • Express.js

AI

  • OpenRouter API
  • Large Language Model (LLM)

Security

  • Helmet
  • Express Rate Limit
  • Input Validation
  • Request Size Limiting
  • API Timeout Handling

Testing

  • Jest
  • Supertest

Tools

  • Visual Studio Code
  • Git
  • GitHub
  • Postman

πŸ“‚ Project Structure

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

βš™οΈ Core Functionalities

βœ” 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


πŸš€ Installation

Follow these steps to run StadiumGenie locally.

1️⃣ Clone the Repository

git clone https://github.com/Jan1827/StadiumGenie.git
cd StadiumGenie

2️⃣ Install Dependencies

npm install

3️⃣ Configure Environment Variables

Create a .env file in the project root.

OPENROUTER_API_KEY=your_openrouter_api_key
PORT=3000

⚠️ Never commit your .env file to GitHub.


4️⃣ Start the Server

node server.js

or

npm start

5️⃣ Open the Application

Visit:

http://localhost:3000

The application will automatically load the dashboard page.


πŸ”‘ Environment Variables

Variable Description
OPENROUTER_API_KEY OpenRouter API Key
PORT Server Port

πŸ“‘ API Documentation

POST /chat

Handles user queries and returns AI-generated responses.

Request

{
  "message": "Where is Gate 4?"
}

Successful Response

{
  "reply": "Gate 4 is located on the west side of the stadium near Food Court B."
}

Error Response

{
  "reply": "Sorry, I couldn't process your request."
}

πŸ”’ Security Features

Security was an important consideration during development. The backend includes several protections to improve reliability and reduce common web vulnerabilities.

πŸ›‘οΈ Helmet

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


🚦 Rate Limiting

The /chat endpoint is protected using express-rate-limit.

Benefits:

  • Prevents API abuse
  • Limits excessive requests
  • Helps reduce spam
  • Protects backend resources

πŸ“¦ Request Size Limiting

Incoming JSON payloads are limited to prevent excessively large requests.

express.json({
    limit: "20kb"
});

βœ… Input Validation

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.


⏱ API Timeout Handling

Requests to the AI service use timeout handling to avoid hanging requests.

Benefits:

  • Faster error recovery
  • Better user experience
  • Prevents long waits

🌐 Secure CORS Configuration

The backend uses controlled CORS settings to allow only required HTTP methods and improve request handling.


🧹 Safe Error Handling

Unexpected errors are handled gracefully without exposing sensitive server information.


πŸ§ͺ Testing

The backend was tested using Jest and Supertest.

Test Coverage

The project includes automated tests for:

  • Chat API endpoint
  • Input validation
  • Error handling
  • Intent detection
  • Utility functions
  • Response generation

Running Tests

npm test

Testing Tools

  • Jest
  • Supertest

Test Results

βœ” 6 Test Suites

βœ” 15 Tests Passed

βœ” No Failing Tests

βœ” Stable Backend


⚑ Performance Improvements

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

πŸ“Έ Screenshots

🏠 Home Page

Home 1 Home 2 Home 3
Home 1 Home 2 Home 3

πŸ“Š Dashboard

Dashboard 1 Dashboard 2
Dashboard 1 Dashboard 2

πŸ€– AI Chatbot

AI Chatbot


πŸ—ΊοΈ Interactive Stadium Map

Map 1 Map 2 Map 3
Map 1 Map 2 Map 3

πŸš— Smart Parking Finder

Parking 1 Parking 2
Parking 1 Parking 2

πŸ” Food Court Finder

Food 1 Food 2
Food 1 Food 2

πŸš‘ Emergency Assistance

Emergency 1 Emergency 2
Emergency 1 Emergency 2

πŸ“… Match Schedule

Schedule 1 Schedule 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

🚧 Challenges Faced

During the development of StadiumGenie, several technical challenges were encountered and successfully addressed.

AI Integration

  • Integrated the OpenRouter API for AI-powered responses.
  • Implemented fallback handling to ensure the chatbot remains functional if the AI service is unavailable.

Voice Interaction

  • Added Speech Recognition for voice input.
  • Implemented Text-to-Speech to provide spoken responses.

Secure Backend

  • Secured the backend using Helmet.
  • Protected the /chat endpoint with express-rate-limit.
  • Added input validation and request size limits.
  • Implemented timeout handling for external API requests.

Testing

  • Wrote automated backend tests using Jest and Supertest.
  • Verified API functionality, utility functions, and error handling.
  • Achieved successful execution of all test cases.

🌍 Real-World Applications

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

πŸ“Š Project Highlights

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

Objective

Develop an AI-powered assistant that enhances the experience of visitors attending large sporting events by providing intelligent assistance, navigation, and accessibility support.

How StadiumGenie Meets the Objective

  • βœ” 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

πŸ’‘ Key Learnings

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

πŸš€ Future Enhancements

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

πŸ‘©β€πŸ’» Developer

Janhavi Ojha

Java Developer | Web Developer | AI Enthusiast

Skills

  • Java
  • JavaScript
  • HTML5
  • CSS3
  • Node.js
  • Express.js
  • REST APIs
  • Git & GitHub
  • Generative AI

🀝 Contributing

Contributions are welcome!

  1. Fork the repository.
  2. Create a new feature branch.
  3. Commit your changes.
  4. Push the branch.
  5. Open a Pull Request.

πŸ“„ License

This project is licensed under the MIT License.

You are free to use, modify, and distribute this project in accordance with the license terms.


⭐ Support

If you found this project useful, consider giving it a ⭐ on GitHub.

Your support helps motivate further development and improvements.


🏟️ StadiumGenie

AI Smart Stadium Assistant

Making Stadium Experiences Smarter, Safer, and More Connected.

⭐ Thank you for visiting this repository! ⭐

About

I-powered Smart Stadium Assistant for FIFA World Cup 2026 featuring chatbot, interactive map, parking finder, food finder, emergency assistance, and live match schedule.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors