AR Barbería’s booking system lets customers reserve a chair directly from the website without needing to call or message in advance. This page walks through the full flow — from landing on the homepage to receiving a confirmation — and explains the rules that govern slot availability, rate limiting, and what happens if you hit the appointment cap.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/OswalSnow/AR-Barber/llms.txt
Use this file to discover all available pages before exploring further.
Booking flow
Visit the homepage
Navigate to the AR Barbería site. The homepage lists all available barbers with their names and profile information. This is your entry point for starting a reservation.
Choose a barber
Click the booking button next to the barber you want. This takes you to the booking form at
/agendar/{id}, where {id} is the barber’s user ID.Select a service
Choose one of the three available services. Each has a different duration that affects which time slots are shown to you.
Selecting
| Service | Description | Duration |
|---|---|---|
corte | Haircut | 30 minutes |
barba | Beard trim | 30 minutes |
ambos | Haircut + beard trim | 60 minutes |
ambos filters the slot list to show only openings with at least 60 minutes of clear time.Pick a date
Use the date picker (powered by Flatpickr) to select the day you want. Dates in the past are disabled.
The date picker auto-selects the next available workday when the form loads, so in most cases you can skip directly to picking a time slot.
Pick a time slot
After selecting a date, the form fetches available slots from the availability API:The API returns only slots that are genuinely open — it skips past times (for today), excludes slots that would overlap with existing appointments, and stays within workday hours. Slots are shown in 30-minute intervals (e.g.,
10:00, 10:30, 11:00).Enter your contact details
Fill in your name and a 10-digit phone number. The phone number is used to look up existing appointments and to cap the number of active bookings per customer.
How slot availability works
The availability endpoint (/api/disponibilidad/{user_id}/{fecha}) calculates open slots dynamically on every request. It does the following:
- Loads all existing appointments for the selected barber on that date.
- Iterates through workday hours in 30-minute increments.
- Skips any slot where the time has already passed (only relevant when the selected date is today).
- Skips any slot where a new appointment of the requested duration would overlap with an existing one.
- Returns the remaining slots as an array of time strings, for example:
["10:00", "10:30", "11:00"].
duration query parameter set to 30 or 60 depending on the service:
Anti-spam appointment limit
To prevent a single phone number from holding many time slots at once, the system enforces a maximum of 2 active appointments per phone number. If you try to book a third appointment with the same phone number, the form returns a validation error with the keylímite.
When this limit is reached, the page displays a WhatsApp button that deep-links to the barber’s WhatsApp with a pre-filled message, letting you coordinate directly if you have a special situation.
Rate limiting on form submission
The/confirmar-cita endpoint is protected by Laravel’s throttle middleware:
429 Too Many Requests response. Wait 60 seconds before trying again.
Validation rules
The booking form enforces the following rules on submission:| Field | Rule |
|---|---|
customer_name | Required, string, max 255 characters |
customer_phone | Required, exactly 10 digits |
servicio | Required, one of: corte, barba, ambos |
fecha | Required, valid date, must be today or in the future |
hora | Required |
user_id | Required, must exist in the users table |