Overview

Hotelaro is a comprehensive multi-tenant hotel management system designed to handle all aspects of hospitality operations from room reservations to restaurant point-of-sale transactions. This document provides an overview of the system architecture, core components, and design patterns used throughout the application.

The system serves as a Software-as-a-Service (SaaS) platform where multiple hotel properties can operate independently on a shared infrastructure, each identified by unique subdomains and isolated through the admin_uid tenant identifier.

For detailed information about specific subsystems, see System Architecture for architectural patterns, Core Booking System for reservation management, Restaurant & POS System for point-of-sale operations, and Frontend Website for the public-facing interface.

System Purpose and Scope

Hotelaro provides a complete hotel management solution encompassing:

The system is built using CodeIgniter 4 framework with a modular architecture that allows for extensibility and maintainability across different hotel operation workflows.

Core System Architecture

The following diagram illustrates the high-level architecture showing the relationship between major system components and their corresponding code modules:

Core System Architecture

Multi-Tenant Architecture Flow

The system implements subdomain-based multi-tenancy with tenant isolation enforced through the admin_uid field across all database operations:

Multi-Tenant Architecture Flow

Core Components and Modules

Calendar System (Central Booking Engine)

The calendar system serves as the heart of the application, handling room availability, reservations, and housekeeping operations. It features a sophisticated JavaScript-based interface with real-time updates:

Component File Path Responsibility
Calendar Controller inc/core/Calendar/Controllers/Calendar.php Reservation CRUD operations, room management
Calendar Model inc/core/Calendar/Models/CalendarModel.php Database operations, booking validation
Frontend JavaScript inc/core/Calendar/Views/frontjavascript.php Interactive calendar UI, drag-and-drop
Calendar Page inc/core/Calendar/Views/calendarpage.php Main calendar interface layout

Key methods in the Calendar system:

Restaurant POS System

The restaurant module provides comprehensive point-of-sale functionality with real-time cart management and order processing:

Component File Path Responsibility
Restaurant Controller inc/core/Restaurant/Controllers/Restaurant.php Order management, menu operations
POS Interface inc/core/Restaurant/Views/poscounter.php Point-of-sale user interface
Cart Management app/Views/common_script/addtocartfunction.php Shopping cart operations
Order Processing inc/core/Restaurant/Views/orderscript.php Order status management

The POS system integrates with hotel bookings through table hotel_booking_orders and supports multiple order types including dine-in, takeaway, and room service.

Authentication and User Management

User authentication and session management are handled through the Home module with support for different user privilege levels:

Authentication and User Management

Database Schema and Multi-Tenancy

The system uses a consistent naming convention with hotel_booking_ prefix for all core tables. Multi-tenancy is enforced through the admin_uid column present in every tenant-specific table:

Table Name Purpose Key Columns
hotel_booking_bookings Reservation records id, book_id, room_id, client_id, admin_uid
hotel_booking_rooms Room inventory id, name, type, status, admin_uid
hotel_booking_clients Customer database id, c_name, c_email, c_phone, admin_uid
hotel_booking_orders Restaurant orders id, client_id, cartdata, admin_uid
hotel_booking_setup Tenant configuration admin_uid, timezone, currency, themename
user System users id, email, subdomain, admin_uid

All database queries include the tenant isolation clause: WHERE admin_uid = ? to ensure data segregation between different hotel properties.

Technology Stack and Dependencies

The system is built using modern web technologies with emphasis on real-time interaction and responsive design:

Backend Framework: CodeIgniter 4 with MVC architecture

Frontend Libraries:

JavaScript Libraries in Use:

The system features extensive AJAX functionality for real-time updates without page reloads, particularly in the calendar interface and POS system.