How sn1perzgg/driveo works
This is a Next.js car-rental booking frontend: visitors search vehicles, select a vehicle and dates, create a booking, then confirm payment; signed-in users can manage bookings and saved vehicles. The graph also includes account access, contact, and policy pages, plus shared API and domain layers. Some route implementations were not sampled, so their links are omitted rather than inferred; the README provides no additional product-specific capability detail.
Main entry points: api.ts API Client · useUserActions.ts User Actions · bookings/page.tsx Booking History · checkout/page.tsx Payment Checkout
Components 33
Vehicle Discovery
- Home Page
src/app/(client)/page.tsx - Search Hero
src/components/HeroSection/index.tsx - Vehicle Results
src/app/(client)/vehicles/page.tsx - Vehicle Detail
src/app/(client)/vehicles/[id]/page.tsx - Vehicle Search
src/hooks/useVehicles.ts
Rental Management
- Booking Form
src/app/(client)/vehicles/[id]/book/page.tsx - Payment Checkout
src/app/(client)/checkout/page.tsx - Cancellation
src/app/(client)/checkout/cancellation/page.tsx - Booking History
src/app/(client)/account/bookings/page.tsx - Saved Vehicles
src/app/(client)/account/saved/page.tsx - User Actions
src/hooks/useUserActions.ts - Booking Mutation
src/hooks/useCreateBooking.ts
Account and Support
- Contact Page
src/app/(client)/contact/page.tsx - Contact Mutation
src/hooks/useCreateContacts.ts - Sign Up
src/app/(client)/signup/page.tsx - Login
src/app/(client)/login/page.tsx - Password Recovery
src/app/(client)/forgot/page.tsx - Account Page
src/app/(client)/account/page.tsx - Policies and About
src/app/(client)/booking-policy/page.tsx
Shared Services
- API Client
src/lib/api.ts - Loading View
src/app/loading.tsx - Booking Types
src/types/booking.ts - Vehicle Types
src/types/vehicle.ts - Category Type
src/types/category.ts - City Type
src/types/city.ts - User Type
src/types/user.ts - Card Utilities
src/utils/card.ts - Date Utilities
src/utils/dateFormat.ts - Field Errors
src/utils/getFieldErrors.ts - Error Handler
src/lib/errorHandler.ts - Contact Content
constants/contactItems.ts
Other components
- Renter
- Rental API
Connections 37
- Renter → Home Page: opens
- Renter → Vehicle Results: browses
- Renter → Vehicle Detail: views
- Renter → Booking Form: requests rental
- Renter → Payment Checkout: pays booking
- Renter → Booking History: manages bookings
- Renter → Saved Vehicles: views saved
- Renter → Sign Up: registers
- Renter → Login: signs in
- Renter → Password Recovery: resets password
- Renter → Contact Page: contacts support
- Renter → Policies and About: reads policies
- Home Page → Search Hero: renders
- Search Hero → API Client: fetches options
src/components/HeroSection/index.tsx - Vehicle Results → Vehicle Search: uses search
src/app/(client)/vehicles/page.tsx - Vehicle Search → API Client: searches vehicles
src/hooks/useVehicles.ts - Payment Checkout → API Client: confirms payment
src/app/(client)/checkout/page.tsx - Payment Checkout → Card Utilities: formats cards
src/app/(client)/checkout/page.tsx - Booking History → API Client: loads bookings
src/app/(client)/account/bookings/page.tsx - Booking History → Date Utilities: formats dates
src/app/(client)/account/bookings/page.tsx - Booking History → Booking Types: uses booking data
src/app/(client)/account/bookings/page.tsx - Cancellation → API Client: updates booking
src/app/(client)/checkout/cancellation/page.tsx - User Actions → API Client: mutates account
src/hooks/useUserActions.ts - User Actions → User Type: uses user data
src/hooks/useUserActions.ts - User Actions → Error Handler: formats errors
src/hooks/useUserActions.ts - User Actions → Booking Mutation: delegates booking
- Booking Mutation → API Client: creates booking
src/hooks/useCreateBooking.ts - Booking Mutation → Error Handler: formats errors
src/hooks/useCreateBooking.ts - Contact Page → Contact Mutation: submits message
src/app/(client)/contact/page.tsx - Contact Page → Contact Content: renders contact details
src/app/(client)/contact/page.tsx - Contact Mutation → API Client: sends message
src/hooks/useCreateContacts.ts - Contact Mutation → Error Handler: formats errors
src/hooks/useCreateContacts.ts - Sign Up → API Client: creates account
src/app/(client)/signup/page.tsx - Sign Up → Field Errors: maps field errors
src/app/(client)/signup/page.tsx - Login → API Client: authenticates
src/app/(client)/login/page.tsx - Password Recovery → API Client: requests reset
src/app/(client)/forgot/page.tsx - API Client → Rental API: sends API requests
src/lib/api.ts