# ganaganidhanush-png/rent architecture

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

- Interactive diagram: https://gitdiagram.com/ganaganidhanush-png/rent
- Repository: https://github.com/ganaganidhanush-png/rent

## Overview

RentVault is a landlord-facing app for managing five rooms, tenant onboarding, rent and other payments, and private tenant documents. The main workflow runs from the landlord’s dashboard into room and tenant operations, records payments in the ledger, and uploads or views documents through the vault. The local app store provides browser-side state and merge helpers; Supabase supplies database and storage persistence. The graph reflects documented features where code excerpts were not supplied, but leaves their implementation wiring unspecified.

Main entry points: [`src/lib/store/app-store.ts`](https://github.com/ganaganidhanush-png/rent/blob/main/src/lib/store/app-store.ts) (App store), [`src/app/documents/page.tsx`](https://github.com/ganaganidhanush-png/rent/blob/main/src/app/documents/page.tsx) (Document vault), [`src/lib/supabase/client.ts`](https://github.com/ganaganidhanush-png/rent/blob/main/src/lib/supabase/client.ts) (Browser Supabase client), [`src/app/payments/page.tsx`](https://github.com/ganaganidhanush-png/rent/blob/main/src/app/payments/page.tsx) (Payment ledger)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Landlord workspace"]
  node_dashboard["Property dashboard<br/>[page.tsx]"]
  node_dashview["Dashboard view<br/>[dashboard-view.tsx]"]
  node_rooms["Room grid<br/>[page.tsx]"]
  node_tenants["Tenant directory<br/>[page.tsx]"]
  node_onboard["Tenant onboarding"]
  node_payments["Payment ledger<br/>[page.tsx]"]
  node_paymentform["Payment entry"]
  node_documents["Document vault<br/>[page.tsx]"]
  node_viewer["Document viewer"]
end

subgraph group_domain["Property operations"]
  node_tenantmodel["Tenant records<br/>[database.ts]"]
  node_roommodel["Room records<br/>[database.ts]"]
  node_paymentmodel["Payment records<br/>[database.ts]"]
  node_documentmodel["Document records<br/>[database.ts]"]
  node_roomops["Room operations"]
end

subgraph group_state["Local state"]
  node_store["App store<br/>[app-store.ts]"]
  node_browserdb[("Browser localStorage")]
end

subgraph group_cloud["Supabase services"]
  node_supabaseclient["Browser Supabase client<br/>[client.ts]"]
  node_supabaseserver["Server Supabase client<br/>[server.ts]"]
  node_adminclient["Admin Supabase client<br/>[admin.ts]"]
  node_supabase[("Supabase database")]
  node_storage[("Private tenant-vault")]
  node_urlroute["Signed URL endpoint<br/>[route.ts]"]
end

node_landlord(("Landlord"))

node_landlord -->|"opens"| node_dashboard
node_dashboard -->|"renders"| node_dashview
node_dashview -->|"reads payments"| node_store
node_landlord -->|"manages rooms"| node_rooms
node_rooms -->|"operates"| node_roomops
node_landlord -->|"manages tenants"| node_tenants
node_tenants -->|"starts onboarding"| node_onboard
node_onboard -->|"saves tenant, payments, documents"| node_store
node_landlord -->|"reviews ledger"| node_payments
node_payments -->|"records payment"| node_paymentform
node_paymentform -->|"saves payment"| node_store
node_paymentform -->|"syncs payment"| node_supabaseclient
node_payments -->|"reads, updates, deletes"| node_supabaseclient
node_landlord -->|"manages documents"| node_documents
node_documents -->|"saves document record"| node_store
node_documents -->|"uploads, deletes"| node_supabaseclient
node_documents -->|"requests signed link"| node_urlroute
node_documents -->|"opens document"| node_viewer
node_urlroute -->|"creates signed URL"| node_adminclient
node_adminclient -->|"signs access"| node_storage
node_store -->|"reads, writes"| node_browserdb
node_store -->|"manages room state"| node_roommodel
node_store -->|"manages tenant state"| node_tenantmodel
node_store -->|"manages payment state"| node_paymentmodel
node_store -->|"manages document state"| node_documentmodel
node_supabaseclient -->|"database operations"| node_supabase
node_supabaseclient -->|"file operations"| node_storage
node_supabaseserver -.->|"server access"| node_supabase

click node_dashboard "https://github.com/ganaganidhanush-png/rent/blob/main/src/app/page.tsx"
click node_dashview "https://github.com/ganaganidhanush-png/rent/blob/main/src/components/dashboard/dashboard-view.tsx"
click node_rooms "https://github.com/ganaganidhanush-png/rent/blob/main/src/app/rooms/page.tsx"
click node_tenants "https://github.com/ganaganidhanush-png/rent/blob/main/src/app/tenants/page.tsx"
click node_onboard "https://github.com/ganaganidhanush-png/rent/blob/main/src/components/tenants/add-tenant-form.tsx"
click node_payments "https://github.com/ganaganidhanush-png/rent/blob/main/src/app/payments/page.tsx"
click node_paymentform "https://github.com/ganaganidhanush-png/rent/blob/main/src/components/payments/record-payment-modal.tsx"
click node_documents "https://github.com/ganaganidhanush-png/rent/blob/main/src/app/documents/page.tsx"
click node_viewer "https://github.com/ganaganidhanush-png/rent/blob/main/src/components/documents/document-viewer-modal.tsx"
click node_tenantmodel "https://github.com/ganaganidhanush-png/rent/blob/main/src/types/database.ts"
click node_roommodel "https://github.com/ganaganidhanush-png/rent/blob/main/src/types/database.ts"
click node_paymentmodel "https://github.com/ganaganidhanush-png/rent/blob/main/src/types/database.ts"
click node_documentmodel "https://github.com/ganaganidhanush-png/rent/blob/main/src/types/database.ts"
click node_store "https://github.com/ganaganidhanush-png/rent/blob/main/src/lib/store/app-store.ts"
click node_supabaseclient "https://github.com/ganaganidhanush-png/rent/blob/main/src/lib/supabase/client.ts"
click node_supabaseserver "https://github.com/ganaganidhanush-png/rent/blob/main/src/lib/supabase/server.ts"
click node_adminclient "https://github.com/ganaganidhanush-png/rent/blob/main/src/lib/supabase/admin.ts"
click node_urlroute "https://github.com/ganaganidhanush-png/rent/blob/main/src/app/api/document-url/route.ts"
click node_roomops "https://github.com/ganaganidhanush-png/rent/tree/main/src/app/rooms"

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_dashview,node_rooms,node_tenants,node_onboard,node_payments,node_paymentform,node_documents,node_viewer toneBlue
class node_tenantmodel,node_roommodel,node_paymentmodel,node_documentmodel,node_roomops toneAmber
class node_store,node_browserdb toneMint
class node_supabaseclient,node_supabaseserver,node_adminclient,node_supabase,node_storage,node_urlroute toneRose
class node_landlord toneIndigo
```

## Components

### Landlord workspace

- [Property dashboard](https://github.com/ganaganidhanush-png/rent/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Dashboard view](https://github.com/ganaganidhanush-png/rent/blob/main/src/components/dashboard/dashboard-view.tsx): `src/components/dashboard/dashboard-view.tsx`
- [Room grid](https://github.com/ganaganidhanush-png/rent/blob/main/src/app/rooms/page.tsx): `src/app/rooms/page.tsx`
- [Tenant directory](https://github.com/ganaganidhanush-png/rent/blob/main/src/app/tenants/page.tsx): `src/app/tenants/page.tsx`
- [Tenant onboarding](https://github.com/ganaganidhanush-png/rent/blob/main/src/components/tenants/add-tenant-form.tsx): `src/components/tenants/add-tenant-form.tsx`
- [Payment ledger](https://github.com/ganaganidhanush-png/rent/blob/main/src/app/payments/page.tsx): `src/app/payments/page.tsx`
- [Payment entry](https://github.com/ganaganidhanush-png/rent/blob/main/src/components/payments/record-payment-modal.tsx): `src/components/payments/record-payment-modal.tsx`
- [Document vault](https://github.com/ganaganidhanush-png/rent/blob/main/src/app/documents/page.tsx): `src/app/documents/page.tsx`
- [Document viewer](https://github.com/ganaganidhanush-png/rent/blob/main/src/components/documents/document-viewer-modal.tsx): `src/components/documents/document-viewer-modal.tsx`

### Property operations

- [Tenant records](https://github.com/ganaganidhanush-png/rent/blob/main/src/types/database.ts): `src/types/database.ts`
- [Room records](https://github.com/ganaganidhanush-png/rent/blob/main/src/types/database.ts): `src/types/database.ts`
- [Payment records](https://github.com/ganaganidhanush-png/rent/blob/main/src/types/database.ts): `src/types/database.ts`
- [Document records](https://github.com/ganaganidhanush-png/rent/blob/main/src/types/database.ts): `src/types/database.ts`
- [Room operations](https://github.com/ganaganidhanush-png/rent/tree/main/src/app/rooms): `src/app/rooms`

### Local state

- [App store](https://github.com/ganaganidhanush-png/rent/blob/main/src/lib/store/app-store.ts): `src/lib/store/app-store.ts`
- **Browser localStorage**

### Supabase services

- [Browser Supabase client](https://github.com/ganaganidhanush-png/rent/blob/main/src/lib/supabase/client.ts): `src/lib/supabase/client.ts`
- [Server Supabase client](https://github.com/ganaganidhanush-png/rent/blob/main/src/lib/supabase/server.ts): `src/lib/supabase/server.ts`
- [Admin Supabase client](https://github.com/ganaganidhanush-png/rent/blob/main/src/lib/supabase/admin.ts): `src/lib/supabase/admin.ts`
- **Supabase database**
- **Private tenant-vault**
- [Signed URL endpoint](https://github.com/ganaganidhanush-png/rent/blob/main/src/app/api/document-url/route.ts): `src/app/api/document-url/route.ts`

### Other components

- **Landlord**

## Connections

- Landlord → Property dashboard: opens
- Property dashboard → Dashboard view: renders
- Dashboard view → App store: reads payments
- Landlord → Room grid: manages rooms
- Room grid → Room operations: operates
- Landlord → Tenant directory: manages tenants
- Tenant directory → Tenant onboarding: starts onboarding
- Tenant onboarding → App store: saves tenant, payments, documents
- Landlord → Payment ledger: reviews ledger
- Payment ledger → Payment entry: records payment
- Payment entry → App store: saves payment
- Payment entry → Browser Supabase client: syncs payment
- Payment ledger → Browser Supabase client: reads, updates, deletes
- Landlord → Document vault: manages documents
- Document vault → App store: saves document record
- Document vault → Browser Supabase client: uploads, deletes
- Document vault → Signed URL endpoint: requests signed link
- Document vault → Document viewer: opens document
- Signed URL endpoint → Admin Supabase client: creates signed URL
- Admin Supabase client → Private tenant-vault: signs access
- App store → Browser localStorage: reads, writes
- App store → Room records: manages room state
- App store → Tenant records: manages tenant state
- App store → Payment records: manages payment state
- App store → Document records: manages document state
- Browser Supabase client → Supabase database: database operations
- Browser Supabase client → Private tenant-vault: file operations
- Server Supabase client → Supabase database: server access
