# johancurato1-stack/bh-finder-main architecture

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

- Interactive diagram: https://gitdiagram.com/johancurato1-stack/bh-finder-main
- Repository: https://github.com/johancurato1-stack/bh-finder-main

## Overview

BH Finder is a Flutter boarding-house discovery and property-management app for tenants and landlords, backed by Supabase. Tenant workflows cover authentication, property search and filtering, property and room details, and favorites; landlord workflows cover property and room management, image uploads, and performance monitoring. The README documents a UI → ViewModel → repository interface → Supabase repository → Supabase layering. Dart implementation excerpts were not provided, so feature-to-data links beyond that documented layering are omitted.

Main entry points: [`lib/core/view_models`](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/core/view_models) (ViewModels), [`lib/core/repositories/supabase`](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/core/repositories/supabase) (Supabase repositories), [`lib/roles/tenant/features/auth`](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/tenant/features/auth) (Authentication), [`lib/roles/tenant/features/search`](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/tenant/features/search) (Property discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tenant["Tenant experience"]
  node_tenant_auth["Authentication"]
  node_tenant_discovery["Property discovery"]
  node_tenant_home["Tenant home"]
  node_tenant_details["Property and room details"]
  node_tenant_favorites["Favorites"]
  node_tenant_messages["Tenant messaging"]
end

subgraph group_landlord["Landlord management"]
  node_landlord_dashboard["Landlord dashboard"]
  node_landlord_properties["Property management"]
  node_landlord_property_detail["Property and room management"]
  node_landlord_add_property["Property creation"]
  node_landlord_add_room["Room creation"]
  node_landlord_messages["Landlord messaging"]
end

subgraph group_application["Application layers"]
  node_view_models["ViewModels"]
  node_repository_interfaces["Repository interfaces"]
  node_supabase_repositories["Supabase repositories"]
end

subgraph group_backend["Backend services"]
  node_supabase_auth["Supabase Auth"]
  node_supabase_storage["Supabase Storage"]
  node_supabase_database[("Supabase database")]
end

node_tenant_user(("Tenant"))
node_landlord_user(("Landlord"))

node_tenant_user -->|"authenticates"| node_tenant_auth
node_tenant_user -->|"browses"| node_tenant_home
node_tenant_user -->|"searches and filters"| node_tenant_discovery
node_tenant_user -->|"views details"| node_tenant_details
node_tenant_user -->|"saves favorites"| node_tenant_favorites
node_landlord_user -->|"monitors performance"| node_landlord_dashboard
node_landlord_user -->|"manages properties"| node_landlord_properties
node_landlord_user -->|"adds properties"| node_landlord_add_property
node_landlord_user -->|"adds rooms"| node_landlord_add_room
node_tenant_auth -.->|"uses"| node_view_models
node_tenant_discovery -.->|"uses"| node_view_models
node_tenant_home -.->|"uses"| node_view_models
node_tenant_details -.->|"uses"| node_view_models
node_tenant_favorites -.->|"uses"| node_view_models
node_landlord_dashboard -.->|"uses"| node_view_models
node_landlord_properties -.->|"uses"| node_view_models
node_landlord_property_detail -.->|"uses"| node_view_models
node_landlord_add_property -.->|"uses"| node_view_models
node_landlord_add_room -.->|"uses"| node_view_models
node_view_models -->|"calls"| node_repository_interfaces
node_repository_interfaces -->|"delegates to"| node_supabase_repositories
node_supabase_repositories -->|"accesses data"| node_supabase_database
node_supabase_repositories -->|"uses authentication"| node_supabase_auth
node_supabase_repositories -->|"uses storage"| node_supabase_storage

click node_tenant_auth "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/tenant/features/auth"
click node_tenant_discovery "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/tenant/features/search"
click node_tenant_home "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/tenant/features/home"
click node_tenant_details "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/tenant/shared/widgets/screens/property_detail_screen"
click node_tenant_favorites "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/tenant/features/favorites"
click node_tenant_messages "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/tenant/features/messages"
click node_landlord_dashboard "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/landlord/features/dashboard"
click node_landlord_properties "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/landlord/features/properties"
click node_landlord_property_detail "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/landlord/shared/widgets/screens/property_detail_screen"
click node_landlord_add_property "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/landlord/shared/widgets/screens/add_property_screen"
click node_landlord_add_room "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/landlord/shared/widgets/screens/add_room_screen"
click node_landlord_messages "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/landlord/features/messages"
click node_view_models "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/core/view_models"
click node_repository_interfaces "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/core/repositories/repositories"
click node_supabase_repositories "https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/core/repositories/supabase"

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_tenant_auth,node_tenant_discovery,node_tenant_home,node_tenant_details,node_tenant_favorites,node_tenant_messages toneBlue
class node_landlord_dashboard,node_landlord_properties,node_landlord_property_detail,node_landlord_add_property,node_landlord_add_room,node_landlord_messages toneAmber
class node_view_models,node_repository_interfaces,node_supabase_repositories toneMint
class node_supabase_auth,node_supabase_storage,node_supabase_database toneRose
class node_tenant_user,node_landlord_user toneIndigo
```

## Components

### Tenant experience

- [Authentication](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/tenant/features/auth): `lib/roles/tenant/features/auth`
- [Property discovery](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/tenant/features/search): `lib/roles/tenant/features/search`
- [Tenant home](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/tenant/features/home): `lib/roles/tenant/features/home`
- [Property and room details](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/tenant/shared/widgets/screens/property_detail_screen): `lib/roles/tenant/shared/widgets/screens/property_detail_screen`
- [Favorites](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/tenant/features/favorites): `lib/roles/tenant/features/favorites`
- [Tenant messaging](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/tenant/features/messages): `lib/roles/tenant/features/messages`

### Landlord management

- [Landlord dashboard](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/landlord/features/dashboard): `lib/roles/landlord/features/dashboard`
- [Property management](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/landlord/features/properties): `lib/roles/landlord/features/properties`
- [Property and room management](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/landlord/shared/widgets/screens/property_detail_screen): `lib/roles/landlord/shared/widgets/screens/property_detail_screen`
- [Property creation](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/landlord/shared/widgets/screens/add_property_screen): `lib/roles/landlord/shared/widgets/screens/add_property_screen`
- [Room creation](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/landlord/shared/widgets/screens/add_room_screen): `lib/roles/landlord/shared/widgets/screens/add_room_screen`
- [Landlord messaging](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/roles/landlord/features/messages): `lib/roles/landlord/features/messages`

### Application layers

- [ViewModels](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/core/view_models): `lib/core/view_models`
- [Repository interfaces](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/core/repositories/repositories): `lib/core/repositories/repositories`
- [Supabase repositories](https://github.com/johancurato1-stack/bh-finder-main/tree/main/lib/core/repositories/supabase): `lib/core/repositories/supabase`

### Backend services

- **Supabase Auth**
- **Supabase Storage**
- **Supabase database**

### Other components

- **Tenant**
- **Landlord**

## Connections

- Tenant → Authentication: authenticates (evidence: `README.md`)
- Tenant → Tenant home: browses (evidence: `README.md`)
- Tenant → Property discovery: searches and filters (evidence: `README.md`)
- Tenant → Property and room details: views details (evidence: `README.md`)
- Tenant → Favorites: saves favorites (evidence: `README.md`)
- Landlord → Landlord dashboard: monitors performance (evidence: `README.md`)
- Landlord → Property management: manages properties (evidence: `README.md`)
- Landlord → Property creation: adds properties (evidence: `README.md`)
- Landlord → Room creation: adds rooms (evidence: `README.md`)
- Authentication → ViewModels: uses
- Property discovery → ViewModels: uses
- Tenant home → ViewModels: uses
- Property and room details → ViewModels: uses
- Favorites → ViewModels: uses
- Landlord dashboard → ViewModels: uses
- Property management → ViewModels: uses
- Property and room management → ViewModels: uses
- Property creation → ViewModels: uses
- Room creation → ViewModels: uses
- ViewModels → Repository interfaces: calls (evidence: `README.md`)
- Repository interfaces → Supabase repositories: delegates to (evidence: `README.md`)
- Supabase repositories → Supabase database: accesses data (evidence: `README.md`)
- Supabase repositories → Supabase Auth: uses authentication (evidence: `README.md`)
- Supabase repositories → Supabase Storage: uses storage (evidence: `README.md`)
