Fleshed out documentation
This commit is contained in:
@@ -14,6 +14,16 @@ The Salon platform is a Django REST API backend with a React/Vite frontend, opti
|
||||
| **payments** | Payment model, Moyasar integration (create, capture, refund), webhook reconciliation, idempotency. |
|
||||
| **notifications** | Booking lifecycle notifications (SMS/WhatsApp). Reuses OTP providers; sends on booking created/confirmed/cancelled. |
|
||||
|
||||
## Data Model Overview
|
||||
|
||||
The core data model centers on users, salons, and time-bound bookings. A booking ties a customer to a service, a staff member, and a scheduled time. Payments are recorded per booking and reconcile to the external gateway. Notifications are stored for every booking lifecycle message for auditability.
|
||||
|
||||
- `accounts.User` owns phone, locale, and auth preferences.
|
||||
- `salons.Salon`, `salons.Service`, and `salons.Staff` define the catalog and scheduling surface.
|
||||
- `bookings.Booking` links customer, staff, service, and scheduled time, with status transitions.
|
||||
- `payments.Payment` tracks gateway state and idempotency per booking.
|
||||
- `notifications.Notification` records each SMS/WhatsApp send attempt tied to a booking event.
|
||||
|
||||
## Data Flow
|
||||
|
||||
```
|
||||
@@ -28,6 +38,7 @@ User → React Frontend → Django API
|
||||
## Async and Observability (MVP Decision)
|
||||
|
||||
**Decision (MVP):** All OTP sends, booking notifications, and payment gateway calls run **synchronously** in the request/response path. No Celery, RQ, or other task queue for the initial launch.
|
||||
This is captured in ADR 0001 (`docs/adr/0001-synchronous-external-calls-mvp.md`).
|
||||
|
||||
**Rationale:**
|
||||
- Reduces deployment complexity (no Redis, no worker processes).
|
||||
|
||||
Reference in New Issue
Block a user