Revolutionizing campus facility management with real-time queue tracking and QR-based check-ins
- Problem Statement
- Solution Overview
- Google Technology Integration
- Tech Stack
- Features
- Architecture
- Installation
- Usage
- Screenshots
- Impact & Practicality
- Team
- License
Campus facilities like mess halls, cafeterias, and common areas face recurring challenges:
- Long Queues During Peak Hours: Students waste 15-30 minutes waiting in lines during meal times
- Inefficient Resource Utilization: Facility managers lack real-time occupancy data
- Poor User Experience: No visibility into queue status before arrival
- Time Wasted: Average student loses 2-3 hours weekly in queues
- Facility Underutilization: Resources remain unused during off-peak hours
- Student Frustration: Unpredictable wait times affect meal planning and schedules
QLess transforms campus facility management through a comprehensive digital solution:
A real-time queue management system that combines:
- QR Code Technology: Contactless check-in/check-out
- Live Status Dashboard: Real-time occupancy visibility
- Multi-Role Interface: Separate views for students and administrators
- Cloud-Based Architecture: Scalable Firebase Realtime Database
- View Real-Time Status: Check queue levels across all campus facilities
- QR Check-In: Scan facility QR code to check in instantly
- Automatic Tracking: System monitors your presence automatically
- Easy Check-Out: One-tap checkout when leaving
- Live Monitoring: Track all facilities from a unified dashboard
- Analytics Dashboard: Understand usage patterns by hour/day
- Facility Management: Add, edit, or remove facilities dynamically
- QR Code Generation: Create and download QR codes for new facilities
- User Management: Control access and manage user roles
Why Firebase?
- Real-time Synchronization: Updates propagate to all clients instantly (<100ms latency)
- Scalability: Handles thousands of concurrent users without performance degradation
- Offline Capability: Built-in offline persistence for seamless experience
- Security: Firebase Security Rules protect sensitive data
- Zero Server Management: Fully managed backend infrastructure
Our Implementation:
# Database Structure
{
"facilities": {
"facility_id": {
"name": "Food Sutra Mess Hall",
"capacity": 200,
"icon": "๐ฝ๏ธ",
"avg_time_per_person": 2,
"open_hours": {"start": 7, "end": 22}
}
},
"queues": {
"facility_id": {
"count": 45,
"last_updated": "2025-01-18T14:30:00"
}
},
"active_queues": {
"facility_id": {
"user_id": {
"name": "John Doe",
"checkin_time": "2025-01-18T14:25:00"
}
}
},
"history": {
"facility_id": {
"entry_id": {
"action": "checkin",
"count": 46,
"timestamp": "2025-01-18T14:30:00",
"hour": 14,
"day": "Saturday"
}
}
}
}Key Firebase Features Used:
- Realtime Database: Core data storage with live synchronization
- Firebase Admin SDK: Server-side operations and authentication
- Database Rules: Secure read/write access control
- Cloud Hosting: Reliable 99.95% uptime SLA
- Streamlit 1.52.2: Rapid web application development
- Plotly 5.17.0: Interactive analytics visualizations
- Pandas 2.0.0: Data manipulation and analysis
- Firebase Admin SDK 6.2.0: Real-time database operations
- Python 3.9+: Core application logic
- qrcode 7.4.2: QR code generation
- pyzbar 0.1.9: QR code scanning and decoding
- OpenCV 4.8.0: Image processing for camera input
- Pillow 10.0.0: Image manipulation
- streamlit-autorefresh: Auto-refresh for real-time updates
- hashlib: Secure password hashing
- datetime: Timestamp management
- Live Queue Dashboard: View all facility statuses at a glance
- Color-Coded Status: Green (low), Yellow (moderate), Red (high)
- QR Scanner Integration: Built-in camera QR scanning
- Check-In Validation: Prevents duplicate check-ins
- Auto-Refresh: Updates every 5 seconds
- Mobile Responsive: Works seamlessly on smartphones
- Real-Time Monitoring: Track all facilities simultaneously
- Facility Management:
- Add new facilities with custom icons
- Edit facility capacity and timing
- Soft-delete with restore capability
- Analytics Engine:
- Hourly usage patterns
- Peak time identification
- Historical trend analysis
- QR Code Generator: Create downloadable QR codes
- User Management: Role-based access control
- Queue Reset: Emergency queue clearing
- User Role Management: Assign admin privileges
- Account Activation/Deactivation: User access control
- System Settings: Configure global parameters
- Audit Logs: Track administrative actions
โโโโโโโโโโโโโโโโโโโ
โ Student App โ
โ (Streamlit) โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โ HTTPS
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Firebase Realtime DB โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ /facilities โ โ
โ โ /queues โ โ
โ โ /active_queues โ โ
โ โ /users โ โ
โ โ /history โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โฒ
โ HTTPS
โ
โโโโโโโโโโดโโโโโโโโโ
โ Admin Panel โ
โ (Streamlit) โ
โโโโโโโโโโโโโโโโโโโ
-
Student Check-In:
- Scan QR โ Validate โ Update queue count โ Log history โ Broadcast to all clients
-
Real-Time Updates:
- Firebase triggers โ Client listeners โ UI refresh โ Display updated data
-
Analytics Generation:
- Query history โ Aggregate by hour/day โ Generate visualizations โ Display insights
- Python 3.9 or higher
- Firebase account with Realtime Database enabled
- pip package manager
git clone https://github.com/yourusername/qless.git
cd qlesspip install -r requirements.txt- Create a Firebase project at Firebase Console
- Enable Realtime Database
- Download
serviceAccountKey.jsonfrom Project Settings โ Service Accounts - Place it in the project root directory
Edit config.py:
FIREBASE_CONFIG = {
'credentials_path': 'serviceAccountKey.json',
'database_url': 'https://your-project.firebaseio.com/'
}
SUPER_ADMIN_EMAILS = [
'your.email@campus.edu'
]python setup.pyThis creates:
- Default facilities (3 mess halls)
- Admin accounts
- Sample student account
- System settings
streamlit run app.pyThe app will open at http://localhost:8501
- Run initialization:
python setup.py - Login as admin:
admin@campus.edu/admin123 - Change default password (Security first!)
- Generate QR codes for facilities
- Print and place QR codes at facility entrances
- Open app on mobile device
- View queue status across all facilities
- Choose facility with shortest queue
- Scan QR code at facility entrance
- Get confirmation of check-in
- Check out when leaving
- Monitor dashboard for real-time status
- Review analytics to identify patterns
- Adjust capacity based on demand
- Generate reports for management
- Manage users and permissions
Real-time facility overview with color-coded status
Comprehensive facility monitoring and management
- Visibility: Real-time occupancy data enables better planning
- Distribution: Students spread across multiple facilities
- Data-Driven Decisions: Historical analytics inform capacity planning
- Campus-Wide: Easily extends to 50+ facilities
- Multi-Campus: Cloud architecture supports multiple locations
- User Capacity: Handles 10,000+ concurrent users
- Data Volume: Efficiently manages millions of check-in records
Jalaj Bhadouria
- GitHub: @jalajbhadouria
- Email: jalaj4b@gmail.com
This project is licensed under the MIT License - see the LICENSE file for details.