# miguelsignorini/projeto_acelera architecture

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

- Interactive diagram: https://gitdiagram.com/miguelsignorini/projeto_acelera
- Repository: https://github.com/miguelsignorini/projeto_acelera

## Overview

SaciGestao is a WPF desktop real-estate management system. The main workflow is to sign in, manage clients and property listings, create rental or sale contracts, and review portfolio activity on the dashboard; contracts can also be exported as PDFs. Data is held in memory during a session and written to JSON on exit. The README describes financial management as not yet implemented, although finance-related source modules are present. Relationships below are limited to README statements and indexed or excerpted source references.

Main entry points: [`SaciGestao/MainWindow.xaml.cs`](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/MainWindow.xaml.cs) (Main navigation), [`SaciGestao/Service/FinanceiroService.cs`](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/FinanceiroService.cs) (Payment tracking), [`SaciGestao/Service/ContratoService.cs`](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/ContratoService.cs) (Contract rules), [`SaciGestao/Service/Persistencia.cs`](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/Persistencia.cs) (JSON persistence)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_app["App lifecycle<br/>[App.xaml.cs]"]
  node_main["Main navigation<br/>[MainWindow.xaml.cs]"]
  node_login["Login and recovery<br/>[LoginViewModel.cs]"]
  node_users["User accounts<br/>[UsuarioService.cs]"]
end

subgraph group_portfolio["Portfolio management"]
  node_dashboard["Portfolio dashboard"]
  node_properties["Property listings"]
  node_property_service["Property rules<br/>[ImovelService.cs]"]
  node_property_photos["Property photos<br/>[Imovel.cs]"]
  node_clients["Client records"]
  node_client_model_service["Client model and service<br/>[Cliente.cs]"]
end

subgraph group_agreements["Contracts and documents"]
  node_contracts["Contract management"]
  node_contract_service["Contract rules<br/>[ContratoService.cs]"]
  node_pdf["PDF export"]
  node_rental_template["Rental template"]
  node_sale_template["Sale template"]
end

subgraph group_finance["Financial tracking"]
  node_finance_view["Finance view model"]
  node_finance_service["Payment tracking"]
  node_movement_model["Financial movements"]
  node_payment_model["Payment records<br/>[Pagamento.cs]"]
end

subgraph group_state["Session state and storage"]
  node_persistence["JSON persistence<br/>[Persistencia.cs]"]
  node_json_input[("Initial JSON data")]
  node_json_output[("Comparison JSON")]
  node_models["Domain records<br/>[Contrato.cs]"]
  node_base_vm["View-model base<br/>[ViewModelBase.cs]"]
  node_commands["Command handling<br/>[RelayCommand.cs]"]
end

node_operator(("Staff user"))

node_operator -->|"signs in"| node_login
node_login -->|"authenticates"| node_users
node_operator -->|"navigates"| node_main
node_main -->|"checks session"| node_users
node_main -.->|"opens dashboard"| node_dashboard
node_dashboard -->|"reads listings"| node_property_service
node_dashboard -->|"reads contracts"| node_contract_service
node_dashboard -->|"reads users"| node_users
node_main -.->|"opens listings"| node_properties
node_properties -->|"manages listings"| node_property_service
node_properties -.->|"selects owners"| node_client_model_service
node_properties -.->|"manages photos"| node_property_photos
node_main -.->|"opens clients"| node_clients
node_clients -->|"manages records"| node_client_model_service
node_main -.->|"opens contracts"| node_contracts
node_contracts -->|"manages agreements"| node_contract_service
node_contract_service -->|"updates status"| node_property_service
node_contracts -->|"exports PDF"| node_pdf
node_pdf -->|"uses rental text"| node_rental_template
node_pdf -->|"uses sale text"| node_sale_template
node_main -.->|"opens finance"| node_finance_view
node_finance_view -->|"tracks payments"| node_finance_service
node_finance_service -->|"reads contracts"| node_contract_service
node_finance_service -->|"records payments"| node_payment_model
node_finance_service -->|"builds movements"| node_movement_model
node_app -->|"saves on exit"| node_users
node_app -->|"saves on exit"| node_property_service
node_app -->|"saves on exit"| node_contract_service
node_app -->|"saves on exit"| node_finance_service
node_users -->|"loads and saves"| node_persistence
node_property_service -->|"loads and saves"| node_persistence
node_contract_service -->|"loads and saves"| node_persistence
node_finance_service -->|"loads and saves"| node_persistence
node_persistence -->|"reads startup data"| node_json_input
node_persistence -->|"writes on exit"| node_json_output
node_contracts -->|"edits contracts"| node_models
node_login -->|"inherits from"| node_base_vm
node_properties -->|"inherits from"| node_base_vm
node_clients -->|"inherits from"| node_base_vm
node_finance_view -->|"inherits from"| node_base_vm
node_contracts -->|"dispatches actions"| node_commands

