How 1-ken/tkt-own works
This is a Next.js ticketing and transport-operations application: staff authenticate, manage trips and vehicle assignments, book or reassign seats, record deliveries, and review operational reports. The tree also shows search, online-ticket review, dashboards, and express-booking workflows. Sampled API routes proxy requests to an external backend; the sampled routes and hooks support that boundary, but most page-to-hook wiring was not inspected, so uncertain call edges are omitted.
Main entry points: create/route.ts Booking endpoints · login/page.tsx Login · [...nextauth]/route.ts Session auth · trips/page.tsx Trip operations
Components 22
Identity
- Login
src/app/login/page.tsx - Session auth
src/app/api/auth/[...nextauth]/route.ts
Trips & Booking
- Trip operations
src/app/trips/page.tsx - Trip details
src/app/trips/[tripId]/page.tsx - Trip endpoints
src/app/api/trips/create/route.ts - Vehicle assignment
src/app/api/trips/assign-vehicle/route.ts - Regular booking
src/app/regular/page.tsx - Express booking
src/app/express/page.tsx - Booking endpoints
src/app/api/bookings/create/route.ts - Booking changes
src/app/api/bookings/cancel/route.ts - Online tickets
src/app/bookings/online-tickets/page.tsx - Online ticket endpoint
src/app/api/bookings/online-tickets/route.ts
Delivery
- Delivery recording
src/app/delivery/create/page.tsx - Delivery endpoint
src/app/api/delivery/create/route.ts
Insights
- Dashboard
src/app/dashboard/page.tsx - Statistics endpoint
src/app/api/dashboard/statistics/route.ts - Reports
src/app/reports/page.tsx - Report endpoints
src/app/api/reports/tickets/route.ts - Global search
src/app/search/page.tsx - Search endpoint
src/app/api/search/route.ts
Other components
- Staff
- Operations backend
Connections 30
- Staff → Login: opens
- Login → Session auth: submits credentials
- Session auth → Operations backend: authenticates
- Staff → Trip operations: manages trips
- Trip operations → Trip endpoints: requests trip actions
- Trip details → Vehicle assignment: assigns vehicle
- Trip endpoints → Operations backend: forwards trip requests
- Vehicle assignment → Operations backend: forwards assignment
- Staff → Regular booking: books seats
- Staff → Express booking: books express
- Regular booking → Booking endpoints: submits booking
- Express booking → Booking endpoints: submits booking
- Booking endpoints → Operations backend: forwards booking
- Staff → Booking changes: changes booking
- Booking changes → Operations backend: forwards changes
- Staff → Online tickets: reviews reservations
- Online tickets → Online ticket endpoint: requests tickets
- Online ticket endpoint → Operations backend: fetches tickets
- Staff → Delivery recording: records delivery
- Delivery recording → Delivery endpoint: submits delivery
- Delivery endpoint → Operations backend: forwards delivery
- Staff → Dashboard: views metrics
- Dashboard → Statistics endpoint: requests statistics
- Statistics endpoint → Operations backend: fetches statistics
- Staff → Reports: reviews reports
- Reports → Report endpoints: requests reports
- Report endpoints → Operations backend: fetches reports
- Staff → Global search: searches records
- Global search → Search endpoint: submits query
- Search endpoint → Operations backend: forwards query