> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.ruoomsoftware.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Architecture

> An overview of the Ruoom Core architecture

## Overview of Django Application Flow

<img src="https://mintcdn.com/ruoom/S58yk56t2CMCWBwZ/images/django_general_structure.svg?fit=max&auto=format&n=S58yk56t2CMCWBwZ&q=85&s=c9fe7628e63a40a30d33caaec2dc484d" alt="Django General Structure Diagram" data-path="images/django_general_structure.svg" />

This diagram illustrates the overall flow of a Django application, showcasing the interaction between Models, Views, Templates, URLs, Middleware, and Static Files. It serves as a high-level guide to understanding how Django processes requests and renders responses.

## URLs and Associated Templates

### Administration URLs

* **Dashboard**: `/administration/dashboard/` - Main dashboard for administration.
* **Customers**: `/administration/customers/` - Page for managing customers.
* **Schedule**: `/administration/schedule/` - Schedule management page.
* **Staff**: `/administration/staff/` - Staff management page. More staff sub-pages are available as part of Ruoom plugins.
* **Locations**: `/administration/locations/` - Locations management page.
* **Help**: `/administration/help/` - Help page with sub-sections for embed and email.

### Customer URLs

* **Account Settings**: `/customer/account-settings/` - Customer account settings page.
* More customer pages are available as part of the Ruoom plugins.

### Registration URLs

* **Sign In**: `/registration/signin/` - User sign-in page.
* **Sign Up**: `/registration/signup/` - User sign-up page.
* **Sign Out**: `/registration/signout/` - User sign-out endpoint.
* **New Password**: `/registration/newpassword/` - Create new password page.

## Database Models

### Administration Models

* **Business**: Represents a business entity with fields for name, customer type, business ID, currency, contact information, and more.
* **DomainToBusinessMapping**: Maps a domain to a Business with fields for domain and Business. One-to-one with Business.
* **Location**: Represents a physical location with fields for currency, country code, business hours, and more. Many-to-one with Business.
* **DaysOfOperation**: Represents operating days for a Location with fields for day of the week and location. One-to-one with Location.
* **Waiver**: Represents a waiver document associated with a Location. Many-to-one with Location.
* **Room**: Represents a room within a Location with fields for name, location, dimensions, and business ID. Many-to-one with Location.

### Registration Models

* **Profile**: Extends the User model to include additional fields such as language, user type, contact information, and more. Many-to-one with User.

These models define the core data structure for the Ruoom application, handling business, location, and user-related data. See their interaction in the following model diagram:

<img src="https://mintcdn.com/ruoom/S58yk56t2CMCWBwZ/images/ruoom_core_models.svg?fit=max&auto=format&n=S58yk56t2CMCWBwZ&q=85&s=e7b5ccc96e0d177fa2db4395f5dd2a96" alt="Ruoom Core Models" data-path="images/ruoom_core_models.svg" />
