# eduardobondavalle-arch/mvp-builder architecture

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

- Interactive diagram: https://gitdiagram.com/eduardobondavalle-arch/mvp-builder
- Repository: https://github.com/eduardobondavalle-arch/mvp-builder

## Overview

Adim combines a commercial-operations dashboard with a rental-closing workflow. Users manage commercial records and review funnel, goals, rankings, and channel-conversion reports; the closing workflow tracks cards across stages, supports configuration and detail work, and provides closing reports. Data loads through a repository that uses browser-local storage by default, with a host-platform adapter available for shared persistence. Several route and feature implementations were not sampled, so their internal connections are shown only where the README or indexed references support them.

Main entry points: [`src/fechamento/persistence/repository.ts`](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/persistence/repository.ts) (Data Repository), [`src/fechamento/components/providers/board-provider.tsx`](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/components/providers/board-provider.tsx) (Board State), [`src/routes/_authenticated/relatorios.tsx`](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/routes/_authenticated/relatorios.tsx) (Commercial Reports), [`src/lib/data.ts`](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/lib/data.ts) (Commercial Data API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commercial["Commercial Operations"]
  node_dashboard["Dashboard<br/>[dashboard.tsx]"]
  node_records["Records &amp; Setup<br/>[cadastros.tsx]"]
  node_proposal["New Proposal"]
  node_cycles["Cycles &amp; Goals<br/>[ciclos.tsx]"]
  node_reports["Commercial Reports<br/>[relatorios.tsx]"]
  node_metrics["Metrics<br/>[metrics.ts]"]
  node_pdf["PDF Export<br/>[pdf.ts]"]
end

subgraph group_closing["Rental Closing"]
  node_board["Closing Board<br/>[kanban-board.tsx]"]
  node_boardconfig["Board Settings"]
  node_carddetail["Card Details"]
  node_closingreport["Closing Reports"]
  node_provider["Board State<br/>[board-provider.tsx]"]
  node_operations["Workflow Rules<br/>[operations.ts]"]
end

subgraph group_platform["Shared Data Platform"]
  node_commercialdata["Commercial Data API<br/>[data.ts]"]
  node_repository["Data Repository<br/>[repository.ts]"]
  node_localstore[("Browser Storage<br/>[repository.ts]")]
  node_platformadapter["Host Adapter<br/>[host.ts]"]
  node_commercialclient["Local Commercial Client"]
  node_supabase["Supabase Client Facade<br/>[client.ts]"]
end

subgraph group_app["Application Shell"]
  node_root["Root Layout<br/>[__root.tsx]"]
  node_shell["App Shell<br/>[app-shell.tsx]"]
end

node_operator(("Operator"))

node_operator -->|"reviews operations"| node_dashboard
node_operator -->|"manages records"| node_records
node_root -->|"renders routes"| node_shell
node_proposal -->|"records proposal"| node_commercialdata
node_reports -->|"uses shell"| node_shell
node_reports -->|"uses metrics"| node_metrics
node_reports -->|"exports report"| node_pdf
node_commercialdata -->|"loads data"| node_repository
node_commercialdata -->|"queries records"| node_supabase
node_supabase -->|"falls back to"| node_commercialclient
node_commercialclient -->|"reads and writes"| node_repository
node_provider -->|"loads and mutates"| node_repository
node_repository -->|"executes commands"| node_operations
node_repository -->|"checks adapter"| node_platformadapter
node_repository -->|"reads and writes"| node_localstore
node_board -.->|"uses board state"| node_provider
node_boardconfig -->|"uses board state"| node_provider
node_carddetail -->|"uses board state"| node_provider
node_carddetail -->|"uses workflow rules"| node_operations
node_closingreport -->|"uses shell"| node_shell
node_closingreport -->|"reads board state"| node_provider

click node_root "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/routes/__root.tsx"
click node_shell "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/components/app-shell.tsx"
click node_dashboard "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/routes/_authenticated/dashboard.tsx"
click node_records "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/routes/_authenticated/cadastros.tsx"
click node_proposal "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/components/nova-proposta-dialog.tsx"
click node_cycles "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/routes/_authenticated/ciclos.tsx"
click node_reports "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/routes/_authenticated/relatorios.tsx"
click node_metrics "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/lib/metrics.ts"
click node_pdf "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/lib/pdf.ts"
click node_board "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/components/board/kanban-board.tsx"
click node_boardconfig "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/components/board/board-settings-panel.tsx"
click node_carddetail "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/components/card-detail/card-detail-modal.tsx"
click node_closingreport "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/routes/_authenticated/relatorio-fechamento.tsx"
click node_provider "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/components/providers/board-provider.tsx"
click node_operations "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/domain/operations.ts"
click node_commercialdata "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/lib/data.ts"
click node_repository "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/persistence/repository.ts"
click node_localstore "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/persistence/repository.ts"
click node_platformadapter "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/host.ts"
click node_commercialclient "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/persistence/commercial-client.ts"
click node_supabase "https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/integrations/supabase/client.ts"

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_dashboard,node_records,node_proposal,node_cycles,node_reports,node_metrics,node_pdf toneBlue
class node_board,node_boardconfig,node_carddetail,node_closingreport,node_provider,node_operations toneAmber
class node_commercialdata,node_repository,node_localstore,node_platformadapter,node_commercialclient,node_supabase toneMint
class node_root,node_shell toneRose
class node_operator toneIndigo
```

## Components

### Commercial Operations

- [Dashboard](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/routes/_authenticated/dashboard.tsx): `src/routes/_authenticated/dashboard.tsx`
- [Records & Setup](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/routes/_authenticated/cadastros.tsx): `src/routes/_authenticated/cadastros.tsx`
- [New Proposal](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/components/nova-proposta-dialog.tsx): `src/components/nova-proposta-dialog.tsx`
- [Cycles & Goals](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/routes/_authenticated/ciclos.tsx): `src/routes/_authenticated/ciclos.tsx`
- [Commercial Reports](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/routes/_authenticated/relatorios.tsx): `src/routes/_authenticated/relatorios.tsx`
- [Metrics](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/lib/metrics.ts): `src/lib/metrics.ts`
- [PDF Export](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/lib/pdf.ts): `src/lib/pdf.ts`

### Rental Closing

- [Closing Board](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/components/board/kanban-board.tsx): `src/fechamento/components/board/kanban-board.tsx`
- [Board Settings](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/components/board/board-settings-panel.tsx): `src/fechamento/components/board/board-settings-panel.tsx`
- [Card Details](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/components/card-detail/card-detail-modal.tsx): `src/fechamento/components/card-detail/card-detail-modal.tsx`
- [Closing Reports](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/routes/_authenticated/relatorio-fechamento.tsx): `src/routes/_authenticated/relatorio-fechamento.tsx`
- [Board State](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/components/providers/board-provider.tsx): `src/fechamento/components/providers/board-provider.tsx`
- [Workflow Rules](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/domain/operations.ts): `src/fechamento/domain/operations.ts`

### Shared Data Platform

- [Commercial Data API](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/lib/data.ts): `src/lib/data.ts`
- [Data Repository](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/persistence/repository.ts): `src/fechamento/persistence/repository.ts`
- [Browser Storage](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/persistence/repository.ts): `src/fechamento/persistence/repository.ts`
- [Host Adapter](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/host.ts): `src/fechamento/host.ts`
- [Local Commercial Client](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/fechamento/persistence/commercial-client.ts): `src/fechamento/persistence/commercial-client.ts`
- [Supabase Client Facade](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`

### Application Shell

- [Root Layout](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/routes/__root.tsx): `src/routes/__root.tsx`
- [App Shell](https://github.com/eduardobondavalle-arch/mvp-builder/blob/main/src/components/app-shell.tsx): `src/components/app-shell.tsx`

### Other components

- **Operator**

## Connections

- Operator → Dashboard: reviews operations (evidence: `README.md`)
- Operator → Records & Setup: manages records (evidence: `README.md`)
- Root Layout → App Shell: renders routes (evidence: `src/routes/__root.tsx`)
- New Proposal → Commercial Data API: records proposal (evidence: `src/components/nova-proposta-dialog.tsx`)
- Commercial Reports → App Shell: uses shell (evidence: `src/routes/_authenticated/relatorios.tsx`)
- Commercial Reports → Metrics: uses metrics (evidence: `src/routes/_authenticated/relatorios.tsx`)
- Commercial Reports → PDF Export: exports report (evidence: `src/routes/_authenticated/relatorios.tsx`)
- Commercial Data API → Data Repository: loads data (evidence: `src/lib/data.ts`)
- Commercial Data API → Supabase Client Facade: queries records (evidence: `src/lib/data.ts`)
- Supabase Client Facade → Local Commercial Client: falls back to (evidence: `src/integrations/supabase/client.ts`)
- Local Commercial Client → Data Repository: reads and writes (evidence: `src/fechamento/persistence/commercial-client.ts`)
- Board State → Data Repository: loads and mutates (evidence: `src/fechamento/components/providers/board-provider.tsx`)
- Data Repository → Workflow Rules: executes commands (evidence: `src/fechamento/persistence/repository.ts`)
- Data Repository → Host Adapter: checks adapter (evidence: `src/fechamento/persistence/repository.ts`)
- Data Repository → Browser Storage: reads and writes (evidence: `src/fechamento/persistence/repository.ts`)
- Closing Board → Board State: uses board state
- Board Settings → Board State: uses board state (evidence: `src/fechamento/components/board/board-settings-panel.tsx`)
- Card Details → Board State: uses board state (evidence: `src/fechamento/components/card-detail/card-detail-modal.tsx`)
- Card Details → Workflow Rules: uses workflow rules (evidence: `src/fechamento/components/card-detail/card-detail-modal.tsx`)
- Closing Reports → App Shell: uses shell (evidence: `src/routes/_authenticated/relatorio-fechamento.tsx`)
- Closing Reports → Board State: reads board state (evidence: `src/routes/_authenticated/relatorio-fechamento.tsx`)
