# aerele/real_estate architecture

> Architecture diagram of the GitHub repository aerele/real_estate, 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/aerele/real_estate
- Repository: https://github.com/aerele/real_estate

## Overview

Real Estate is a Frappe application for managing real-estate projects and site inventory, booking sites, and tracking payments against booking EMIs. The principal workflow is to submit a site booking, update site availability, create or identify the customer, and generate due-payment records; additional payment entries are supported. Reports cover collections, outstanding balances, site status, booking status, and cancelled payments. The sampled booking code shows its writes to site, customer, and due-payment records. Other report and domain modules are represented from the tree; their internal wiring was not inspected.

Main entry points: [`real_estate/real_estate/doctype/site_booking/site_booking.py`](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/site_booking/site_booking.py) (Site Booking), [`real_estate/real_estate/doctype/due_payment/due_payment.py`](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/due_payment/due_payment.py) (Due Payments), [`real_estate/real_estate/report/site_status/site_status.py`](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/report/site_status/site_status.py) (Site Status Report), [`real_estate/real_estate/report/collection_report/collection_report.py`](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/report/collection_report/collection_report.py) (Collection Report)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inventory["Projects And Inventory"]
  node_project["Projects<br/>[project.py]"]
  node_blocks["Blocks<br/>[blocks.py]"]
  node_sites[("Site Inventory<br/>[sites.py]")]
end

subgraph group_booking["Booking And Customers"]
  node_booking["Site Booking<br/>[site_booking.py]"]
  node_customer[("Customers<br/>[customer.py]")]
  node_multi_site["Multi-site Details"]
  node_purchase["Purchase Confirmation"]
end

subgraph group_payments["Payment Tracking"]
  node_due[("Due Payments<br/>[due_payment.py]")]
  node_booking_payments["Booking Payments"]
end

subgraph group_reporting["Reports"]
  node_cancelled["Cancelled Payments"]
  node_collection["Collection Report"]
  node_outstanding["Outstanding Report<br/>[outstanding.py]"]
  node_site_booking_status["Booking Status Report"]
  node_site_status["Site Status Report<br/>[site_status.py]"]
end

node_user(("Frappe User"))

node_user -->|"submits booking"| node_booking
node_booking -->|"updates availability"| node_sites
node_booking -->|"creates if absent"| node_customer
node_booking -->|"creates entries"| node_due
node_due -->|"reads booking details"| node_booking
node_user -->|"records payment"| node_due
node_user -.->|"runs report"| node_collection
node_collection -->|"reads payments"| node_due
node_collection -->|"reads booking details"| node_booking
node_user -.->|"runs report"| node_site_status
node_site_status -->|"reads inventory"| node_sites
node_site_status -->|"reads booking details"| node_booking
node_site_status -->|"totals payments"| node_due
node_user -.->|"runs report"| node_site_booking_status
node_site_booking_status -->|"lists bookings"| node_booking
node_site_booking_status -->|"totals payments"| node_due
node_user -.->|"runs report"| node_outstanding
node_user -.->|"runs report"| node_cancelled

