private 2026 Desarrollo backendBackend development
API de reservas — Fogón del ValleBooking API — Fogón del Valle
Backend de reservas de la versión restaurante, con reglas de horarios, mesas VIP y eventos que ocupan el salón completo.Booking backend for the restaurant version, with opening-hour rules, VIP tables and events that take over the whole venue.
github.com
API de reservas — Fogón del ValleBooking API — Fogón del Valle
Qué hace
API en NestJS que recibe las reservas de la landing de Fogón del Valle y responde la disponibilidad para que el front arme el calendario.
- Reservas comunes: de jueves a domingo, con inicio entre las 12 y las 18 h.
- VIP: una sola reserva VIP por horario.
- Eventos (casamientos, fiestas de 15): ocupan el salón completo. Si se superponen con reservas comunes o VIP, esas se cancelan y cada cliente recibe un mail para reprogramar. Dos eventos superpuestos se rechazan.
Lo técnico
- La lógica de reservas vive en Postgres (InsForge): funciones con advisory lock y exclusion constraints, así dos pedidos simultáneos no pueden tomar el mismo horario.
- Validación de horarios, contacto y fechas en el servicio antes de llegar a la base.
- Rate limit en la creación de reservas con
@nestjs/throttler. - Mails de confirmación y cancelación con Resend; aviso al dueño por WhatsApp con Twilio.
- Tests con Jest sobre el servicio, el controlador y las plantillas de mail.
What it does
A NestJS API that receives bookings from the Fogón del Valle landing page and returns availability so the frontend can build the calendar.
- Regular bookings: Thursday to Sunday, starting between 12:00 and 18:00.
- VIP: only one VIP booking per time slot.
- Events (weddings, quinceañeras): take over the whole venue. If they overlap regular or VIP bookings, those are cancelled and each customer gets an email to reschedule. Overlapping events are rejected.
Under the hood
- Booking logic lives in Postgres (InsForge): functions with advisory locks and exclusion constraints, so two simultaneous requests can’t take the same slot.
- Hours, contact and date validation in the service before reaching the database.
- Rate limiting on booking creation with
@nestjs/throttler. - Confirmation and cancellation emails with Resend; owner alerts on WhatsApp via Twilio.
- Jest tests for the service, the controller and the email templates.