ARTICLE AD BOX
You can build this system by separating ticket booking and luggage tracking as two linked modules, connected through a unique QR code per luggage item.
1. Ticket Booking (Normal Flow)
User searches route → selects bus → selects seat → books ticket
System generates:
ticketId
Passenger + seat details
Ticket QR (optional) for verification
2. Luggage Tracking System (Core Feature)
Key rule:
👉 Each luggage item gets its own QR code, linked to one ticket
Data Link
Ticket → Multiple LuggagEach luggage record stores:
Ticket ID
Source
Destination
Current status
3. QR Code Logic
Each luggage QR contains:
{ "ticketId": "TKT123", "luggageId": "LUG456" }QR is generated at booking time (or ticket issuing).
4. Luggage Status Flow (Scan-Based)
Boarding point LOADED
En route (optional) IN_TRANSIT
Destination OFFLOADED
5. User View
User can see luggage tracking:
Luggage Code: LUG-456 From: Delhi To: Jaipur Status: Offloaded6. Admin Dashboard Features
Admin can:
Add buses (seat count & layout)
Add routes & schedules
Auto-generate seat maps based on seat count
Issue tickets (online/offline)
Scan luggage QR codes
View/export luggage list
7. Seat Map Logic
Seat map is generated dynamically from bus config:
totalSeats = 40 layout = 2x2Booked seats are disabled using backend seat data.
8. Database Structure (Simplified)
Ticket
ticketId, busId, routeId, seatNumberLuggage
luggageId, ticketId, status, source, destination, logs[]9. Tech Stack (Suggested)
Frontend: React
Backend: Node.js + Express
DB: MongoDB
QR: qrcode (generate), html5-qrcode (scan)
Auth: JWT (Admin / Staff / User roles)
10. Final Result
1- Normal bus booking system
2- Per-luggage QR tracking
3- Real-time status updates
4- Admin-controlled scanning
5- Clear luggage audit trail