click node_app "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/App.xaml.cs"
click node_main "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/MainWindow.xaml.cs"
click node_login "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/LoginViewModel.cs"
click node_users "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/UsuarioService.cs"
click node_dashboard "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/DashboardViewModel.cs"
click node_properties "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/ImoveisViewModel.cs"
click node_property_service "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/ImovelService.cs"
click node_property_photos "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Models/Imovel.cs"
click node_clients "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/ClientesViewModel.cs"
click node_client_model_service "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Models/Cliente.cs"
click node_contracts "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/ContratosViewModel.cs"
click node_contract_service "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/ContratoService.cs"
click node_pdf "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/PdfContratoService.cs"
click node_rental_template "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/ModeloContratoLocacao.cs"
click node_sale_template "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/ModeloContratoVenda.cs"
click node_finance_view "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/FinanceiroViewModel.cs"
click node_finance_service "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/FinanceiroService.cs"
click node_movement_model "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Models/MovimentacaoFinanceira.cs"
click node_payment_model "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Models/Pagamento.cs"
click node_persistence "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/Persistencia.cs"
click node_json_input "https://github.com/miguelsignorini/projeto_acelera/tree/main/SaciGestao/Json"
click node_json_output "https://github.com/miguelsignorini/projeto_acelera/tree/main/SaciGestao/Json/Comparacao"
click node_models "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Models/Contrato.cs"
click node_base_vm "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/ViewModelBase.cs"
click node_commands "https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/RelayCommand.cs"

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_app,node_main,node_login,node_users,node_operator toneBlue
class node_dashboard,node_properties,node_property_service,node_property_photos,node_clients,node_client_model_service toneAmber
class node_contracts,node_contract_service,node_pdf,node_rental_template,node_sale_template toneMint
class node_finance_view,node_finance_service,node_movement_model,node_payment_model toneRose
class node_persistence,node_json_input,node_json_output,node_models,node_base_vm,node_commands toneIndigo
```

## Components

### Access and navigation

- [App lifecycle](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/App.xaml.cs): `SaciGestao/App.xaml.cs`
- [Main navigation](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/MainWindow.xaml.cs): `SaciGestao/MainWindow.xaml.cs`
- [Login and recovery](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/LoginViewModel.cs): `SaciGestao/ViewModels/LoginViewModel.cs`
- [User accounts](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/UsuarioService.cs): `SaciGestao/Service/UsuarioService.cs`

### Portfolio management

- [Portfolio dashboard](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/DashboardViewModel.cs): `SaciGestao/ViewModels/DashboardViewModel.cs`
- [Property listings](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/ImoveisViewModel.cs): `SaciGestao/ViewModels/ImoveisViewModel.cs`
- [Property rules](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/ImovelService.cs): `SaciGestao/Service/ImovelService.cs`
- [Property photos](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Models/Imovel.cs): `SaciGestao/Models/Imovel.cs`
- [Client records](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/ClientesViewModel.cs): `SaciGestao/ViewModels/ClientesViewModel.cs`
- [Client model and service](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Models/Cliente.cs): `SaciGestao/Models/Cliente.cs`

### Contracts and documents

- [Contract management](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/ContratosViewModel.cs): `SaciGestao/ViewModels/ContratosViewModel.cs`
- [Contract rules](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/ContratoService.cs): `SaciGestao/Service/ContratoService.cs`
- [PDF export](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/PdfContratoService.cs): `SaciGestao/Service/PdfContratoService.cs`
- [Rental template](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/ModeloContratoLocacao.cs): `SaciGestao/Service/ModeloContratoLocacao.cs`
- [Sale template](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/ModeloContratoVenda.cs): `SaciGestao/Service/ModeloContratoVenda.cs`

### Financial tracking

- [Finance view model](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/FinanceiroViewModel.cs): `SaciGestao/ViewModels/FinanceiroViewModel.cs`
- [Payment tracking](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/FinanceiroService.cs): `SaciGestao/Service/FinanceiroService.cs`
- [Financial movements](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Models/MovimentacaoFinanceira.cs): `SaciGestao/Models/MovimentacaoFinanceira.cs`
- [Payment records](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Models/Pagamento.cs): `SaciGestao/Models/Pagamento.cs`

### Session state and storage

- [JSON persistence](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Service/Persistencia.cs): `SaciGestao/Service/Persistencia.cs`
- [Initial JSON data](https://github.com/miguelsignorini/projeto_acelera/tree/main/SaciGestao/Json): `SaciGestao/Json`
- [Comparison JSON](https://github.com/miguelsignorini/projeto_acelera/tree/main/SaciGestao/Json/Comparacao): `SaciGestao/Json/Comparacao`
- [Domain records](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/Models/Contrato.cs): `SaciGestao/Models/Contrato.cs`
- [View-model base](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/ViewModelBase.cs): `SaciGestao/ViewModels/ViewModelBase.cs`
- [Command handling](https://github.com/miguelsignorini/projeto_acelera/blob/main/SaciGestao/ViewModels/RelayCommand.cs): `SaciGestao/ViewModels/RelayCommand.cs`

### Other components

- **Staff user**

## Connections

- Staff user → Login and recovery: signs in (evidence: `README.md`)
- Login and recovery → User accounts: authenticates (evidence: `SaciGestao/ViewModels/LoginViewModel.cs`)
- Staff user → Main navigation: navigates (evidence: `README.md`)
- Main navigation → User accounts: checks session (evidence: `SaciGestao/MainWindow.xaml.cs`)
- Main navigation → Portfolio dashboard: opens dashboard (evidence: `README.md`)
- Portfolio dashboard → Property rules: reads listings (evidence: `SaciGestao/ViewModels/DashboardViewModel.cs`)
- Portfolio dashboard → Contract rules: reads contracts (evidence: `SaciGestao/ViewModels/DashboardViewModel.cs`)
- Portfolio dashboard → User accounts: reads users (evidence: `SaciGestao/ViewModels/DashboardViewModel.cs`)
- Main navigation → Property listings: opens listings (evidence: `README.md`)
- Property listings → Property rules: manages listings (evidence: `SaciGestao/ViewModels/ImoveisViewModel.cs`)
- Property listings → Client model and service: selects owners (evidence: `README.md`)
- Property listings → Property photos: manages photos (evidence: `README.md`)
- Main navigation → Client records: opens clients (evidence: `README.md`)
- Client records → Client model and service: manages records (evidence: `SaciGestao/ViewModels/ClientesViewModel.cs`)
- Main navigation → Contract management: opens contracts (evidence: `README.md`)
- Contract management → Contract rules: manages agreements (evidence: `SaciGestao/ViewModels/ContratosViewModel.cs`)
- Contract rules → Property rules: updates status (evidence: `SaciGestao/Service/ContratoService.cs`)
- Contract management → PDF export: exports PDF (evidence: `SaciGestao/ViewModels/ContratosViewModel.cs`)
- PDF export → Rental template: uses rental text (evidence: `SaciGestao/Service/PdfContratoService.cs`)
- PDF export → Sale template: uses sale text (evidence: `SaciGestao/Service/PdfContratoService.cs`)
- Main navigation → Finance view model: opens finance (evidence: `README.md`)
- Finance view model → Payment tracking: tracks payments (evidence: `SaciGestao/ViewModels/FinanceiroViewModel.cs`)
- Payment tracking → Contract rules: reads contracts (evidence: `SaciGestao/Service/FinanceiroService.cs`)
- Payment tracking → Payment records: records payments (evidence: `SaciGestao/Service/FinanceiroService.cs`)
- Payment tracking → Financial movements: builds movements (evidence: `SaciGestao/Service/FinanceiroService.cs`)
- App lifecycle → User accounts: saves on exit (evidence: `SaciGestao/App.xaml.cs`)
- App lifecycle → Property rules: saves on exit (evidence: `SaciGestao/App.xaml.cs`)
- App lifecycle → Contract rules: saves on exit (evidence: `SaciGestao/App.xaml.cs`)
- App lifecycle → Payment tracking: saves on exit (evidence: `SaciGestao/App.xaml.cs`)
- User accounts → JSON persistence: loads and saves (evidence: `SaciGestao/Service/UsuarioService.cs`)
- Property rules → JSON persistence: loads and saves (evidence: `SaciGestao/Service/ImovelService.cs`)
- Contract rules → JSON persistence: loads and saves (evidence: `SaciGestao/Service/ContratoService.cs`)
- Payment tracking → JSON persistence: loads and saves (evidence: `SaciGestao/Service/FinanceiroService.cs`)
- JSON persistence → Initial JSON data: reads startup data (evidence: `README.md`)
- JSON persistence → Comparison JSON: writes on exit (evidence: `README.md`)
- Contract management → Domain records: edits contracts (evidence: `SaciGestao/ViewModels/ContratosViewModel.cs`)
- Login and recovery → View-model base: inherits from (evidence: `SaciGestao/ViewModels/LoginViewModel.cs`)
- Property listings → View-model base: inherits from (evidence: `SaciGestao/ViewModels/ImoveisViewModel.cs`)
- Client records → View-model base: inherits from (evidence: `SaciGestao/ViewModels/ClientesViewModel.cs`)
- Finance view model → View-model base: inherits from (evidence: `SaciGestao/ViewModels/FinanceiroViewModel.cs`)
- Contract management → Command handling: dispatches actions (evidence: `SaciGestao/ViewModels/ContratosViewModel.cs`)
