A real-time queue management system. Business owners manage waiting lines digitally — customers join via a link and track their position live.
- NestJS — TypeScript backend
- Bull Queue — reliable job processing for email notifications
- Socket.IO — real-time position updates
- PostgreSQL + Prisma v7 — database with pg adapter
- Resend — email notifications
- Next.js — admin dashboard + customer pages
- Docker Compose — local development
``` Customer (browser) ↓ join via link Next.js Client ↓ REST API calls NestJS API (port 3001) ↓ Prisma PostgreSQL (Docker) ↓ Bull Queue Resend (email notifications) ↑ Socket.IO Real-time position updates → all connected clients ```
- Admin creates a queue and shares the join link
- Customer opens the link, enters name + email
- Customer sees their position in real-time via WebSocket
- Admin calls next → current customer served, next customer notified via email
- All connected clients update instantly via Socket.IO
Bull Queue over setTimeout Email notifications are queued as Bull jobs — if the server restarts, jobs are not lost (stored in Redis).
WebSocket over HTTP Polling 100 customers polling every 5s = 1200 requests/min. Socket.IO pushes updates only when something changes.
UUID over auto-increment IDs Sequential IDs allow enumeration attacks. UUID makes IDs impossible to guess.
Customer token No login required for customers — they get a unique UUID token as their tracking link.
```bash
docker compose up -d
cd server && npm install npm run start:dev
cd client && npm install npm run dev ```
```env DATABASE_URL=postgresql://postgres:password@localhost:5432/waitless JWT_SECRET=your-secret-key ADMIN_REGISTER_SECRET=your-register-secret REDIS_URL=redis://localhost:6379 RESEND_API_KEY=re_xxxxx MAIL_FROM=Waitless onboarding@resend.dev ```