Your turn, simplified. π
A modern, full-stack digital queue management system that eliminates physical waiting lines and provides real-time queue tracking for both customers and administrators.
- Overview
- Features
- Quick Start
- Project Structure
- API Documentation
- Server Documentation
- Environment Variables
- UI Showcase
- Contributing
- License
Qyra is a comprehensive queue management solution designed for modern businesses. It replaces traditional physical queue systems with a digital platform that allows customers to join queues remotely, track their position in real-time, and receive notifications when it's their turn.
- π« Virtual Token System - Unique tokens replace physical queue numbers
- π± Real-time Updates - Live queue position and wait time tracking
- π Priority Management - VIP and senior citizen priority handling
- π Admin Dashboard - Complete queue control and analytics
- π PDF Tickets - Professional downloadable queue tickets
- π Secure Authentication - JWT-based admin authentication
- π Public Display - TV-optimized fullscreen queue status
- π¨ Modern UI - Beautiful, responsive design with Tailwind CSS
-
Join Queue
- Simple form with name, phone, email, and customer type
- Customer types: Walk-in, VIP, Senior (with priority levels)
- Instant token generation with unique ID
- Downloadable PDF ticket with just one click
-
Queue Status
- Real-time position tracking
- Estimated wait time calculation
- Current serving display
- Fullscreen TV mode for public displays
-
Digital Ticket
- Professional PDF design
- Includes token number, customer details, and queue info
- Clickable tracking link
- Optimized for printing and mobile viewing
-
Secure Dashboard
- JWT-based authentication
- Protected routes with middleware
- Session management
-
Queue Management
- Start serving customers
- Complete/skip customers
- Increase priority for special cases
- Remove customers from queue
- Real-time queue list with filters
-
Analytics
- Total customers served
- Average wait time
- Customer type distribution
- Peak hours analysis
- Performance metrics
-
Settings
- Pause/resume queue
- Close queue for new entries
- Maintenance mode
- Average service time configuration
- Theme customization
- Framework: React 18 with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- Icons: Lucide React
- PDF Generation: jsPDF (programmatic generation)
- HTTP Client: Fetch API
- State Management: React Hooks (useState, useEffect)
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT (JSON Web Tokens)
- Password Hashing: bcryptjs
- Environment: dotenv
- CORS: cors middleware
- Frontend Hosting: Vercel
- Backend Hosting: Render
- Database: MongoDB Atlas
- Version Control: Git & GitHub
- Node.js (v16 or higher)
- MongoDB (local or Atlas)
- npm or yarn
-
Clone the repository
git clone https://github.com/JINAY2910/Qyra.git cd Qyra -
Install client dependencies
npm install
-
Install server dependencies
cd server npm install -
Configure environment variables
Create
.envfile in theserverdirectory:PORT=5001 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key
-
Create admin user
cd server npm run create-adminFollow the prompts to create your admin account.
-
Start the development servers
Terminal 1 - Backend:
cd server npm startTerminal 2 - Frontend:
npm run dev
-
Open your browser
- Frontend:
http://localhost:5173 - Backend API:
http://localhost:5001/api
- Frontend:
Qyra/
βββ src/ # Frontend source code
β βββ components/ # Reusable React components
β β βββ AdminControls.tsx # Admin control buttons
β β βββ Logo.tsx # Qyra logo component
β β βββ Modal.tsx # Modal dialogs
β β βββ Navbar.tsx # Main navigation bar
β β βββ QueueTable.tsx # Admin queue table
β β βββ QueueTicket.tsx # Digital ticket component
β β βββ QyraLogo.tsx # Alternative logo
β β βββ Toast.tsx # Notification system
β β βββ TokenCard.tsx # Token display card
β βββ pages/ # Application pages
β β βββ AdminAnalytics.tsx # Analytics dashboard
β β βββ AdminDashboard.tsx # Queue management
β β βββ AdminLogin.tsx # Admin authentication
β β βββ AdminSettings.tsx # Settings management
β β βββ Home.tsx # Landing page
β β βββ JoinQueue.tsx # Customer queue joining
β β βββ ManageQueue.tsx # Queue operations
β β βββ QueueStatus.tsx # Public queue display
β βββ contexts/ # React contexts
β βββ data/ # Sample data and types
β βββ App.tsx # Main app component
β βββ main.tsx # App entry point
β βββ index.css # Global styles
βββ server/ # Backend source code
β βββ config/ # Configuration files
β β βββ db.js # MongoDB connection
β βββ controllers/ # Route controllers
β β βββ authController.js # Authentication logic
β β βββ queueController.js # Queue operations
β β βββ settingsController.js # Settings management
β βββ middleware/ # Express middleware
β β βββ authMiddleware.js # JWT verification
β β βββ errorHandler.js # Error handling
β β βββ rateLimiter.js # Rate limiting
β βββ models/ # Mongoose models
β β βββ QueueItem.js # Queue entry model
β β βββ ShopSettings.js # Settings model
β β βββ User.js # Admin user model
β βββ routes/ # API routes
β β βββ authRoutes.js # Auth endpoints
β β βββ queueRoutes.js # Queue endpoints
β β βββ settingsRoutes.js # Settings endpoints
β βββ scripts/ # Utility scripts
β β βββ createAdmin.js # Create admin user
β β βββ updateAdminTimePerCustomer.js # Update service time
β βββ utils/ # Utility functions
β β βββ createAdmin.js # Admin creation helper
β β βββ generateToken.js # JWT token generator
β β βββ generateTokenNumber.js # Queue token generator
β βββ .env # Environment variables
β βββ package.json # Server dependencies
β βββ README.md # Server documentation
β βββ server.js # Server entry point
βββ public/ # Static assets
βββ index.html # HTML template
βββ package.json # Frontend dependencies
βββ vite.config.ts # Vite configuration
βββ tailwind.config.js # Tailwind CSS config
βββ tsconfig.json # TypeScript config
βββ README.md # This file
- Join Queue - Fill out the form with your details and customer type
- Get Token - Receive your virtual token number and position
- Check Status - Monitor your position and estimated wait time
- TV Display - View the public queue status on large screens
- Login - Use your admin credentials to access the dashboard
- Manage Queue - Start serving, complete, or skip customers
- View Analytics - Monitor performance metrics and customer insights
- Priority Handling - Manage VIP and senior citizen priorities
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
- Priority System - VIP and senior citizens get priority
- Real-time Updates - Live position tracking
- Wait Time Estimation - Intelligent time calculations
- Token System - Virtual tokens replace physical numbers
- Queue Operations - Start, complete, skip customers
- Analytics Dashboard - Performance metrics and insights
- Customer Management - View and manage all customers
- Priority Handling - Special treatment for VIPs and seniors
- TV Mode - Fullscreen optimized for large displays
- Real-time Updates - Live queue status
- Large Text - Easy to read from distance
- Responsive Design - Works on any screen size
POST /api/queue/join
Content-Type: application/json
{
"name": "John Doe",
"phone": "1234567890",
"email": "john@example.com",
"type": "Walk-in"
}GET /api/queue/status/:idGET /api/queue/currentGET /api/queue/listPUT /api/queue/start/:id
Authorization: Bearer <token>PUT /api/queue/complete/:id
Authorization: Bearer <token>PUT /api/queue/priority/:id
Authorization: Bearer <token>DELETE /api/queue/:id
Authorization: Bearer <token>GET /api/queue/stats
Authorization: Bearer <token>GET /api/settings/publicGET /api/settings
Authorization: Bearer <token>PUT /api/settings/update
Authorization: Bearer <token>
Content-Type: application/json
{
"isPaused": false,
"isClosed": false,
"isMaintenanceMode": false
}Detailed documentation for the backend API, database schema, and server configuration can be found in the Server README.
# Server Configuration
PORT=5001
# Database
MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/qyra
# Authentication
JWT_SECRET=your_super_secret_jwt_key_here
# Optional
NODE_ENV=developmentThe application uses a centralized configuration file at src/config/api.ts.
To change the API URL:
- Open
src/config/api.ts - Update the
API_BASE_URLconstant:export const API_BASE_URL = 'http://localhost:5001/api'; // For local development // export const API_BASE_URL = 'https://your-backend.example.com/api'; // For production
- Push your code to GitHub
- Import project in Vercel
- Configure build settings:
- Build Command:
npm run build - Output Directory:
dist
- Build Command:
- Deploy
- Push your code to GitHub
- Create new Web Service in Render
- Configure:
- Build Command:
npm install - Start Command:
npm start - Root Directory:
server
- Build Command:
- Add environment variables
- Deploy
- Create cluster in MongoDB Atlas
- Create database user
- Whitelist IP addresses (0.0.0.0/0 for all)
- Get connection string
- Add to server
.envfile
- Modern landing page with gradient design
- Simple queue joining form
- Real-time queue status display
- Professional PDF ticket generation
- Secure login with JWT authentication
- Real-time queue management
- Analytics and performance metrics
- Settings and configuration panel
- Primary Purple:
#8B5CF6- Brand color, CTAs - Dark Background:
#0F172A- Main background - Light Purple:
#F5F3FF- Highlights, cards - Gray Scale: Various shades for text and borders
- Headings: Helvetica Bold
- Body: Helvetica Normal
- Monospace: Courier (for tokens)
-
Customer Flow:
- Join queue with different customer types
- Check queue status
- Download PDF ticket
- Verify token number visibility
-
Admin Flow:
- Login with credentials
- Manage queue (start, complete, skip)
- View analytics
- Update settings
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Jinay Shah
- GitHub: @JINAY2910
Built with β€οΈ using React, TypeScript, Express, and MongoDB