API feature slices
This section documents the business capabilities owned by the Fastify API. Each implemented slice gets its own page describing:
- its purpose and actors;
- the business rules and invariants it protects;
- its commands, queries, and observable workflows;
- the domain events it produces or consumes;
- its relationship to other feature slices.
Endpoint paths, request fields, response schemas, and status codes do not belong
in these pages. Fastify route schemas are the source for that transport-level
reference, and @fastify/swagger generates the OpenAPI description after the
routes are registered.
Implemented capabilities
- Authentication explains how the API verifies Supabase Auth
access tokens, hands the verified user to the
usersslice, and how that slice issues a live-channel credential for the resolved application user. - Authenticated media uploads explains how the
usersandmedia-libraryslices establish ownership, validate direct uploads, and issue authorized delivery URLs. - Telegram client authentication explains verified launches, bot-confirmed contact sharing, and client sessions.
- Public booking explains schedule availability, transactional booking, and personal management links.
- Client accounts explains claimed appointments, contact preferences, history, and owner cancellation.
- Booking notifications explains professional and client inbox records, reminder eligibility, and notification preferences.
- Booking schedules explains owned schedules, the schedule allowance, booking-mode changes, and archiving.
- Booking services explains service management and the service snapshots kept on appointments.
- Booking availability explains day overrides, the weekly template, and why availability changes never cancel bookings.
- Professional appointments explains history, manual and recurring bookings, and cancellation scopes.
- Professional account explains the professional profile, blocked phones, inbox state, onboarding progress, and entitlement status.
OpenAPI access: The application currently generates OpenAPI in memory through
app.swagger(). It does not expose a Swagger UI or public OpenAPI route yet.