# litiobyte/loteo-facil architecture

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

- Interactive diagram: https://gitdiagram.com/litiobyte/loteo-facil
- Repository: https://github.com/litiobyte/loteo-facil

## Overview

Loteo Fácil is a single-community lot and property-owner administration system, with configurable lots, shares, or mixed operation. Administrators configure owners and property, record expenses, distribute charges, collect and apply payments, and close accounting periods; owners have a separate portal for their financial and property information. The README documents the share-administration flow and the major map, import, finance, and closing capabilities. Some subsystem links are omitted because their implementations or call sites were not sampled.

Main entry points: [`app/Filament/Admin/Resources/ExpenseResource.php`](https://github.com/litiobyte/loteo-facil/blob/main/app/Filament/Admin/Resources/ExpenseResource.php) (Admin panel), [`app/Models/Propietario.php`](https://github.com/litiobyte/loteo-facil/blob/main/app/Models/Propietario.php) (Property owners), [`app/Domain/Expenses/Services/ExpenseDistributionService.php`](https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Expenses/Services/ExpenseDistributionService.php) (Expense distribution), [`app/Domain/Collections/Services/CollectionApplicationService.php`](https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Collections/Services/CollectionApplicationService.php) (Collections and allocation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_admin["Admin panel"]
  node_owner_portal["Owner portal<br/>[EstadoDeCuenta.php]"]
end

subgraph group_ownership["Property and ownership"]
  node_users[("User accounts<br/>[User.php]")]
  node_owners[("Property owners<br/>[Propietario.php]")]
  node_lots[("Lots and assignments<br/>[Lote.php]")]
  node_shares[("Share holdings<br/>[ShareHolding.php]")]
  node_community_settings[("Community settings")]
end

subgraph group_finance["Expenses and collections"]
  node_expenses[("Expense management<br/>[Expense.php]")]
  node_distribution["Expense distribution"]
  node_charges[("Owner charges<br/>[PartnerCharge.php]")]
  node_collections["Collections and allocation"]
  node_funding["Expense funding"]
  node_balances["Cash and balances"]
end

subgraph group_accounting["Accounting"]
  node_statements["Partner statements"]
  node_period_closing["Period closing"]
end

subgraph group_ingestion["Imports and maps"]
  node_imports["Administrative imports"]
  node_maps["Map persistence"]
end

node_admin_actor(("Administrator"))
node_owner_actor(("Owner"))

node_admin_actor -->|"manages"| node_admin
node_owner_actor -->|"views account"| node_owner_portal
node_admin -->|"configures modes"| node_community_settings
node_admin -->|"records holdings"| node_shares
node_admin -->|"creates expenses"| node_expenses
node_admin -.->|"imports records"| node_imports
node_admin -.->|"manages maps"| node_maps
node_admin -.->|"records collections"| node_collections
node_admin -->|"records funding"| node_funding
node_admin -->|"checks projection"| node_balances
node_expenses -->|"distributes expenses"| node_distribution
node_distribution -->|"reads modes"| node_community_settings
node_distribution -->|"uses holdings"| node_shares
node_distribution -.->|"generates charges"| node_charges
node_collections -->|"applies payments"| node_charges
node_owner_portal -.->|"shows owner data"| node_owners
node_owners -->|"assigned lots"| node_lots
node_owners -->|"holds shares"| node_shares
node_owners -->|"owes charges"| node_charges
node_owners -->|"has collections"| node_collections
node_period_closing -->|"summarizes charges"| node_charges
node_period_closing -->|"summarizes collections"| node_collections

click node_admin "https://github.com/litiobyte/loteo-facil/blob/main/app/Filament/Admin/Resources/ExpenseResource.php"
click node_owner_portal "https://github.com/litiobyte/loteo-facil/blob/main/app/Filament/Owner/Pages/EstadoDeCuenta.php"
click node_users "https://github.com/litiobyte/loteo-facil/blob/main/app/Models/User.php"
click node_owners "https://github.com/litiobyte/loteo-facil/blob/main/app/Models/Propietario.php"
click node_lots "https://github.com/litiobyte/loteo-facil/blob/main/app/Models/Lote.php"
click node_shares "https://github.com/litiobyte/loteo-facil/blob/main/app/Models/ShareHolding.php"
click node_community_settings "https://github.com/litiobyte/loteo-facil/blob/main/app/Models/CommunitySetting.php"
click node_expenses "https://github.com/litiobyte/loteo-facil/blob/main/app/Models/Expense.php"
click node_distribution "https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Expenses/Services/ExpenseDistributionService.php"
click node_charges "https://github.com/litiobyte/loteo-facil/blob/main/app/Models/PartnerCharge.php"
click node_collections "https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Collections/Services/CollectionApplicationService.php"
click node_funding "https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Expenses/Services/ExpenseFundingPaymentService.php"
click node_balances "https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Balances/Services/CashBalanceService.php"
click node_statements "https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Statements/Services/PartnerStatementService.php"
click node_period_closing "https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Accounting/Services/MonthlyClosingService.php"
click node_imports "https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Imports/Services/AdministrativeImportService.php"
click node_maps "https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Maps/Services/MapPersistenceService.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,node_owner_portal toneBlue
class node_users,node_owners,node_lots,node_shares,node_community_settings toneAmber
class node_expenses,node_distribution,node_charges,node_collections,node_funding,node_balances toneMint
class node_statements,node_period_closing toneRose
class node_imports,node_maps,node_admin_actor,node_owner_actor toneIndigo
```

## Components

### User interfaces

- [Admin panel](https://github.com/litiobyte/loteo-facil/blob/main/app/Filament/Admin/Resources/ExpenseResource.php): `app/Filament/Admin/Resources/ExpenseResource.php`
- [Owner portal](https://github.com/litiobyte/loteo-facil/blob/main/app/Filament/Owner/Pages/EstadoDeCuenta.php): `app/Filament/Owner/Pages/EstadoDeCuenta.php`

### Property and ownership

- [User accounts](https://github.com/litiobyte/loteo-facil/blob/main/app/Models/User.php): `app/Models/User.php`
- [Property owners](https://github.com/litiobyte/loteo-facil/blob/main/app/Models/Propietario.php): `app/Models/Propietario.php`
- [Lots and assignments](https://github.com/litiobyte/loteo-facil/blob/main/app/Models/Lote.php): `app/Models/Lote.php`
- [Share holdings](https://github.com/litiobyte/loteo-facil/blob/main/app/Models/ShareHolding.php): `app/Models/ShareHolding.php`
- [Community settings](https://github.com/litiobyte/loteo-facil/blob/main/app/Models/CommunitySetting.php): `app/Models/CommunitySetting.php`

### Expenses and collections

- [Expense management](https://github.com/litiobyte/loteo-facil/blob/main/app/Models/Expense.php): `app/Models/Expense.php`
- [Expense distribution](https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Expenses/Services/ExpenseDistributionService.php): `app/Domain/Expenses/Services/ExpenseDistributionService.php`
- [Owner charges](https://github.com/litiobyte/loteo-facil/blob/main/app/Models/PartnerCharge.php): `app/Models/PartnerCharge.php`
- [Collections and allocation](https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Collections/Services/CollectionApplicationService.php): `app/Domain/Collections/Services/CollectionApplicationService.php`
- [Expense funding](https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Expenses/Services/ExpenseFundingPaymentService.php): `app/Domain/Expenses/Services/ExpenseFundingPaymentService.php`
- [Cash and balances](https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Balances/Services/CashBalanceService.php): `app/Domain/Balances/Services/CashBalanceService.php`

### Accounting

- [Partner statements](https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Statements/Services/PartnerStatementService.php): `app/Domain/Statements/Services/PartnerStatementService.php`
- [Period closing](https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Accounting/Services/MonthlyClosingService.php): `app/Domain/Accounting/Services/MonthlyClosingService.php`

### Imports and maps

- [Administrative imports](https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Imports/Services/AdministrativeImportService.php): `app/Domain/Imports/Services/AdministrativeImportService.php`
- [Map persistence](https://github.com/litiobyte/loteo-facil/blob/main/app/Domain/Maps/Services/MapPersistenceService.php): `app/Domain/Maps/Services/MapPersistenceService.php`

### Other components

- **Administrator**
- **Owner**

## Connections

- Administrator → Admin panel: manages (evidence: `README.md`)
- Owner → Owner portal: views account (evidence: `README.md`)
- Admin panel → Community settings: configures modes (evidence: `README.md`)
- Admin panel → Share holdings: records holdings (evidence: `README.md`)
- Admin panel → Expense management: creates expenses (evidence: `README.md`)
- Admin panel → Administrative imports: imports records
- Admin panel → Map persistence: manages maps
- Admin panel → Collections and allocation: records collections
- Admin panel → Expense funding: records funding (evidence: `app/Filament/Admin/Resources/ExpenseResource/RelationManagers/FundingCollectionsRelationManager.php`)
- Admin panel → Cash and balances: checks projection (evidence: `app/Filament/Admin/Resources/ExpenseResource/RelationManagers/FundingCollectionsRelationManager.php`)
- Expense management → Expense distribution: distributes expenses (evidence: `README.md`)
- Expense distribution → Community settings: reads modes (evidence: `app/Domain/Expenses/Services/ExpenseDistributionService.php`)
- Expense distribution → Share holdings: uses holdings (evidence: `app/Domain/Expenses/Services/ExpenseDistributionService.php`)
- Expense distribution → Owner charges: generates charges
- Collections and allocation → Owner charges: applies payments (evidence: `app/Domain/Collections/Services/CollectionApplicationService.php`)
- Owner portal → Property owners: shows owner data
- Property owners → Lots and assignments: assigned lots (evidence: `app/Models/Propietario.php`)
- Property owners → Share holdings: holds shares (evidence: `app/Models/Propietario.php`)
- Property owners → Owner charges: owes charges (evidence: `app/Models/Propietario.php`)
- Property owners → Collections and allocation: has collections (evidence: `app/Models/Propietario.php`)
- Period closing → Owner charges: summarizes charges (evidence: `app/Domain/Accounting/Services/MonthlyClosingService.php`)
- Period closing → Collections and allocation: summarizes collections (evidence: `app/Domain/Accounting/Services/MonthlyClosingService.php`)
