Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Ishaq74/concordia/llms.txt
Use this file to discover all available pages before exploring further.
Booking & Reservation System
Concordia’s booking system enables customers to reserve services with providers through an availability-based scheduling system with status management and cancellation policies.Overview
The booking system consists of two main components:- Availability Schedules (
services_availability.schema.ts) - Provider defines when they’re available - Bookings (
services_bookings.schema.ts) - Customer reservations of specific time slots
Availability Management
Fromsrc/database/schemas/services_availability.schema.ts:
Availability Fields
Unique availability entry identifier
Reference to the service listing
Day of the week using numeric representation:
0= Sunday1= Monday2= Tuesday3= Wednesday4= Thursday5= Friday6= Saturday
Start time in 24-hour HH:MM formatExample:
"09:00", "14:30"End time in 24-hour HH:MM formatExample:
"17:00", "18:30"Whether this time slot is currently available for bookingSet to
false to temporarily block a recurring time slot without deleting itWhen this availability entry was created
Unique Constraint
The schema enforces uniqueness on(serviceId, dayOfWeek, startTime) to prevent duplicate time slots:
Recurring Weekly Schedule
Availability entries define a recurring weekly schedule. For example:- Monday: Available 9am-12pm and 2pm-5pm
- Wednesday: Available 9am-5pm
Multiple availability windows per day are supported, perfect for providers with lunch breaks or split schedules.
Booking Management
Fromsrc/database/schemas/services_bookings.schema.ts:
Core Booking Fields
Unique booking identifier
Reference to the service being booked
User ID of the customer making the booking
User ID of the service provider
Schedule Details
Date of the service in YYYY-MM-DD formatExample:
"2026-03-15"Start time of the service in HH:MM formatExample:
"14:00"Duration of the booked service in minutesExample:
90 for 1.5 hoursThe combination of
bookingDate, bookingTime, and durationMinutes defines the exact time slot reserved.Payment Information
Final price as a string for decimal precisionExample:
"75.00"ISO 4217 currency codeExample:
"EUR", "USD", "GBP"Booking Status
Current booking status with possible values:
pending- Awaiting provider confirmationconfirmed- Provider has confirmed the bookingcompleted- Service has been deliveredcancelled- Booking was cancelledno_show- Customer didn’t show up
Communication
Optional message from customer to providerExample:
"I need wheelchair access. Is that available?"Provider’s response to the booking or customer messageExample:
"Yes, we have wheelchair access. See you at 2pm!"Lifecycle Timestamps
When the booking was cancelled (if applicable)Only set when status transitions to
cancelledWhen the service was marked as completedSet when status transitions to
completedWhen the booking was initially created
Last modification time, automatically updated
Booking Status Workflow
Status Transitions
pending → confirmed
Provider accepts the booking requestTypically within 24-48 hours of booking
pending → cancelled
Either party cancels before confirmationSets
cancelledAt timestampconfirmed → completed
Service successfully deliveredSets
completedAt timestamp, enables reviewconfirmed → cancelled
Cancellation after confirmationMay have policy implications (see cancellation policies)
confirmed → no_show
Customer didn’t attend appointmentProvider marks as no-show
Cancellation Policies
Fromservices_listings.schema.ts, services define cancellation rules:
Minimum hours in advance required for bookingExample:
24 means customers must book at least 1 day aheadHours before service when free cancellation is allowedExample:
48 means free cancellation up to 2 days beforeExample Policy Enforcement
Database Indexes
From the schema files:Availability Indexes
Booking Indexes
Indexes support efficient queries for:
- All bookings for a service
- Customer’s booking history
- Provider’s booking calendar
- Bookings by status for dashboards
- Bookings by date for calendar views
Integration with Services
Fromservices_listings.schema.ts, the relationship is defined:
- Multiple availability windows (recurring weekly schedule)
- Multiple bookings (past and future reservations)
Booking Flow Example
1. Provider Sets Availability
2. Customer Requests Booking
3. Provider Confirms
4. Service Completed
Conflict Prevention
To prevent double-booking:- Check availability - Verify day/time matches an active availability entry
- Check existing bookings - Ensure no overlapping confirmed bookings
- Consider duration - Account for service duration when checking conflicts
Best Practices
For Providers
- Set realistic availability - Only mark times you can reliably serve customers
- Use
isAvailable: false- Temporarily block slots without deleting recurring schedule - Respond promptly - Confirm or decline bookings within 24 hours
- Communicate clearly - Use
providerResponsefor important details
For Booking System
- Validate against availability - Check day/time matches provider schedule
- Prevent double-booking - Lock slots or use transactions
- Enforce policies - Respect
bookingAdvanceHoursandcancellationHours - Send notifications - Email/notify on booking, confirmation, cancellation
- Enable reviews - Only allow reviews for
completedbookings
For Customers
- Book in advance - Respect
bookingAdvanceHoursrequirement - Provide details - Use
customerMessagefor special requests - Cancel early - Follow
cancellationHourspolicy for free cancellation - Leave reviews - Help other customers after
completedbookings