How geordie-og/van-bus-booking-web-p2_webapp- works
GoRoute is a van and bus booking application. Customers browse scheduled trips, inspect seat availability, select seats and passenger details, create a reservation, and review or cancel bookings; administrators manage vehicles and trip schedules. The map separates customer pages, admin operations, API workflows, and shared persistence/security. Edges are limited to calls shown in excerpts or relationships explicitly documented in the README; several UI and API internals were not sampled.
Main entry points: bookings/route.ts Booking routes · trips/route.ts Trip routes · db.ts Database connection · [id]/route.ts Booking detail routes
Components 31
Customer booking
- Landing page
src/app/page.tsx - Trip search
src/app/trips/page.tsx - Trip and seats
src/app/trips/[id]/page.tsx - Passenger details
src/app/trips/[id]/passenger/page.tsx - Booking confirmation
src/app/trips/[id]/confirmation/page.tsx - My bookings
src/app/bookings/page.tsx - Login and register
src/app/login/page.tsx - Registration
src/app/register/page.tsx - User navigation
src/components/Navbar.tsx
Fleet administration
- Admin dashboard
src/app/admin/page.tsx - Trip management
src/app/admin/trips/page.tsx - Vehicle management
src/app/admin/vehicles/page.tsx - Admin navigation
src/components/AdminNavbar.tsx
API workflows
- Authentication routes
src/app/api/auth - Booking routes
src/app/api/bookings/route.ts - Booking detail routes
src/app/api/bookings/[id]/route.ts - Seat availability
src/app/api/trips/[id]/availability/route.ts - Trip routes
src/app/api/trips/route.ts - Trip detail routes
src/app/api/trips/[id]/route.ts - Vehicle routes
src/app/api/vehicles/route.ts - Vehicle detail routes
src/app/api/vehicles/[id]/route.ts - User routes
src/app/api/users/route.ts
Shared services
- JWT authentication
src/lib/auth.ts - JSON responses
src/lib/api-response.ts - Database connection
src/lib/db.ts - Booking records
src/models/Booking.ts - Trip records
src/models/Trip.ts - Vehicle records
src/models/Vehicle.ts - User records
src/models/User.ts
Other components
- Customer
- Administrator
Connections 45
- Customer → Landing page: browses
- Customer → Trip search: searches
- Trip search → Trip and seats: selects trip
- Customer → Passenger details: enters details
- Passenger details → Booking confirmation: continues to
- Customer → My bookings: manages bookings
- Customer → Login and register: authenticates
- Customer → Registration: registers
- User navigation → Authentication routes: fetches profile
src/components/Navbar.tsx - User navigation → Authentication routes: logs out
src/components/Navbar.tsx - Administrator → Admin dashboard: manages operations
- Administrator → Trip management: schedules trips
- Administrator → Vehicle management: manages fleet
- Admin navigation → Admin dashboard: navigates
- Trip search → Trip routes: requests trips
- Trip and seats → Seat availability: requests availability
- Passenger details → Booking routes: creates booking
- My bookings → Booking routes: lists bookings
- My bookings → Booking detail routes: cancels booking
- Trip management → Trip routes: schedules trips
- Vehicle management → Vehicle routes: manages vehicles
- Booking routes → Database connection: connects
src/app/api/bookings/route.ts - Booking routes → JWT authentication: checks identity
src/app/api/bookings/route.ts - Booking routes → Booking records: reads and writes
src/app/api/bookings/route.ts - Booking routes → Trip records: reads trip
src/app/api/bookings/route.ts - Booking routes → JSON responses: formats response
src/app/api/bookings/route.ts - Booking detail routes → Database connection: connects
src/app/api/bookings/[id]/route.ts - Booking detail routes → JWT authentication: checks identity
src/app/api/bookings/[id]/route.ts - Booking detail routes → Booking records: updates booking
src/app/api/bookings/[id]/route.ts - Booking detail routes → JSON responses: formats response
src/app/api/bookings/[id]/route.ts - Trip routes → Database connection: connects
src/app/api/trips/route.ts - Trip routes → JWT authentication: guards admin
src/app/api/trips/route.ts - Trip routes → Trip records: reads and writes
src/app/api/trips/route.ts - Trip routes → Vehicle records: checks vehicle
src/app/api/trips/route.ts - Trip routes → JSON responses: formats response
src/app/api/trips/route.ts - Seat availability → Database connection: connects
src/app/api/trips/[id]/availability/route.ts - Seat availability → Booking records: reads seats
- Authentication routes → JWT authentication: authenticates
src/app/api/auth/login/route.ts - Authentication routes → Database connection: connects
src/app/api/auth/login/route.ts - Authentication routes → User records: reads user
src/app/api/auth/login/route.ts - Vehicle routes → Database connection: connects
src/app/api/vehicles/route.ts - Vehicle routes → Vehicle records: manages fleet
- Vehicle detail routes → Vehicle records: updates vehicle
- Trip detail routes → Trip records: updates trip
- User routes → User records: manages users