How orei1i/khoan-projectwdp301 works
KhoAn is a multi-branch self-storage rental platform: customers discover units, reserve and pay, sign contracts, and manage their rental; branch staff and managers handle check-in through move-out, while operations and administrators govern the chain. Web and mobile clients use a shared REST API, with shared business rules across the applications. Edges reflect README-documented architecture and the supplied source excerpts/index; many feature internals were not sampled, so undocumented calls are omitted.
Main entry points: routes.ts REST API · models.ts MongoDB models · page.tsx Web app · payments.routes.ts Payments
Components 22
Customer apps
- Web app
Webapp/src/app/(public)/page.tsx - Mobile app
Mobile/React-Native/App.tsx
Rental operations
- Facility discovery
BE/src/features/facilities/facilities.routes.ts - Reservations
BE/src/features/reservations/reservations.routes.ts - Payments
BE/src/features/payments/payments.routes.ts - Contracts
BE/src/features/contracts/contracts.routes.ts - Check-in and intake
BE/src/features/intake/intake.routes.ts - Rental services
BE/src/features/contracts/contracts.routes.ts - Support and claims
BE/src/features/tickets/tickets.routes.ts
Staff and governance
- Branch workflows
Webapp/src/app/staff/check-in/page.tsx - Branch management
Webapp/src/app/manager/contracts/page.tsx - Chain operations
Webapp/src/app/ops/approvals/page.tsx - Administration
Webapp/src/app/admin/users/page.tsx
API platform
- REST API
BE/src/routes.ts - Token and access control
BE/src/shared/http/authenticate.ts - MongoDB models
BE/src/shared/db/models.ts
Shared domain
- Shared business rules
shared/src/entities.ts
Other components
- Customer
- Branch staff
- Firebase Auth
- MongoDB Atlas
- Email service
Connections 33
- Customer → Web app: uses
README.md - Customer → Mobile app: uses
README.md - Branch staff → Web app: uses
README.md - Web app → Firebase Auth: signs in
README.md - Mobile app → Firebase Auth: signs in
README.md - Web app → REST API: REST requests
README.md - Mobile app → REST API: REST requests
README.md - REST API → Token and access control: authenticates
BE/src/shared/http/authenticate.ts - Token and access control → Firebase Auth: verifies token
BE/src/shared/http/authenticate.ts - Token and access control → MongoDB models: loads profile
BE/src/shared/http/authenticate.ts - REST API → Facility discovery: routes requests
BE/src/routes.ts - REST API → Reservations: routes requests
BE/src/routes.ts - REST API → Payments: routes requests
BE/src/routes.ts - REST API → Contracts: routes requests
BE/src/routes.ts - REST API → Support and claims: routes requests
BE/src/routes.ts - Reservations → MongoDB models: reads and writes
BE/src/features/reservations/reservations.routes.ts - Reservations → Payments: starts settlement
BE/src/features/reservations/reservations.routes.ts - Reservations → Check-in and intake: checks in
BE/src/features/reservations/reservations.routes.ts - Contracts → Payments: loads payment data
BE/src/features/contracts/contracts.routes.ts - Contracts → Check-in and intake: delegates intake
BE/src/features/contracts/contracts.routes.ts - Contracts → Rental services: delegates access
BE/src/features/contracts/contracts.routes.ts - Payments → MongoDB models: records transactions
BE/src/features/payments/payments.routes.ts - Payments → Email service: notifies staff
- Check-in and intake → MongoDB models: updates intake
BE/src/features/intake/intake.routes.ts - Support and claims → MongoDB models: stores tickets
BE/src/shared/db/models.ts - MongoDB models → MongoDB Atlas: persists data
README.md - Branch workflows → REST API: operates workflows
README.md - Branch management → REST API: manages rentals
README.md - Chain operations → REST API: governs chain
README.md - Administration → REST API: administers users
README.md - Web app → Shared business rules: shares domain rules
README.md - Mobile app → Shared business rules: shares domain rules
README.md - REST API → Shared business rules: uses domain rules
README.md