How daniel-ifenna/belgrove-homes works
Belgrove Homes combines a public property and inspection-booking site with an internal sales-operations system for booking follow-up, transaction management, payment confirmation, ledger reporting and receipts. The main workflow runs from a visitor booking through staff handling and, where a sale proceeds, transaction and payment processing to client receipt delivery. The graph reflects the sampled routes and source-index references; unsampled admin screens and other documented behavior are represented at their existing directory level where details are unavailable.
Main entry points: transactions/route.ts Transaction API · prisma.ts Application database · bookings/route.ts Booking intake · [id]/route.ts Booking actions
Components 23
Public experience
- Property site
src/app/(site) - Estate inventory
src/lib/belgroveData.ts - Booking form
src/app/(site)/book-inspection/BookingForm.tsx
Inspection bookings
- Booking intake
src/app/api/bookings/route.ts - Customer records
src/lib/customer.ts - Booking operations
src/app/admin/bookings - Booking actions
src/app/api/admin/bookings/[id]/route.ts - Agent management
src/app/admin/agents
Sales and finance
- Transaction management
src/app/admin/transactions - Transaction API
src/app/api/admin/transactions/route.ts - Transaction creation
src/lib/transactionService.ts - Payment operations
src/app/api/admin/transactions/[id]/payments/route.ts - Payment and receipt service
src/lib/paymentService.ts - Payment confirmation
src/lib/paymentConfirmation.ts - Finance ledger
src/lib/finance/ledger.ts - Receipt PDF rendering
src/lib/receipts/generateReceiptPdf.ts - Receipt access
src/app/r/[token]/page.tsx
Shared platform
- Transactional email
src/lib/email/emailService.ts - Authentication
src/auth.ts - Role authorization
src/lib/authz.ts - Application database
src/lib/prisma.ts - Business time rules
src/lib/time.ts
Other components
- Visitor
Connections 28
- Visitor → Property site: browses
- Visitor → Booking form: submits
- Booking form → Booking intake: posts booking
- Booking intake → Application database: stores booking
src/app/api/bookings/route.ts - Booking intake → Customer records: finds or creates
src/app/api/bookings/route.ts - Booking intake → Transactional email: sends notifications
src/app/api/bookings/route.ts - Booking intake → Estate inventory: validates plots
src/app/api/bookings/route.ts - Booking operations → Booking actions: updates booking
- Booking actions → Authentication: checks session
src/app/api/admin/bookings/[id]/route.ts - Booking actions → Role authorization: checks role
src/app/api/admin/bookings/[id]/route.ts - Booking actions → Application database: updates records
src/app/api/admin/bookings/[id]/route.ts - Booking actions → Transactional email: sends updates
src/app/api/admin/bookings/[id]/route.ts - Transaction management → Transaction API: manages sales
- Transaction API → Authentication: checks session
src/app/api/admin/transactions/route.ts - Transaction API → Role authorization: checks role
src/app/api/admin/transactions/route.ts - Transaction API → Transaction creation: creates transaction
src/app/api/admin/transactions/route.ts - Transaction API → Application database: reads transactions
src/app/api/admin/transactions/route.ts - Transaction API → Transactional email: sends confirmation
src/app/api/admin/transactions/route.ts - Payment operations → Authentication: checks session
src/app/api/admin/transactions/[id]/payments/route.ts - Payment operations → Payment and receipt service: records payment
- Payment and receipt service → Application database: persists payment
src/lib/paymentService.ts - Payment and receipt service → Payment confirmation: confirms payment
src/lib/paymentService.ts - Payment confirmation → Finance ledger: posts entries
src/lib/paymentConfirmation.ts - Payment and receipt service → Receipt PDF rendering: renders receipt
src/lib/paymentService.ts - Receipt access → Application database: loads receipt
- Transactional email → Application database: sends via email layer
README.md - Authentication → Application database: loads user
src/auth.ts - Transaction API → Business time rules: formats dates
src/app/api/admin/transactions/route.ts