Overview
The Restaurant Reservation System is a comprehensive Flutter mobile application that enables restaurants to manage table reservations efficiently. Built with clean architecture principles, this system provides both customer-facing features for making reservations and business owner tools for managing restaurant operations.Key Features
For Customers
- Real-time Table Availability: Check available tables for specific dates and times with instant feedback
- Smart Reservation System: 1-hour time slots with automatic conflict detection
- Email Verification: Secure booking confirmation via email codes
- Reservation Management: View and cancel existing reservations
- Multi-capacity Tables: Automatically matches party size to appropriate table capacity
For Restaurant Owners
- Business Profile Management: Configure restaurant details, hours, and policies
- Table Configuration: Set up tables with varying capacities
- Operating Hours: Define opening hours for each day of the week
- Reservation Dashboard: View all bookings with status tracking
- Customer Communications: Automated email notifications for confirmations and cancellations
Architecture
The application follows Clean Architecture principles with clear separation of concerns:Core Entities
- Reserva (Reservation): Manages booking details, timestamps, and status
- Mesa (Table): Represents restaurant tables with capacity constraints
- Negocio (Business): Restaurant configuration and settings
- HorarioApertura (Opening Hours): Operating schedule management
Technology Stack
Flutter
Cross-platform mobile framework (SDK ^3.7.2)
Firebase
Backend services (Auth, Firestore, Hosting)
BLoC Pattern
State management with flutter_bloc ^8.1.3
GetIt
Dependency injection container ^7.6.4
Reservation System Logic
The system implements 1-hour time slots with intelligent conflict detection:Availability Check Process
- Capacity Filtering: Find tables that can accommodate the party size
- Time Conflict Check: Verify no existing reservations overlap the requested time
- Business Hours Validation: Ensure restaurant is open during requested time
- Final Validation: Confirm availability before creating the reservation
The system only considers confirmed and pending reservations as conflicts. Cancelled reservations free up table availability.
State Management
Reservation states follow a clear lifecycle:- Pendiente (Pending): Initial state awaiting email verification
- Confirmada (Confirmed): Verified and secured reservation
- Cancelada (Cancelled): Cancelled by customer or owner
Firebase Integration
The application uses Firebase for:- Cloud Firestore: Real-time database for all business data
- Firebase Authentication: Google Sign-In for restaurant owners
- Firebase Hosting: Web deployment capabilities
- Email Triggers: Automated customer notifications
Project Structure
Key files in the codebase:lib/main.dart:9- Application entry point with Firebase initializationlib/service_locator.dart:33- Dependency injection configurationlib/router.dart- GoRouter navigation setuplib/aplicacion/crear_reserva.dart:8- Core reservation creation use caselib/dominio/entidades/reserva.dart:7- Reservation entity definition
Design Principles
Clean Architecture
- Domain Layer: Business logic independent of frameworks
- Application Layer: Use cases orchestrating business rules
- Infrastructure Layer: External services and database adapters
- Presentation Layer: UI components with BLoC state management
Dependency Injection
All dependencies are registered in the service locator:Getting Started
Ready to set up your own restaurant reservation system?Quickstart Guide
Get your first reservation working in minutes
Installation
Complete setup instructions and requirements
What’s Next?
After setting up the system, explore:- Customizing the reservation duration (default: 60 minutes)
- Configuring maximum advance booking days (default: 14 days)
- Setting up restaurant-specific business hours
- Customizing email notification templates