# maxime-philippe/share-my-house architecture

> Architecture diagram of the GitHub repository maxime-philippe/share-my-house, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/maxime-philippe/share-my-house
- Repository: https://github.com/maxime-philippe/share-my-house

## Overview

ShareMyHouse is a PHP home-rental site. A visitor enters through the front controller, which dispatches account and page actions; page handlers retrieve data and render views. The main product stages are browsing/filtering listings, viewing a property and reserving it, managing listings and reservations, and using profiles and messaging. The README also documents interactive reservation calendars and listing filters. Model implementations and AJAX wiring were not excerpted, so those relationships are not asserted here.

Main entry points: [`controller/frontend.php`](https://github.com/maxime-philippe/share-my-house/blob/main/controller/frontend.php) (Page handlers), [`view/template.php`](https://github.com/maxime-philippe/share-my-house/blob/main/view/template.php) (Page template), [`index.php`](https://github.com/maxime-philippe/share-my-house/blob/main/index.php) (Front controller), [`view/locationsView.php`](https://github.com/maxime-philippe/share-my-house/blob/main/view/locationsView.php) (Listing search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Request handling"]
  node_front["Front controller<br/>[index.php]"]
  node_frontend["Page handlers<br/>[frontend.php]"]
  node_backend["Action handlers<br/>[backend.php]"]
  node_template["Page template<br/>[template.php]"]
  node_home["Home page<br/>[homeView.php]"]
  node_errors["Error page<br/>[errorView.php]"]
end

subgraph group_domain["Rental workflows"]
  node_listing["Listing search<br/>[locationsView.php]"]
  node_property["Property details"]
  node_rental["Manage listings<br/>[rentalView.php]"]
  node_bookings["Reservations<br/>[bookedView.php]"]
  node_ajax_reservation["Reservation dates"]
  node_ajax_listing["Listing endpoints"]
end

subgraph group_account["Accounts and messaging"]
  node_profile["User profiles<br/>[profilView.php]"]
  node_messages["Messaging page<br/>[messagerieView.php]"]
  node_ajax_messages["Message endpoints"]
end

subgraph group_data["Data access"]
  node_frontend_model["Page data model<br/>[frontend.php]"]
  node_backend_model["Action data model<br/>[backend.php]"]
end

node_visitor(("Visitor"))

node_visitor -->|"requests pages"| node_front
node_front -->|"loads handlers"| node_frontend
node_front -->|"loads handlers"| node_backend
node_front -->|"renders errors"| node_errors
node_frontend -->|"queries data"| node_frontend_model
node_frontend -->|"renders home"| node_home
node_frontend -->|"renders listings"| node_listing
node_frontend -->|"renders property"| node_property
node_frontend -->|"renders listings"| node_rental
node_frontend -->|"renders bookings"| node_bookings
node_frontend -->|"renders profile"| node_profile
node_frontend -->|"renders messaging"| node_messages
node_backend -->|"loads model"| node_backend_model
node_home -->|"uses layout"| node_template
node_listing -->|"uses layout"| node_template
node_property -->|"uses layout"| node_template
node_rental -->|"uses layout"| node_template
node_bookings -->|"uses layout"| node_template
node_profile -->|"uses layout"| node_template
node_messages -->|"uses layout"| node_template
node_errors -->|"uses layout"| node_template
node_property -.->|"checks dates"| node_ajax_reservation
node_listing -.->|"loads more"| node_ajax_listing
node_messages -.->|"loads conversations"| node_ajax_messages

click node_front "https://github.com/maxime-philippe/share-my-house/blob/main/index.php"
click node_frontend "https://github.com/maxime-philippe/share-my-house/blob/main/controller/frontend.php"
click node_backend "https://github.com/maxime-philippe/share-my-house/blob/main/controller/backend.php"
click node_template "https://github.com/maxime-philippe/share-my-house/blob/main/view/template.php"
click node_home "https://github.com/maxime-philippe/share-my-house/blob/main/view/homeView.php"
click node_errors "https://github.com/maxime-philippe/share-my-house/blob/main/view/errorView.php"
click node_listing "https://github.com/maxime-philippe/share-my-house/blob/main/view/locationsView.php"
click node_property "https://github.com/maxime-philippe/share-my-house/blob/main/view/locationUniqueView.php"
click node_rental "https://github.com/maxime-philippe/share-my-house/blob/main/view/rentalView.php"
click node_bookings "https://github.com/maxime-philippe/share-my-house/blob/main/view/bookedView.php"
click node_ajax_reservation "https://github.com/maxime-philippe/share-my-house/blob/main/ajax/date-reservation.php"
click node_profile "https://github.com/maxime-philippe/share-my-house/blob/main/view/profilView.php"
click node_messages "https://github.com/maxime-philippe/share-my-house/blob/main/view/messagerieView.php"
click node_ajax_messages "https://github.com/maxime-philippe/share-my-house/tree/main/ajax"
click node_ajax_listing "https://github.com/maxime-philippe/share-my-house/tree/main/ajax"
click node_frontend_model "https://github.com/maxime-philippe/share-my-house/blob/main/model/frontend.php"
click node_backend_model "https://github.com/maxime-philippe/share-my-house/blob/main/model/backend.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_front,node_frontend,node_backend,node_template,node_home,node_errors toneBlue
class node_listing,node_property,node_rental,node_bookings,node_ajax_reservation,node_ajax_listing toneAmber
class node_profile,node_messages,node_ajax_messages toneMint
class node_frontend_model,node_backend_model toneRose
class node_visitor toneIndigo
```

## Components

### Request handling

- [Front controller](https://github.com/maxime-philippe/share-my-house/blob/main/index.php): `index.php`
- [Page handlers](https://github.com/maxime-philippe/share-my-house/blob/main/controller/frontend.php): `controller/frontend.php`
- [Action handlers](https://github.com/maxime-philippe/share-my-house/blob/main/controller/backend.php): `controller/backend.php`
- [Page template](https://github.com/maxime-philippe/share-my-house/blob/main/view/template.php): `view/template.php`
- [Home page](https://github.com/maxime-philippe/share-my-house/blob/main/view/homeView.php): `view/homeView.php`
- [Error page](https://github.com/maxime-philippe/share-my-house/blob/main/view/errorView.php): `view/errorView.php`

### Rental workflows

- [Listing search](https://github.com/maxime-philippe/share-my-house/blob/main/view/locationsView.php): `view/locationsView.php`
- [Property details](https://github.com/maxime-philippe/share-my-house/blob/main/view/locationUniqueView.php): `view/locationUniqueView.php`
- [Manage listings](https://github.com/maxime-philippe/share-my-house/blob/main/view/rentalView.php): `view/rentalView.php`
- [Reservations](https://github.com/maxime-philippe/share-my-house/blob/main/view/bookedView.php): `view/bookedView.php`
- [Reservation dates](https://github.com/maxime-philippe/share-my-house/blob/main/ajax/date-reservation.php): `ajax/date-reservation.php`
- [Listing endpoints](https://github.com/maxime-philippe/share-my-house/tree/main/ajax): `ajax`

### Accounts and messaging

- [User profiles](https://github.com/maxime-philippe/share-my-house/blob/main/view/profilView.php): `view/profilView.php`
- [Messaging page](https://github.com/maxime-philippe/share-my-house/blob/main/view/messagerieView.php): `view/messagerieView.php`
- [Message endpoints](https://github.com/maxime-philippe/share-my-house/tree/main/ajax): `ajax`

### Data access

- [Page data model](https://github.com/maxime-philippe/share-my-house/blob/main/model/frontend.php): `model/frontend.php`
- [Action data model](https://github.com/maxime-philippe/share-my-house/blob/main/model/backend.php): `model/backend.php`

### Other components

- **Visitor**

## Connections

- Visitor → Front controller: requests pages (evidence: `index.php`)
- Front controller → Page handlers: loads handlers (evidence: `index.php`)
- Front controller → Action handlers: loads handlers (evidence: `index.php`)
- Front controller → Error page: renders errors (evidence: `index.php`)
- Page handlers → Page data model: queries data (evidence: `controller/frontend.php`)
- Page handlers → Home page: renders home (evidence: `controller/frontend.php`)
- Page handlers → Listing search: renders listings (evidence: `controller/frontend.php`)
- Page handlers → Property details: renders property (evidence: `controller/frontend.php`)
- Page handlers → Manage listings: renders listings (evidence: `controller/frontend.php`)
- Page handlers → Reservations: renders bookings (evidence: `controller/frontend.php`)
- Page handlers → User profiles: renders profile (evidence: `controller/frontend.php`)
- Page handlers → Messaging page: renders messaging (evidence: `controller/frontend.php`)
- Action handlers → Action data model: loads model (evidence: `controller/backend.php`)
- Home page → Page template: uses layout (evidence: `view/homeView.php`)
- Listing search → Page template: uses layout (evidence: `view/locationsView.php`)
- Property details → Page template: uses layout (evidence: `view/locationUniqueView.php`)
- Manage listings → Page template: uses layout (evidence: `view/rentalView.php`)
- Reservations → Page template: uses layout (evidence: `view/bookedView.php`)
- User profiles → Page template: uses layout (evidence: `view/profilView.php`)
- Messaging page → Page template: uses layout (evidence: `view/messagerieView.php`)
- Error page → Page template: uses layout (evidence: `view/errorView.php`)
- Property details → Reservation dates: checks dates
- Listing search → Listing endpoints: loads more
- Messaging page → Message endpoints: loads conversations
