Patients in government hospitals wait 4+ hours for a 3-minute consultation. No system tells them when to arrive or how long to wait.
- Book virtual tokens from home
- Live queue position (like Dominos tracker)
- AI-predicted wait times
- SMS alerts when 3 patients ahead
- Doctor panel to manage queue
- Admin analytics dashboard
- Real-time updates via Socket.io
- Mobile-first, works on 2G
Frontend: Next.js 14, Tailwind CSS, Socket.io-client
Backend: Node.js, Express, Socket.io, Prisma ORM
Database: PostgreSQL, Redis
Auth: JWT, bcrypt
# Start databases
docker-compose up -d
# Backend
cd backend
npm install
npx prisma migrate dev
node prisma/seed.js
npm run dev
# Frontend (new terminal)
cd frontend
npm install
npm run dev- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Database: PostgreSQL on localhost:5432
Admin: 9999999999 / admin123
Doctor: 8888888888 / doctor123
Patient: Register new account
- Patient: /patient - Book tokens, track position
- Doctor: /doctor - Manage queue, call patients
- Admin: /admin - Analytics, load balancing
- Book tokens from phone
- See real-time position in queue
- Get estimated wait time
- Receive "your turn" notifications
- Track consultation history
- View waiting queue
- Call next patient with one click
- Skip patients if needed
- Track completed consultations
- Manage daily schedule
- Real-time hospital statistics
- Load balancing suggestions
- Queue performance metrics
- Doctor productivity tracking
- System health monitoring
All dashboards update live via Socket.io:
- Queue position changes
- Patient call notifications
- Doctor availability
- Statistics updates
- Load balancing alerts
- Users: Patients, doctors, admins
- Hospitals: Hospital information
- Doctors: Specializations, availability
- Tokens: Queue appointments with status
Authentication: /api/auth/register, /api/auth/login
Hospitals: /api/hospitals
Doctors: /api/doctors, /api/doctors/:id
Tokens: /api/tokens/book, /api/tokens/queue/:id, /api/tokens/my
PORT=5000
DATABASE_URL="postgresql://waitless:waitless123@localhost:5432/waitless_db"
JWT_SECRET="changeme_secret_key_2024"
CLIENT_URL="http://localhost:3000" # For production CORS
NEXT_PUBLIC_API_URL=http://localhost:5000
# Build and run production containers
docker-compose -f docker-compose.prod.yml up -d- Set production DATABASE_URL
- Generate secure JWT_SECRET
- Configure CLIENT_URL for CORS
- Set up SSL certificates
- Configure reverse proxy (nginx)
- Microservices design with separate frontend/backend
- Real-time communication via WebSockets
- Scalable database design with Prisma ORM
- Mobile-first responsive design
- Role-based access control
- Secure JWT authentication
- Redis for session management
- Optimized database queries
- Lazy loading for large datasets
- Efficient Socket.io rooms
- Minimal bundle sizes
- JWT token authentication
- Password hashing with bcrypt
- CORS configuration
- Input validation
- SQL injection prevention
- XSS protection
- Fork the repository
- Create feature branch
- Make changes with tests
- Submit pull request
MIT License - see LICENSE file for details
Built with for better healthcare accessibility