The Challenge
Complex Booking Logic
Managing travel bookings involves multiple states (Pending, Paid, Cancelled, Completed) and triggers (Bill generation, Ticket issuance). Handling this reliably requires a solid state management approach.
Role Security
The system needed strict separation between what a Tourist can see/do vs. an Employee or Owner.
The Solution
Modular NestJS Architecture
Leveraged NestJS modules to separate concerns (Auth, Trip, Booking, User). This ensured the codebase remained maintainable and testable.
Automated Billing Logic
Implemented business logic that automatically generates a bill upon booking and issues a “TouristTrip” ticket only when payment is verified, preventing revenue leakage.