How rachsindutama/web_camerarent works
CameraRent is a multi-branch camera and production-equipment rental web app. The main renter workflow is selecting a branch and gear, checking serial-unit availability, keeping a booking draft through sign-in, then managing bookings and invoices; branch staff handle fulfillment, inspections and finance, while superadmins govern tenants and platform settings. The graph also preserves the documented inventory, membership, logistics and chat capabilities. Feature-to-feature arrows follow the supplied App routing and sampled references; README-described but unsampled behavior is labeled with unverified dashed links.
Main entry points: firebase.ts Firebase services · CatalogPage.tsx Unified gear catalog · App.tsx Route dispatcher · AdminBookingsPage.tsx Booking operations
Components 26
Access and tenancy
- Route dispatcher
src/App.tsx - Authentication and registration
src/features/auth/AuthContext.tsx - Role and auth guards
src/components/layout/RoleGuard.tsx - Branch selection
src/hooks/useTenant.ts - Nearest branch lookup
src/lib/geo.ts
Rental storefront
- Unified gear catalog
src/features/inventory/CatalogPage.tsx - Serial availability
src/lib/availability.ts - Booking draft
src/store/useBookingDraftStore.ts - Membership benefits
src/lib/membership.ts - Renter bookings
src/features/bookings/MyBookingsPage.tsx - Invoice documents
src/lib/invoicePdf.ts
Branch operations
- Inventory and serial units
src/features/inventory/InventoryPage.tsx - Production bundles
src/features/inventory/BundlesPage.tsx - Booking operations
src/features/bookings/AdminBookingsPage.tsx - Rental inspections
src/features/inspections/InspectionsPage.tsx - Delivery logistics
src/features/logistics/LogisticsPage.tsx - Cash flow ledger
src/features/finance/FinancePage.tsx - Client chat
src/features/chat/ChatPage.tsx - Member management
src/features/members/MembersPage.tsx - Staff management
src/features/staff/StaffPage.tsx
Platform governance
- Tenant directory and GMV
src/features/superadmin/TenantsPage.tsx - Global settings
src/features/superadmin/SettingsPage.tsx
Shared services
- Platform settings service
src/hooks/usePlatformSettings.ts - Firebase services
src/lib/firebase.ts - Bilingual interface
src/hooks/useI18n.ts
Other components
- Visitor or renter
Connections 36
- Visitor or renter → Route dispatcher: opens app
src/App.tsx - Route dispatcher → Unified gear catalog: routes to
src/App.tsx - Route dispatcher → Role and auth guards: checks access
src/App.tsx - Route dispatcher → Authentication and registration: uses session
src/App.tsx - Authentication and registration → Firebase services: authenticates and reads profiles
src/features/auth/AuthContext.tsx - Role and auth guards → Authentication and registration: checks identity
- Unified gear catalog → Branch selection: selects branch
src/features/inventory/CatalogPage.tsx - Branch selection → Nearest branch lookup: detects nearby
src/hooks/useTenant.ts - Branch selection → Firebase services: reads tenants
src/hooks/useTenant.ts - Unified gear catalog → Serial availability: checks units
src/features/inventory/CatalogPage.tsx - Serial availability → Firebase services: reads slots
src/lib/availability.ts - Unified gear catalog → Booking draft: saves selections
src/features/inventory/CatalogPage.tsx - Unified gear catalog → Membership benefits: applies benefits
src/features/inventory/CatalogPage.tsx - Unified gear catalog → Authentication and registration: prompts sign-in
src/features/inventory/CatalogPage.tsx - Route dispatcher → Renter bookings: routes renters
src/App.tsx - Renter bookings → Invoice documents: generates invoice
- Route dispatcher → Booking operations: routes operations
src/App.tsx - Booking operations → Serial availability: checks availability
src/features/bookings/AdminBookingsPage.tsx - Booking operations → Invoice documents: generates invoice
src/features/bookings/AdminBookingsPage.tsx - Booking operations → Rental inspections: coordinates checks
- Booking operations → Delivery logistics: coordinates delivery
- Booking operations → Cash flow ledger: records payments
- Inventory and serial units → Firebase services: manages equipment
- Production bundles → Firebase services: stores bundles
- Rental inspections → Firebase services: records condition
- Delivery logistics → Firebase services: updates checkpoints
- Cash flow ledger → Firebase services: reads and writes ledger
- Client chat → Firebase services: syncs messages
src/features/chat/ChatPage.tsx - Member management → Firebase services: manages member records
- Staff management → Firebase services: manages staff records
- Tenant directory and GMV → Firebase services: manages branches
- Global settings → Platform settings service: edits settings
src/features/superadmin/SettingsPage.tsx - Platform settings service → Firebase services: loads and saves settings
src/hooks/usePlatformSettings.ts - Platform settings service → Membership benefits: publishes live benefits
src/hooks/usePlatformSettings.ts - Platform settings service → Tenant directory and GMV: applies branch defaults
- Unified gear catalog → Bilingual interface: renders translations
src/features/inventory/CatalogPage.tsx