# gustavobertucci/property-rental architecture

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

- Interactive diagram: https://gitdiagram.com/gustavobertucci/property-rental
- Repository: https://github.com/gustavobertucci/property-rental

## Overview

This repository is a Django REST backend for an imóvel-rental site. Its principal workflow routes client requests to user, property, contract, or payment viewsets, which use serializers and filters around the rental domain models; an additional endpoint imports users from a workbook. The README describes the product broadly, while the sampled code exposes these API capabilities and a property-chart action. The graph reflects shown routes and references; database use follows the configured Django backend, and unsampled runtime wiring is not inferred.

Main entry points: [`api/models.py`](https://github.com/gustavobertucci/property-rental/blob/master/api/models.py) (Rental Models), [`api/urls.py`](https://github.com/gustavobertucci/property-rental/blob/master/api/urls.py) (API Routes), [`api/views.py`](https://github.com/gustavobertucci/property-rental/blob/master/api/views.py) (Rental Viewsets), [`api/importar.py`](https://github.com/gustavobertucci/property-rental/blob/master/api/importar.py) (Workbook Import)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_api_routes["API Routes<br/>[urls.py]"]
  node_rental_api["Rental Viewsets<br/>[views.py]"]
  node_workbook_import["Workbook Import<br/>[importar.py]"]
  node_jwt_endpoints["JWT Endpoints<br/>[urls.py]"]
  node_serializers["API Serializers<br/>[serializers.py]"]
  node_filters["Query Filters<br/>[filters.py]"]
end

subgraph group_domain["Rental Domain"]
  node_domain_models["Rental Models<br/>[models.py]"]
  node_admin["Admin Interface<br/>[admin.py]"]
end

subgraph group_platform["Runtime and Storage"]
  node_root_routes["Project Routes<br/>[urls.py]"]
  node_db_config["Database Config<br/>[settings.py]"]
end

node_client(("API Client"))
node_mysql[("MySQL Database")]

node_root_routes -->|"includes"| node_api_routes
node_api_routes -->|"routes to"| node_rental_api
node_api_routes -->|"routes to"| node_workbook_import
node_api_routes -->|"configures"| node_jwt_endpoints
node_client -.->|"sends requests"| node_root_routes
node_rental_api -->|"uses"| node_serializers
node_rental_api -->|"uses"| node_filters
node_rental_api -->|"queries"| node_domain_models
node_filters -->|"filters"| node_domain_models
node_serializers -->|"serializes"| node_domain_models
node_workbook_import -->|"checks users"| node_domain_models
node_admin -->|"registers"| node_domain_models
node_db_config -->|"configures"| node_mysql

click node_root_routes "https://github.com/gustavobertucci/property-rental/blob/master/alugueis/urls.py"
click node_api_routes "https://github.com/gustavobertucci/property-rental/blob/master/api/urls.py"
click node_rental_api "https://github.com/gustavobertucci/property-rental/blob/master/api/views.py"
click node_workbook_import "https://github.com/gustavobertucci/property-rental/blob/master/api/importar.py"
click node_jwt_endpoints "https://github.com/gustavobertucci/property-rental/blob/master/api/urls.py"
click node_serializers "https://github.com/gustavobertucci/property-rental/blob/master/api/serializers.py"
click node_filters "https://github.com/gustavobertucci/property-rental/blob/master/api/filters.py"
click node_domain_models "https://github.com/gustavobertucci/property-rental/blob/master/api/models.py"
click node_admin "https://github.com/gustavobertucci/property-rental/blob/master/api/admin.py"
click node_db_config "https://github.com/gustavobertucci/property-rental/blob/master/alugueis/settings.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_api_routes,node_rental_api,node_workbook_import,node_jwt_endpoints,node_serializers,node_filters,node_client toneBlue
class node_domain_models,node_admin,node_mysql toneAmber
class node_root_routes,node_db_config toneMint
```

## Components

### HTTP API

- [API Routes](https://github.com/gustavobertucci/property-rental/blob/master/api/urls.py): `api/urls.py`
- [Rental Viewsets](https://github.com/gustavobertucci/property-rental/blob/master/api/views.py): `api/views.py`
- [Workbook Import](https://github.com/gustavobertucci/property-rental/blob/master/api/importar.py): `api/importar.py`
- [JWT Endpoints](https://github.com/gustavobertucci/property-rental/blob/master/api/urls.py): `api/urls.py`
- [API Serializers](https://github.com/gustavobertucci/property-rental/blob/master/api/serializers.py): `api/serializers.py`
- [Query Filters](https://github.com/gustavobertucci/property-rental/blob/master/api/filters.py): `api/filters.py`

### Rental Domain

- [Rental Models](https://github.com/gustavobertucci/property-rental/blob/master/api/models.py): `api/models.py`
- [Admin Interface](https://github.com/gustavobertucci/property-rental/blob/master/api/admin.py): `api/admin.py`

### Runtime and Storage

- [Project Routes](https://github.com/gustavobertucci/property-rental/blob/master/alugueis/urls.py): `alugueis/urls.py`
- [Database Config](https://github.com/gustavobertucci/property-rental/blob/master/alugueis/settings.py): `alugueis/settings.py`

### Other components

- **API Client**
- **MySQL Database**

## Connections

- Project Routes → API Routes: includes (evidence: `alugueis/urls.py`)
- API Routes → Rental Viewsets: routes to (evidence: `api/urls.py`)
- API Routes → Workbook Import: routes to (evidence: `api/urls.py`)
- API Routes → JWT Endpoints: configures (evidence: `api/urls.py`)
- API Client → Project Routes: sends requests
- Rental Viewsets → API Serializers: uses (evidence: `api/views.py`)
- Rental Viewsets → Query Filters: uses (evidence: `api/views.py`)
- Rental Viewsets → Rental Models: queries (evidence: `api/views.py`)
- Query Filters → Rental Models: filters (evidence: `api/filters.py`)
- API Serializers → Rental Models: serializes (evidence: `api/serializers.py`)
- Workbook Import → Rental Models: checks users (evidence: `api/importar.py`)
- Admin Interface → Rental Models: registers (evidence: `api/admin.py`)
- Database Config → MySQL Database: configures (evidence: `alugueis/settings.py`)
