How chakma-s/plan-e works
This is a travel-stay booking backend for hotels and resorts, with local-guide offerings and customer, vendor, and administrative workflows. The principal flow is a client request through the versioned API into discovery or booking logic, which uses domain records and, for booking operations, payment, regional policy, and notification services. The tree and source index establish additional review, compliance, and vendor-management branches. Some endpoint and integration implementations were not excerpted, so those connections are included only where the index or shown code supports them.
Main entry points: api.py API router · property.py Properties · database.py SQL database · booking_service.py Booking service
Components 28
API and access
- API router
backend/app/api/v1/api.py - Authentication API
backend/app/api/v1/endpoints/auth.py - Booking API
backend/app/api/v1/endpoints/bookings.py - Hotel API
backend/app/api/v1/endpoints/hotels.py - Resort API
backend/app/api/v1/endpoints/resorts.py - Guide API
backend/app/api/v1/endpoints/guides.py - Review API
backend/app/api/v1/endpoints/reviews.py - Compliance API
backend/app/api/v1/endpoints/compliance.py - Auth dependencies
backend/app/api/deps.py
Travel operations
- Booking service
backend/app/services/booking_service.py - Hotel discovery
backend/app/services/hotel_service.py - Resort discovery
backend/app/services/resort_service.py - Guide service
backend/app/services/guide_service.py - Payment gateway
backend/app/services/payment_gateway.py
Accounts and management
- Vendor API
backend/app/api/v1/endpoints/vendor.py - Admin API
backend/app/api/v1/endpoints/admin.py - Identity service
backend/app/services/auth_service.py - Vendor service
backend/app/services/vendor_service.py - Notifications
backend/app/services/notification_service.py
Domain data
- Users and vendors
backend/app/models/user.py - Properties
backend/app/models/property.py - Rooms and allocation
backend/app/models/room.py - Local guides
backend/app/models/guide.py - Reservations
backend/app/models/booking.py - Reviews
backend/app/models/review.py
Persistence and policy
- Regional policy
backend/app/core/regional_policy.py - SQL database
backend/app/core/database.py
Other components
- API client
Connections 47
- API client → API router: sends requests
- API router → Authentication API: routes to
backend/app/api/v1/api.py - API router → Booking API: routes to
backend/app/api/v1/api.py - API router → Hotel API: routes to
backend/app/api/v1/api.py - API router → Resort API: routes to
backend/app/api/v1/api.py - API router → Guide API: routes to
backend/app/api/v1/api.py - API router → Review API: routes to
backend/app/api/v1/api.py - API router → Compliance API: routes to
backend/app/api/v1/api.py - API router → Vendor API: routes to
backend/app/api/v1/api.py - API router → Admin API: routes to
backend/app/api/v1/api.py - Authentication API → Identity service: uses
backend/app/api/v1/endpoints/auth.py - Authentication API → Auth dependencies: uses
backend/app/api/v1/endpoints/auth.py - Auth dependencies → SQL database: gets session
backend/app/api/deps.py - Auth dependencies → Identity service: looks up user
backend/app/api/deps.py - Booking API → Booking service: uses
- Hotel API → Hotel discovery: uses
- Resort API → Resort discovery: uses
- Guide API → Guide service: uses
backend/app/api/v1/endpoints/guides.py - Vendor API → Vendor service: uses
backend/app/api/v1/endpoints/vendor.py - Booking service → Payment gateway: charges payments
backend/app/services/booking_service.py - Booking service → Regional policy: checks policy
backend/app/services/booking_service.py - Booking service → Notifications: sends notices
backend/app/services/booking_service.py - Identity service → Notifications: dispatches OTP
backend/app/services/auth_service.py - Identity service → SQL database: reads and writes
- Booking service → SQL database: reads and writes
- Hotel discovery → Properties: reads
backend/app/services/hotel_service.py - Hotel discovery → Rooms and allocation: reads
backend/app/services/hotel_service.py - Resort discovery → Properties: reads
backend/app/services/resort_service.py - Resort discovery → Local guides: reads
backend/app/services/resort_service.py - Resort discovery → Rooms and allocation: reads
backend/app/services/resort_service.py - Guide service → Local guides: uses
backend/app/services/guide_service.py - Vendor service → Properties: manages
backend/app/services/vendor_service.py - Vendor service → Rooms and allocation: manages
backend/app/services/vendor_service.py - Vendor service → Local guides: manages
backend/app/services/vendor_service.py - Review API → SQL database: reads and writes
backend/app/api/v1/endpoints/reviews.py - Compliance API → Regional policy: checks policy
backend/app/api/v1/endpoints/compliance.py - Compliance API → SQL database: reads and writes
backend/app/api/v1/endpoints/compliance.py - Vendor API → SQL database: reads and writes
backend/app/api/v1/endpoints/vendor.py - Admin API → SQL database: reads and writes
backend/app/api/v1/endpoints/admin.py - Reservations → Properties: references
backend/app/models/booking.py - Reservations → Rooms and allocation: books
backend/app/models/booking.py - Reservations → Local guides: books
backend/app/models/booking.py - Reviews → Reservations: references
backend/app/models/review.py - Reviews → Users and vendors: references
backend/app/models/review.py - Properties → Rooms and allocation: has room types
backend/app/models/property.py - Properties → Local guides: associates guides
backend/app/models/property.py - Users and vendors → Properties: owns properties
backend/app/models/user.py