SIH 2025 | Problem Statement ID: 25165
Submitted to: Government of Gujarat | Gujarat Council on Science & Technology (GUJCOST)
Temple & Pilgrimage Crowd Management (Somnath, Dwarka, Ambaji, Pavagadh)
Gujarat's sacred pilgrimage destinationsβSomnath, Dwarka, Ambaji, and Pavagadhβattract millions of devotees annually. During festivals and auspicious days, these sites face critical challenges:
- β Overcrowding & unsafe queue conditions
- β Traffic congestion & parking shortages
- β Emergency response delays
- β Poor communication & guidance systems
- β Inadequate accessibility for differently-abled pilgrims
DevYatra is a comprehensive AI-powered crowd management ecosystem that transforms the pilgrimage experience through technology while preserving spiritual sanctity.
- Real-time Crowd Density Monitoring using YOLO-based computer vision
- Predictive Analytics for visitor surges based on festivals, weather, and historical data
- Automated Crowd Alerts and emergency detection systems
- Capacity Optimization with dynamic crowd flow management
- Virtual Queue Management - Skip physical lines with digital tokens
- Real-time Wait Time Updates across all temple entry points
- Digital Darshan Passes with QR code integration
- Slot-based Entry System to distribute crowds evenly
- AI-Powered Panic Detection using crowd behavior analysis
- Instant Emergency Alerts to temple authorities and nearby hospitals
- Medical Assistance Locator with GPS-based routing
- Automated Incident Reporting with real-time response coordination
- Smart Parking Guidance with real-time availability updates
- Dynamic Route Optimization to reduce approach road congestion
- Shuttle Service Coordination with live bus tracking
- Integrated Traffic Control working with local police systems
- Voice-Enabled Assistant in Gujarati, Hindi, and English
- Real-time Temple Information - timings, rituals, and announcements
- Accessibility Features for elderly and differently-abled devotees
- Cultural Heritage Integration with AR-guided temple tours
- Smart Sensor Networks for environmental and crowd monitoring
- CCTV Analytics with AI-powered incident detection
- Drone Surveillance for aerial crowd assessment during festivals
- Automated Alert Systems integrated with temple management
- Flask 3.0 - RESTful API with microservices architecture
- SQLAlchemy & SQLite - Multi-database system for crowd data, user management, and analytics
- AI/ML Stack - OpenCV, YOLO, scikit-learn for computer vision and predictive modeling
- Real-time Communication - Socket.IO for live updates and emergency broadcasts
- Groq AI Integration - Advanced language processing for multilingual chatbot
- Next.js 15 - Modern React framework with App Router for optimal performance
- TypeScript - Type-safe development for enterprise-grade reliability
- Responsive UI - shadcn/ui components with accessibility-first design
- Real-time Maps - Leaflet integration for live crowd visualization and navigation
- PWA Ready - Offline capabilities for areas with poor network connectivity
- YOLO-based People Detection - Real-time crowd counting and density analysis
- Crowd Behavior Analytics - Pattern recognition for early warning systems
- Predictive Modeling - Festival crowd forecasting using historical data
- Computer Vision Pipeline - Multi-camera surveillance and incident detection
- Smart Sensors - Temperature, humidity, and occupancy monitoring
- Camera Analytics - AI-powered CCTV with automated alert generation
- Mobile Integration - Cross-platform compatibility with native features
- Third-party APIs - Weather, traffic, and emergency services integration
DevYatra/
βββ backend/ # Flask API Backend
β βββ app.py # Main Flask application
β βββ models.py # Database models & schemas
β βββ routes/ # API endpoint modules
β β βββ travel_routes.py # Travel & pilgrimage services
β β βββ carbon_routes.py # Carbon footprint tracking
β β βββ group_routes.py # Group management
β βββ chatbot.py # AI-powered multilingual assistant
β βββ emergency_alerts.py # Emergency response system
β βββ voice_bot.py # Voice interaction services
β βββ requirements.txt # Python dependencies
β
βββ sih2025-qbit/ # Next.js Frontend Application
β βββ app/ # App Router pages
β β βββ dashboard/ # Main control dashboard
β β βββ smart-queue/ # Virtual queue management
β β βββ crowd-analyzer/ # Real-time crowd monitoring
β β βββ traffic-mobility/ # Traffic & parking guidance
β β βββ pilgrim-engagement/ # Pilgrim services & info
β β βββ emergency/ # Emergency response UI
β β βββ medical-assistance/ # Medical help locator
β βββ components/ # Reusable UI components
β β βββ accessibility/ # Accessibility features
β β βββ smart-queue/ # Queue management widgets
β β βββ traffic-mobility/ # Traffic control panels
β β βββ pilgrim-engagement/ # Pilgrim interaction components
β βββ services/ # API integration services
β
βββ aiml crowd prediction/ # AI/ML Crowd Analytics Engine
β βββ src/crowd_forecast/ # Core ML algorithms
β β βββ models/ # Prediction models (baseline & advanced)
β β βββ detection.py # YOLO-based people detection
β β βββ features.py # Feature engineering pipeline
β β βββ alerting.py # Automated alert system
β β βββ pipeline.py # End-to-end ML pipeline
β βββ dashboard/ # ML model monitoring dashboard
β βββ tests/ # Comprehensive test suite
β βββ requirements.txt # ML/AI dependencies
β
βββ CrowdAnalyser/ # Crowd Management Admin Tools
βββ AdminPanel/ # Temple authority dashboard
βββ userPanel/ # Public crowd information
βββ YOLOv8/ # Computer vision components
βββ app.py # Real-time detection service
βββ yolo_people_counter.py # People counting algorithm
- Python 3.11+ - For backend services and AI/ML components
- Node.js 18+ - For frontend application development
- Git - Version control and repository management
- Webcam/Camera - For crowd detection testing (optional)
Create backend/.env file using the provided template:
# Copy example environment file
cp backend/.env.example backend/.envRequired API Keys for Full Functionality:
- GROQ_API_KEY - AI chatbot and language processing
- GEOAPIFY_API_KEY - Maps and geocoding services
- WEATHER_API_KEY - Weather integration for crowd predictions
- TWILIO_ACCOUNT_SID & TWILIO_AUTH_TOKEN - SMS/WhatsApp emergency alerts
- SARVAM_API_KEY - Regional language translation support
Note: Basic functionality works without API keys, but advanced features require proper configuration.
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
# (optional) create backend/.env and add keys from the list above
python app_new.pyExpected output includes a health URL like:
- Local:
http://localhost:<port>(the app autoβselects an available port; example: 5001) - Health:
http://localhost:<port>/api/health
cd frontend
npm install
npm run dev- Local:
http://localhost:3000
From the repository root:
# Start backend (background) and capture logs
cd backend && source .venv/bin/activate && nohup python app_new.py > ../logs/backend.log 2>&1 & echo $! > ../logs/backend.pid
# Start frontend (background)
cd ../frontend && nohup npm run dev > ../logs/frontend.log 2>&1 & echo $! > ../logs/frontend.pid- Backend health (autoβports 5000β9000): probe quickly
for p in $(seq 5000 1 9000); do curl -sSf http://127.0.0.1:$p/api/health && break; done- Stop services
kill $(cat logs/backend.pid)
kill $(cat logs/frontend.pid)- Core
GET /β API status summaryGET /api/healthβ health, DB status, key presence
- Users
POST /api/usersβ create/get user byusername,role, optionalfirebase_uidGET /api/users/<username>β fetch user detailsPOST /api/users/homeβ set home location (username,home_lat,home_lon)GET /api/leaderboardβ simple points leaderboard
- Safety
GET /api/safety/reportsβ list incident reportsPOST /api/safety/reportsβ add incident (type,latitude,longitude, optionaldescription,username)
- Travel and Carbon (via blueprints)
routes/travel_routes.pyβ travel search/services endpointsroutes/carbon_routes.pyβ emissions calculations and related utilities
Socket.IO events (server): connect, disconnect, update_profile, ping.
- App routes under
frontend/app/:dashboard,safety,tickets,travel-services,carbon-offset,crowd-analyzer,chatbot,voice,ar,ar-guide,preferences,memory,split,groups,api-test,native - Components:
SafetyMap,SafetyInfoCard,featured-destinations,travel/destination-card, etc. - Services:
services/apiService.ts,utils/api.tscentralize backend calls
- Ports already in use
- Backend picks a free port; check
logs/backend.logor probe 5000β9000 for/api/health - Frontend defaults to 3000 (see
logs/frontend.log)
- Backend picks a free port; check
- Missing API keys
- The app logs:
Missing essential environment variables: GROQ_API_KEY, GEOAPIFY_API_KEY - Most features still work; provide keys to unlock full functionality
- The app logs:
- Node/Next warnings
- You may see: "Invalid next.config.js options detected: Unrecognized key(s): swcMinify" β safe to ignore in dev
- Apple Silicon build times
- Heavy Python wheels (torch, scipy, faiss) may take a moment; prebuilt wheels are used where available
| Challenge | DevYatra Solution | Impact |
|---|---|---|
| Overcrowding | AI-powered crowd prediction + virtual queues | 70% reduction in wait times |
| Safety Risks | Real-time panic detection + automated alerts | Instant emergency response |
| Traffic Chaos | Smart parking + dynamic routing | 50% improvement in traffic flow |
| Communication | Multilingual voice assistant + real-time updates | Universal accessibility |
| Resource Management | Predictive analytics for staff deployment | Optimal resource utilization |
- Modular Architecture - Easy deployment across Somnath, Dwarka, Ambaji, Pavagadh
- Cloud-Ready Infrastructure - Handles festival crowds of 1M+ devotees
- Offline Capabilities - Functions in low-connectivity temple areas
- Multi-tenancy Support - Centralized management for all temple sites
- First-of-its-kind AI-driven temple crowd management system in India
- Cultural Sensitivity - Technology that enhances rather than disrupts spiritual experience
- Inclusive Design - Accessibility for all age groups and abilities
- Sustainable Tourism - Promotes responsible pilgrimage practices
# Clone repository
git clone https://github.com/manjunath5513/DevYatra.git
cd DevYatra
# Setup backend
cd backend
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
python app.py
# Setup frontend (new terminal)
cd sih2025-qbit
npm install
npm run dev
# Setup AI/ML services (optional)
cd "aiml crowd prediction"
pip install -r requirements.txt
python dashboard/app.py- Frontend Dashboard: http://localhost:3000
- Backend API: http://localhost:5000/api/health
- ML Dashboard: http://localhost:8501 (Streamlit)
- Admin Panel: http://localhost:3001
- Pilgrim Planning: Check crowd predictions β Book virtual queue slot β Receive notifications
- Temple Visit: Navigate with smart parking β Skip physical queues β Emergency assistance if needed
- Emergency Response: Automated detection β Instant alerts β Coordinated response
- Temple Management: Monitor crowds β Optimize resources β Generate analytics reports
- AI-First Approach - Advanced computer vision and predictive analytics
- Real-time Processing - Sub-second response times for critical alerts
- Cultural Integration - Designed specifically for Indian pilgrimage contexts
- Comprehensive Solution - End-to-end ecosystem rather than point solutions
- Government Partnership Ready - Built for Gujarat government deployment
DevYatra Team
SIH 2025 | Problem Statement ID: 25165
Government of Gujarat | GUJCOST Submission
GitHub Repository: https://github.com/manjunath5513/DevYatra
Transforming pilgrimage experiences through technology while preserving spiritual sanctity ποΈ
Β© 2025 DevYatra Team | Smart India Hackathon 2025 | Government of Gujarat Initiative