# gadilinga-06/real_estate architecture

> Architecture diagram of the GitHub repository gadilinga-06/real_estate, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gadilinga-06/real_estate
- Repository: https://github.com/gadilinga-06/real_estate

## Overview

Real Estate Manager combines a PHP admin application for maintaining listings and handling leads with a public property-search website. The main user journey is: visitors search published listings, inspect a property, and submit an enquiry; agents then manage properties and follow up on enquiries in the admin app. Other documented capabilities include customer records, reporting, file handling, exports, backups, and a printable property sheet. The API inventory and README support these broader branches, but their unsampled internal call wiring is not asserted here.

Main entry points: [`backend/index.php`](https://github.com/gadilinga-06/real_estate/blob/main/backend/index.php) (Admin app), [`website/property.php`](https://github.com/gadilinga-06/real_estate/blob/main/website/property.php) (Property details), [`backend/sheet.php`](https://github.com/gadilinga-06/real_estate/blob/main/backend/sheet.php) (Printable sheet), [`website/index.php`](https://github.com/gadilinga-06/real_estate/blob/main/website/index.php) (Search listings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Agent Admin"]
  node_admin_ui["Admin app<br/>[index.php]"]
  node_property_sheet["Printable sheet<br/>[sheet.php]"]
end

subgraph group_public["Public Website"]
  node_listing["Search listings<br/>[index.php]"]
  node_property_detail["Property details<br/>[property.php]"]
  node_general_contact["General contact<br/>[contact.php]"]
end

subgraph group_api["Management API"]
  node_auth["Login and settings<br/>[auth.php]"]
  node_properties["Property records<br/>[properties.php]"]
  node_customers["Customer records<br/>[customers.php]"]
  node_notes["Customer notes<br/>[notes.php]"]
  node_enquiries["Enquiry follow-up<br/>[enquiries.php]"]
  node_dashboard["Dashboard stats<br/>[dashboard.php]"]
  node_reports["Reports<br/>[reports.php]"]
  node_data_transfer["Import and export<br/>[export.php]"]
  node_backup["Backups<br/>[backup.php]"]
end

subgraph group_files["Files and Documents"]
  node_upload["File uploads<br/>[upload.php]"]
  node_image_processing["Photo optimization<br/>[images.php]"]
  node_file_serve["File serving<br/>[serve.php]"]
end

node_agent(("Agent"))
node_visitor(("Property seeker"))
node_mysql[("MySQL database")]
node_private_files[("Photos and documents")]
node_maps["Google Maps"]
node_whatsapp["WhatsApp"]

node_agent -->|"uses"| node_admin_ui
node_admin_ui -->|"requests login"| node_auth
node_admin_ui -->|"manages listings"| node_properties
node_admin_ui -->|"manages customers"| node_customers
node_admin_ui -->|"manages notes"| node_notes
node_admin_ui -->|"follows up"| node_enquiries
node_admin_ui -->|"requests stats"| node_dashboard
node_admin_ui -->|"requests reports"| node_reports
node_admin_ui -->|"imports or exports"| node_data_transfer
node_admin_ui -->|"requests backup"| node_backup
node_agent -->|"prints"| node_property_sheet
node_visitor -->|"searches"| node_listing
node_listing -->|"queries listings"| node_mysql
node_listing -->|"opens property"| node_property_detail
node_property_detail -->|"reads property and files"| node_mysql
node_property_detail -->|"finds or creates customer"| node_customers
node_property_detail -->|"records enquiry"| node_enquiries
node_visitor -->|"submits contact"| node_general_contact
node_auth -->|"checks and updates users"| node_mysql
node_properties -->|"reads and writes"| node_mysql
node_customers -->|"reads and writes"| node_mysql
node_notes -->|"reads and writes"| node_mysql
node_enquiries -->|"reads and writes"| node_mysql
node_dashboard -->|"queries statistics"| node_mysql
node_reports -->|"queries records"| node_mysql
node_data_transfer -->|"transfers records"| node_mysql
node_backup -->|"backs up database"| node_mysql
node_upload -->|"stores uploads"| node_private_files
node_upload -->|"optimizes photos"| node_image_processing
node_image_processing -->|"writes resized images"| node_private_files
node_file_serve -->|"reads files"| node_private_files
node_property_detail -.->|"embeds location"| node_maps
node_property_detail -.->|"shares listing"| node_whatsapp
node_property_sheet -->|"reads property"| node_mysql
node_property_sheet -->|"loads photos"| node_file_serve

click node_admin_ui "https://github.com/gadilinga-06/real_estate/blob/main/backend/index.php"
click node_auth "https://github.com/gadilinga-06/real_estate/blob/main/backend/api/auth.php"
click node_properties "https://github.com/gadilinga-06/real_estate/blob/main/backend/api/properties.php"
click node_customers "https://github.com/gadilinga-06/real_estate/blob/main/backend/api/customers.php"
click node_notes "https://github.com/gadilinga-06/real_estate/blob/main/backend/api/notes.php"
click node_enquiries "https://github.com/gadilinga-06/real_estate/blob/main/backend/api/enquiries.php"
click node_dashboard "https://github.com/gadilinga-06/real_estate/blob/main/backend/api/dashboard.php"
click node_reports "https://github.com/gadilinga-06/real_estate/blob/main/backend/api/reports.php"
click node_data_transfer "https://github.com/gadilinga-06/real_estate/blob/main/backend/api/export.php"
click node_backup "https://github.com/gadilinga-06/real_estate/blob/main/backend/api/backup.php"
click node_listing "https://github.com/gadilinga-06/real_estate/blob/main/website/index.php"
click node_property_detail "https://github.com/gadilinga-06/real_estate/blob/main/website/property.php"
click node_general_contact "https://github.com/gadilinga-06/real_estate/blob/main/website/contact.php"
click node_property_sheet "https://github.com/gadilinga-06/real_estate/blob/main/backend/sheet.php"
click node_upload "https://github.com/gadilinga-06/real_estate/blob/main/backend/api/upload.php"
click node_image_processing "https://github.com/gadilinga-06/real_estate/blob/main/backend/lib/images.php"
click node_file_serve "https://github.com/gadilinga-06/real_estate/blob/main/backend/api/serve.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_admin_ui,node_property_sheet toneBlue
class node_listing,node_property_detail,node_general_contact,node_mysql,node_private_files toneAmber
class node_auth,node_properties,node_customers,node_notes,node_enquiries,node_dashboard,node_reports,node_data_transfer,node_backup toneMint
class node_upload,node_image_processing,node_file_serve toneRose
class node_agent,node_visitor,node_maps,node_whatsapp toneIndigo
```

## Components

### Agent Admin

- [Admin app](https://github.com/gadilinga-06/real_estate/blob/main/backend/index.php): `backend/index.php`
- [Printable sheet](https://github.com/gadilinga-06/real_estate/blob/main/backend/sheet.php): `backend/sheet.php`

### Public Website

- [Search listings](https://github.com/gadilinga-06/real_estate/blob/main/website/index.php): `website/index.php`
- [Property details](https://github.com/gadilinga-06/real_estate/blob/main/website/property.php): `website/property.php`
- [General contact](https://github.com/gadilinga-06/real_estate/blob/main/website/contact.php): `website/contact.php`

### Management API

- [Login and settings](https://github.com/gadilinga-06/real_estate/blob/main/backend/api/auth.php): `backend/api/auth.php`
- [Property records](https://github.com/gadilinga-06/real_estate/blob/main/backend/api/properties.php): `backend/api/properties.php`
- [Customer records](https://github.com/gadilinga-06/real_estate/blob/main/backend/api/customers.php): `backend/api/customers.php`
- [Customer notes](https://github.com/gadilinga-06/real_estate/blob/main/backend/api/notes.php): `backend/api/notes.php`
- [Enquiry follow-up](https://github.com/gadilinga-06/real_estate/blob/main/backend/api/enquiries.php): `backend/api/enquiries.php`
- [Dashboard stats](https://github.com/gadilinga-06/real_estate/blob/main/backend/api/dashboard.php): `backend/api/dashboard.php`
- [Reports](https://github.com/gadilinga-06/real_estate/blob/main/backend/api/reports.php): `backend/api/reports.php`
- [Import and export](https://github.com/gadilinga-06/real_estate/blob/main/backend/api/export.php): `backend/api/export.php`
- [Backups](https://github.com/gadilinga-06/real_estate/blob/main/backend/api/backup.php): `backend/api/backup.php`

### Files and Documents

- [File uploads](https://github.com/gadilinga-06/real_estate/blob/main/backend/api/upload.php): `backend/api/upload.php`
- [Photo optimization](https://github.com/gadilinga-06/real_estate/blob/main/backend/lib/images.php): `backend/lib/images.php`
- [File serving](https://github.com/gadilinga-06/real_estate/blob/main/backend/api/serve.php): `backend/api/serve.php`

### Other components

- **Agent**
- **Property seeker**
- **MySQL database**
- **Photos and documents**
- **Google Maps**
- **WhatsApp**

## Connections

- Agent → Admin app: uses
- Admin app → Login and settings: requests login
- Admin app → Property records: manages listings
- Admin app → Customer records: manages customers
- Admin app → Customer notes: manages notes
- Admin app → Enquiry follow-up: follows up
- Admin app → Dashboard stats: requests stats
- Admin app → Reports: requests reports
- Admin app → Import and export: imports or exports
- Admin app → Backups: requests backup
- Agent → Printable sheet: prints
- Property seeker → Search listings: searches
- Search listings → MySQL database: queries listings
- Search listings → Property details: opens property
- Property details → MySQL database: reads property and files
- Property details → Customer records: finds or creates customer
- Property details → Enquiry follow-up: records enquiry
- Property seeker → General contact: submits contact
- Login and settings → MySQL database: checks and updates users
- Property records → MySQL database: reads and writes
- Customer records → MySQL database: reads and writes
- Customer notes → MySQL database: reads and writes
- Enquiry follow-up → MySQL database: reads and writes
- Dashboard stats → MySQL database: queries statistics
- Reports → MySQL database: queries records
- Import and export → MySQL database: transfers records
- Backups → MySQL database: backs up database
- File uploads → Photos and documents: stores uploads
- File uploads → Photo optimization: optimizes photos
- Photo optimization → Photos and documents: writes resized images
- File serving → Photos and documents: reads files
- Property details → Google Maps: embeds location
- Property details → WhatsApp: shares listing
- Printable sheet → MySQL database: reads property
- Printable sheet → File serving: loads photos
