# lorenadacup/website_casafinder architecture

> Architecture diagram of the GitHub repository lorenadacup/website_casafinder, 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/lorenadacup/website_casafinder
- Repository: https://github.com/lorenadacup/website_casafinder

## Overview

CasaFinder is a Gumaca housing and rental portal. The principal workflow brings tenants and landlords into the app, lets them browse listings and nearby locations, and presents listing details; landlords also have profile and listing-management flows. The map combines local school, barangay, and street information. Account, listing, and approval operations use a Supabase-backed service. The README is empty, so capabilities are inferred from the source index and excerpts; some component connections are supported only by indexed references, not inspected call sites.

Main entry points: [`src/App.tsx`](https://github.com/lorenadacup/website_casafinder/blob/main/src/App.tsx) (Portal and workflows), [`src/components/NeighborhoodMap.tsx`](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/NeighborhoodMap.tsx) (Neighborhood map), [`src/data/properties.ts`](https://github.com/lorenadacup/website_casafinder/blob/main/src/data/properties.ts) (Property listings), [`src/utils/mapConstants.ts`](https://github.com/lorenadacup/website_casafinder/blob/main/src/utils/mapConstants.ts) (Map constants)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and Accounts"]
  node_entry["React entry<br/>[main.tsx]"]
  node_app["Portal and workflows<br/>[App.tsx]"]
  node_tenant["Tenant profile"]
  node_landlord["Landlord profile"]
  node_adminprofile["Admin profile"]
  node_about["About information<br/>[AboutModal.tsx]"]
  node_navinfo["Navigation information<br/>[NavInfoModal.tsx]"]
end

subgraph group_housing["Housing Listings"]
  node_properties["Property listings<br/>[properties.ts]"]
  node_demos["Demo listings<br/>[studentDemos.ts]"]
  node_card["Listing card<br/>[PropertyCard.tsx]"]
  node_detail["Listing details<br/>[PropertyModal.tsx]"]
  node_results["Search results<br/>[SearchResults.tsx]"]
  node_postingmap["Posting location"]
end

subgraph group_mapping["Map and Places"]
  node_neighborhood["Neighborhood map"]
  node_markers["Map markers<br/>[MapMarkers.tsx]"]
  node_controls["Map controls<br/>[MapControls.tsx]"]
  node_schooledit["School editing"]
  node_boundaries["Barangay boundaries"]
  node_arrows["Arrow markers"]
  node_streetpanel["Street information"]
  node_mapdata["Map constants<br/>[mapConstants.ts]"]
  node_schooldata["Schools and distances<br/>[schoolDistances.ts]"]
  node_streetdata["Street lookup<br/>[streetInfo.ts]"]
end

subgraph group_shared["Shared Services"]
  node_db["Database service<br/>[db.ts]"]
  node_supabase["Supabase client<br/>[supabase.ts]"]
  node_translations["Translations<br/>[translations.ts]"]
end

node_user(("Tenant or landlord"))

node_user -->|"opens"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"uses listings"| node_properties
node_app -->|"uses demos"| node_demos
node_app -->|"loads and saves"| node_db
node_app -->|"opens details"| node_detail
node_app -->|"opens profile"| node_tenant
node_app -->|"opens profile"| node_landlord
node_app -->|"uses"| node_adminprofile
node_app -->|"uses"| node_about
node_app -->|"uses"| node_navinfo
node_app -->|"renders"| node_neighborhood
node_app -->|"uses"| node_postingmap
node_app -->|"uses"| node_translations
node_card -->|"reads listings"| node_properties
node_detail -->|"reads listing"| node_properties
node_results -->|"uses listing type"| node_properties
node_landlord -->|"reads listings"| node_properties
node_db -->|"queries"| node_supabase
node_db -->|"maps listing data"| node_properties
node_demos -->|"reuses listings"| node_properties
node_neighborhood -->|"uses map config"| node_mapdata
node_neighborhood -->|"gets schools"| node_schooldata
node_neighborhood -->|"looks up streets"| node_streetdata
node_neighborhood -->|"maps listings"| node_properties
node_neighborhood -->|"renders controls"| node_controls
node_neighborhood -->|"renders markers"| node_markers
node_neighborhood -->|"renders editor"| node_schooledit
node_neighborhood -->|"renders panel"| node_streetpanel
node_neighborhood -->|"renders results"| node_results
node_neighborhood -->|"renders arrows"| node_arrows
node_neighborhood -->|"renders boundaries"| node_boundaries
node_markers -->|"uses listings"| node_properties
node_markers -->|"uses distances"| node_schooldata
node_markers -->|"uses map config"| node_mapdata
node_controls -->|"uses map config"| node_mapdata
node_schooledit -->|"edits school data"| node_schooldata
node_arrows -->|"uses map config"| node_mapdata
node_streetpanel -->|"uses street info"| node_streetdata
node_streetdata -->|"loads polygons"| node_boundaries
node_schooldata -->|"uses map constants"| node_mapdata

click node_entry "https://github.com/lorenadacup/website_casafinder/blob/main/src/main.tsx"
click node_app "https://github.com/lorenadacup/website_casafinder/blob/main/src/App.tsx"
click node_tenant "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/TenantProfileModal.tsx"
click node_landlord "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/LandlordProfileModal.tsx"
click node_adminprofile "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/LandlordAdminProfileModal.tsx"
click node_about "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/AboutModal.tsx"
click node_navinfo "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/NavInfoModal.tsx"
click node_properties "https://github.com/lorenadacup/website_casafinder/blob/main/src/data/properties.ts"
click node_demos "https://github.com/lorenadacup/website_casafinder/blob/main/src/data/studentDemos.ts"
click node_card "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/PropertyCard.tsx"
click node_detail "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/PropertyModal.tsx"
click node_results "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/SearchResults.tsx"
click node_postingmap "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/PostingLocationMap.tsx"
click node_neighborhood "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/NeighborhoodMap.tsx"
click node_markers "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/MapMarkers.tsx"
click node_controls "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/MapControls.tsx"
click node_schooledit "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/SchoolEditingSystem.tsx"
click node_boundaries "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/BarangayBoundarySystem.tsx"
click node_arrows "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/ArrowMarkersSystem.tsx"
click node_streetpanel "https://github.com/lorenadacup/website_casafinder/blob/main/src/components/StreetInfoPanel.tsx"
click node_mapdata "https://github.com/lorenadacup/website_casafinder/blob/main/src/utils/mapConstants.ts"
click node_schooldata "https://github.com/lorenadacup/website_casafinder/blob/main/src/utils/schoolDistances.ts"
click node_streetdata "https://github.com/lorenadacup/website_casafinder/blob/main/src/utils/streetInfo.ts"
click node_db "https://github.com/lorenadacup/website_casafinder/blob/main/src/utils/db.ts"
click node_supabase "https://github.com/lorenadacup/website_casafinder/blob/main/src/utils/supabase.ts"
click node_translations "https://github.com/lorenadacup/website_casafinder/blob/main/src/utils/translations.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_entry,node_app,node_tenant,node_landlord,node_adminprofile,node_about,node_navinfo toneBlue
class node_properties,node_demos,node_card,node_detail,node_results,node_postingmap toneAmber
class node_neighborhood,node_markers,node_controls,node_schooledit,node_boundaries,node_arrows,node_streetpanel,node_mapdata,node_schooldata,node_streetdata toneMint
class node_db,node_supabase,node_translations toneRose
class node_user toneIndigo
```

## Components

### App and Accounts

- [React entry](https://github.com/lorenadacup/website_casafinder/blob/main/src/main.tsx): `src/main.tsx`
- [Portal and workflows](https://github.com/lorenadacup/website_casafinder/blob/main/src/App.tsx): `src/App.tsx`
- [Tenant profile](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/TenantProfileModal.tsx): `src/components/TenantProfileModal.tsx`
- [Landlord profile](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/LandlordProfileModal.tsx): `src/components/LandlordProfileModal.tsx`
- [Admin profile](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/LandlordAdminProfileModal.tsx): `src/components/LandlordAdminProfileModal.tsx`
- [About information](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/AboutModal.tsx): `src/components/AboutModal.tsx`
- [Navigation information](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/NavInfoModal.tsx): `src/components/NavInfoModal.tsx`

### Housing Listings

- [Property listings](https://github.com/lorenadacup/website_casafinder/blob/main/src/data/properties.ts): `src/data/properties.ts`
- [Demo listings](https://github.com/lorenadacup/website_casafinder/blob/main/src/data/studentDemos.ts): `src/data/studentDemos.ts`
- [Listing card](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/PropertyCard.tsx): `src/components/PropertyCard.tsx`
- [Listing details](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/PropertyModal.tsx): `src/components/PropertyModal.tsx`
- [Search results](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/SearchResults.tsx): `src/components/SearchResults.tsx`
- [Posting location](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/PostingLocationMap.tsx): `src/components/PostingLocationMap.tsx`

### Map and Places

- [Neighborhood map](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/NeighborhoodMap.tsx): `src/components/NeighborhoodMap.tsx`
- [Map markers](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/MapMarkers.tsx): `src/components/MapMarkers.tsx`
- [Map controls](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/MapControls.tsx): `src/components/MapControls.tsx`
- [School editing](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/SchoolEditingSystem.tsx): `src/components/SchoolEditingSystem.tsx`
- [Barangay boundaries](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/BarangayBoundarySystem.tsx): `src/components/BarangayBoundarySystem.tsx`
- [Arrow markers](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/ArrowMarkersSystem.tsx): `src/components/ArrowMarkersSystem.tsx`
- [Street information](https://github.com/lorenadacup/website_casafinder/blob/main/src/components/StreetInfoPanel.tsx): `src/components/StreetInfoPanel.tsx`
- [Map constants](https://github.com/lorenadacup/website_casafinder/blob/main/src/utils/mapConstants.ts): `src/utils/mapConstants.ts`
- [Schools and distances](https://github.com/lorenadacup/website_casafinder/blob/main/src/utils/schoolDistances.ts): `src/utils/schoolDistances.ts`
- [Street lookup](https://github.com/lorenadacup/website_casafinder/blob/main/src/utils/streetInfo.ts): `src/utils/streetInfo.ts`

### Shared Services

- [Database service](https://github.com/lorenadacup/website_casafinder/blob/main/src/utils/db.ts): `src/utils/db.ts`
- [Supabase client](https://github.com/lorenadacup/website_casafinder/blob/main/src/utils/supabase.ts): `src/utils/supabase.ts`
- [Translations](https://github.com/lorenadacup/website_casafinder/blob/main/src/utils/translations.ts): `src/utils/translations.ts`

### Other components

- **Tenant or landlord**

## Connections

- Tenant or landlord → React entry: opens
- React entry → Portal and workflows: renders (evidence: `src/main.tsx`)
- Portal and workflows → Property listings: uses listings (evidence: `src/App.tsx`)
- Portal and workflows → Demo listings: uses demos (evidence: `src/App.tsx`)
- Portal and workflows → Database service: loads and saves (evidence: `src/App.tsx`)
- Portal and workflows → Listing details: opens details (evidence: `src/App.tsx`)
- Portal and workflows → Tenant profile: opens profile (evidence: `src/App.tsx`)
- Portal and workflows → Landlord profile: opens profile (evidence: `src/App.tsx`)
- Portal and workflows → Admin profile: uses (evidence: `src/App.tsx`)
- Portal and workflows → About information: uses (evidence: `src/App.tsx`)
- Portal and workflows → Navigation information: uses (evidence: `src/App.tsx`)
- Portal and workflows → Neighborhood map: renders (evidence: `src/App.tsx`)
- Portal and workflows → Posting location: uses (evidence: `src/App.tsx`)
- Portal and workflows → Translations: uses (evidence: `src/App.tsx`)
- Listing card → Property listings: reads listings (evidence: `src/components/PropertyCard.tsx`)
- Listing details → Property listings: reads listing (evidence: `src/components/PropertyModal.tsx`)
- Search results → Property listings: uses listing type (evidence: `src/components/SearchResults.tsx`)
- Landlord profile → Property listings: reads listings (evidence: `src/components/LandlordProfileModal.tsx`)
- Database service → Supabase client: queries (evidence: `src/utils/db.ts`)
- Database service → Property listings: maps listing data (evidence: `src/utils/db.ts`)
- Demo listings → Property listings: reuses listings (evidence: `src/data/studentDemos.ts`)
- Neighborhood map → Map constants: uses map config (evidence: `src/components/NeighborhoodMap.tsx`)
- Neighborhood map → Schools and distances: gets schools (evidence: `src/components/NeighborhoodMap.tsx`)
- Neighborhood map → Street lookup: looks up streets (evidence: `src/components/NeighborhoodMap.tsx`)
- Neighborhood map → Property listings: maps listings (evidence: `src/components/NeighborhoodMap.tsx`)
- Neighborhood map → Map controls: renders controls (evidence: `src/components/NeighborhoodMap.tsx`)
- Neighborhood map → Map markers: renders markers (evidence: `src/components/NeighborhoodMap.tsx`)
- Neighborhood map → School editing: renders editor (evidence: `src/components/NeighborhoodMap.tsx`)
- Neighborhood map → Street information: renders panel (evidence: `src/components/NeighborhoodMap.tsx`)
- Neighborhood map → Search results: renders results (evidence: `src/components/NeighborhoodMap.tsx`)
- Neighborhood map → Arrow markers: renders arrows (evidence: `src/components/NeighborhoodMap.tsx`)
- Neighborhood map → Barangay boundaries: renders boundaries (evidence: `src/components/NeighborhoodMap.tsx`)
- Map markers → Property listings: uses listings (evidence: `src/components/MapMarkers.tsx`)
- Map markers → Schools and distances: uses distances (evidence: `src/components/MapMarkers.tsx`)
- Map markers → Map constants: uses map config (evidence: `src/components/MapMarkers.tsx`)
- Map controls → Map constants: uses map config (evidence: `src/components/MapControls.tsx`)
- School editing → Schools and distances: edits school data (evidence: `src/components/SchoolEditingSystem.tsx`)
- Arrow markers → Map constants: uses map config (evidence: `src/components/ArrowMarkersSystem.tsx`)
- Street information → Street lookup: uses street info (evidence: `src/components/StreetInfoPanel.tsx`)
- Street lookup → Barangay boundaries: loads polygons (evidence: `src/utils/streetInfo.ts`)
- Schools and distances → Map constants: uses map constants (evidence: `src/utils/schoolDistances.ts`)