click node_project "https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/project/project.py"
click node_blocks "https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/blocks/blocks.py"
click node_sites "https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/sites/sites.py"
click node_booking "https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/site_booking/site_booking.py"
click node_customer "https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/customer/customer.py"
click node_multi_site "https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/multi_site_table/multi_site_table.py"
click node_purchase "https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/site_purchase_confirmation/site_purchase_confirmation.py"
click node_due "https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/due_payment/due_payment.py"
click node_booking_payments "https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/site_booking_payments/site_booking_payments.py"
click node_cancelled "https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/report/cancelled_payments/cancelled_payments.py"
click node_collection "https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/report/collection_report/collection_report.py"
click node_outstanding "https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/report/outstanding/outstanding.py"
click node_site_booking_status "https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/report/site_booking_status/site_booking_status.py"
click node_site_status "https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/report/site_status/site_status.py"

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_project,node_blocks,node_sites,node_user toneBlue
class node_booking,node_customer,node_multi_site,node_purchase toneAmber
class node_due,node_booking_payments toneMint
class node_cancelled,node_collection,node_outstanding,node_site_booking_status,node_site_status toneRose
```

## Components

### Projects And Inventory

- [Projects](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/project/project.py): `real_estate/real_estate/doctype/project/project.py`
- [Blocks](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/blocks/blocks.py): `real_estate/real_estate/doctype/blocks/blocks.py`
- [Site Inventory](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/sites/sites.py): `real_estate/real_estate/doctype/sites/sites.py`

### Booking And Customers

- [Site Booking](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/site_booking/site_booking.py): `real_estate/real_estate/doctype/site_booking/site_booking.py`
- [Customers](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/customer/customer.py): `real_estate/real_estate/doctype/customer/customer.py`
- [Multi-site Details](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/multi_site_table/multi_site_table.py): `real_estate/real_estate/doctype/multi_site_table/multi_site_table.py`
- [Purchase Confirmation](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/site_purchase_confirmation/site_purchase_confirmation.py): `real_estate/real_estate/doctype/site_purchase_confirmation/site_purchase_confirmation.py`

### Payment Tracking

- [Due Payments](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/due_payment/due_payment.py): `real_estate/real_estate/doctype/due_payment/due_payment.py`
- [Booking Payments](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/doctype/site_booking_payments/site_booking_payments.py): `real_estate/real_estate/doctype/site_booking_payments/site_booking_payments.py`

### Reports

- [Cancelled Payments](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/report/cancelled_payments/cancelled_payments.py): `real_estate/real_estate/report/cancelled_payments/cancelled_payments.py`
- [Collection Report](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/report/collection_report/collection_report.py): `real_estate/real_estate/report/collection_report/collection_report.py`
- [Outstanding Report](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/report/outstanding/outstanding.py): `real_estate/real_estate/report/outstanding/outstanding.py`
- [Booking Status Report](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/report/site_booking_status/site_booking_status.py): `real_estate/real_estate/report/site_booking_status/site_booking_status.py`
- [Site Status Report](https://github.com/aerele/real_estate/blob/master/real_estate/real_estate/report/site_status/site_status.py): `real_estate/real_estate/report/site_status/site_status.py`

### Other components

- **Frappe User**

## Connections

- Frappe User → Site Booking: submits booking (evidence: `real_estate/real_estate/doctype/site_booking/site_booking.py`)
- Site Booking → Site Inventory: updates availability (evidence: `real_estate/real_estate/doctype/site_booking/site_booking.py`)
- Site Booking → Customers: creates if absent (evidence: `real_estate/real_estate/doctype/site_booking/site_booking.py`)
- Site Booking → Due Payments: creates entries (evidence: `real_estate/real_estate/doctype/site_booking/site_booking.py`)
- Due Payments → Site Booking: reads booking details (evidence: `real_estate/real_estate/doctype/due_payment/due_payment.py`)
- Frappe User → Due Payments: records payment (evidence: `real_estate/real_estate/doctype/due_payment/due_payment.py`)
- Frappe User → Collection Report: runs report
- Collection Report → Due Payments: reads payments (evidence: `real_estate/real_estate/report/collection_report/collection_report.py`)
- Collection Report → Site Booking: reads booking details (evidence: `real_estate/real_estate/report/collection_report/collection_report.py`)
- Frappe User → Site Status Report: runs report
- Site Status Report → Site Inventory: reads inventory (evidence: `real_estate/real_estate/report/site_status/site_status.py`)
- Site Status Report → Site Booking: reads booking details (evidence: `real_estate/real_estate/report/site_status/site_status.py`)
- Site Status Report → Due Payments: totals payments (evidence: `real_estate/real_estate/report/site_status/site_status.py`)
- Frappe User → Booking Status Report: runs report
- Booking Status Report → Site Booking: lists bookings (evidence: `real_estate/real_estate/report/site_booking_status/site_booking_status.py`)
- Booking Status Report → Due Payments: totals payments (evidence: `real_estate/real_estate/report/site_booking_status/site_booking_status.py`)
- Frappe User → Outstanding Report: runs report
- Frappe User → Cancelled Payments: runs report
