# ali00209/property_app architecture

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

- Interactive diagram: https://gitdiagram.com/ali00209/property_app
- Repository: https://github.com/ali00209/property_app

## Overview

This is a Next.js property-management platform. Users sign in, then manage portfolio properties and related deals; deal workflows cover acceptance, scheduled payments, settlement, and tax snapshots. Separate modules support maintenance, documents/uploads, map and area management, users, transactions, and activity history. Feature query/action modules sit between dashboard pages and PostgreSQL. The graph reflects README capabilities as well as shown imports; unsampled modules are included where the README or source index establishes their role, but uncertain runtime links are omitted.

Main entry points: [`src/db/index.ts`](https://github.com/ali00209/property_app/blob/main/src/db/index.ts) (Drizzle client), [`src/features/deal/actions.ts`](https://github.com/ali00209/property_app/blob/main/src/features/deal/actions.ts) (Deal lifecycle), [`src/lib/upload.ts`](https://github.com/ali00209/property_app/blob/main/src/lib/upload.ts) (File uploads), [`app/dashboard/properties/page.tsx`](https://github.com/ali00209/property_app/blob/main/app/dashboard/properties/page.tsx) (Properties page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and dashboard"]
  node_authui["Sign-in forms<br/>[auth-form.tsx]"]
  node_authactions["Auth actions<br/>[actions.ts]"]
  node_dashboard["Dashboard overview<br/>[page.tsx]"]
end

subgraph group_portfolio["Portfolio and geography"]
  node_propertiespage["Properties page<br/>[page.tsx]"]
  node_property["Property management<br/>[actions.ts]"]
  node_propertyqueries["Property queries<br/>[db-queries.ts]"]
  node_map["Map view<br/>[map.tsx]"]
  node_geography["Areas and sectors<br/>[geo-page.tsx]"]
end

subgraph group_dealops["Deals and finance"]
  node_deals["Deal lifecycle<br/>[actions.ts]"]
  node_dealqueries["Deal queries<br/>[db-queries.ts]"]
  node_dealpage["Deal details<br/>[page.tsx]"]
  node_tax["Tax policies<br/>[db-queries.ts]"]
  node_transactions["Transaction history"]
end

subgraph group_operations["Property operations"]
  node_maintenance["Maintenance requests"]
  node_documents["Document management<br/>[document-list.tsx]"]
  node_uploads["File uploads<br/>[upload.ts]"]
  node_history["Activity history<br/>[history-list.tsx]"]
  node_users["User administration<br/>[actions.ts]"]
end

subgraph group_platform["Shared platform"]
  node_session["JWT sessions<br/>[auth.ts]"]
  node_dbclient["Drizzle client<br/>[index.ts]"]
  node_schema["Domain schema<br/>[schema.ts]"]
end

node_user(("Platform user"))
node_postgres[("PostgreSQL")]

node_user -->|"signs in"| node_authui
node_authui -->|"submits credentials"| node_authactions
node_authactions -->|"sets session"| node_session
node_user -.->|"opens dashboard"| node_dashboard
node_dashboard -->|"loads properties"| node_propertyqueries
node_propertiespage -->|"loads portfolio"| node_propertyqueries
node_propertiespage -->|"renders map"| node_map
node_propertiespage -->|"loads areas"| node_geography
node_property -.->|"stores images"| node_uploads
node_dealpage -->|"loads deal"| node_dealqueries
node_dealpage -->|"offers deal actions"| node_deals
node_deals -->|"uses deal queries"| node_dealqueries
node_deals -->|"saves attachments"| node_uploads
node_deals -.->|"applies tax rules"| node_tax
node_maintenance -.->|"attaches files"| node_uploads
node_documents -.->|"manages uploaded files"| node_uploads
node_dbclient -->|"uses schema"| node_schema
node_dbclient -->|"connects to"| node_postgres
node_propertyqueries -->|"queries data"| node_dbclient
node_dealqueries -->|"queries data"| node_dbclient
node_tax -->|"queries data"| node_dbclient

click node_authui "https://github.com/ali00209/property_app/blob/main/src/features/auth/auth-form.tsx"
click node_authactions "https://github.com/ali00209/property_app/blob/main/src/features/auth/actions.ts"
click node_session "https://github.com/ali00209/property_app/blob/main/src/lib/auth.ts"
click node_dashboard "https://github.com/ali00209/property_app/blob/main/app/dashboard/page.tsx"
click node_propertiespage "https://github.com/ali00209/property_app/blob/main/app/dashboard/properties/page.tsx"
click node_property "https://github.com/ali00209/property_app/blob/main/src/features/property/actions.ts"
click node_propertyqueries "https://github.com/ali00209/property_app/blob/main/src/features/property/db-queries.ts"
click node_map "https://github.com/ali00209/property_app/blob/main/src/features/property/map.tsx"
click node_geography "https://github.com/ali00209/property_app/blob/main/src/features/geo/geo-page.tsx"
click node_deals "https://github.com/ali00209/property_app/blob/main/src/features/deal/actions.ts"
click node_dealqueries "https://github.com/ali00209/property_app/blob/main/src/features/deal/db-queries.ts"
click node_dealpage "https://github.com/ali00209/property_app/blob/main/app/dashboard/deals/%5BdealId%5D/page.tsx"
click node_tax "https://github.com/ali00209/property_app/blob/main/src/features/tax-policy/db-queries.ts"
click node_transactions "https://github.com/ali00209/property_app/blob/main/src/features/transaction/transaction-list.tsx"
click node_maintenance "https://github.com/ali00209/property_app/blob/main/src/features/maintenance/maintenance-list.tsx"
click node_documents "https://github.com/ali00209/property_app/blob/main/src/features/document/document-list.tsx"
click node_uploads "https://github.com/ali00209/property_app/blob/main/src/lib/upload.ts"
click node_history "https://github.com/ali00209/property_app/blob/main/src/features/history/history-list.tsx"
click node_users "https://github.com/ali00209/property_app/blob/main/src/features/user/actions.ts"
click node_dbclient "https://github.com/ali00209/property_app/blob/main/src/db/index.ts"
click node_schema "https://github.com/ali00209/property_app/blob/main/src/db/schema.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_authui,node_authactions,node_dashboard,node_user toneBlue
class node_propertiespage,node_property,node_propertyqueries,node_map,node_geography,node_postgres toneAmber
class node_deals,node_dealqueries,node_dealpage,node_tax,node_transactions toneMint
class node_maintenance,node_documents,node_uploads,node_history,node_users toneRose
class node_session,node_dbclient,node_schema toneIndigo
```

## Components

### Access and dashboard

- [Sign-in forms](https://github.com/ali00209/property_app/blob/main/src/features/auth/auth-form.tsx): `src/features/auth/auth-form.tsx`
- [Auth actions](https://github.com/ali00209/property_app/blob/main/src/features/auth/actions.ts): `src/features/auth/actions.ts`
- [Dashboard overview](https://github.com/ali00209/property_app/blob/main/app/dashboard/page.tsx): `app/dashboard/page.tsx`

### Portfolio and geography

- [Properties page](https://github.com/ali00209/property_app/blob/main/app/dashboard/properties/page.tsx): `app/dashboard/properties/page.tsx`
- [Property management](https://github.com/ali00209/property_app/blob/main/src/features/property/actions.ts): `src/features/property/actions.ts`
- [Property queries](https://github.com/ali00209/property_app/blob/main/src/features/property/db-queries.ts): `src/features/property/db-queries.ts`
- [Map view](https://github.com/ali00209/property_app/blob/main/src/features/property/map.tsx): `src/features/property/map.tsx`
- [Areas and sectors](https://github.com/ali00209/property_app/blob/main/src/features/geo/geo-page.tsx): `src/features/geo/geo-page.tsx`

### Deals and finance

- [Deal lifecycle](https://github.com/ali00209/property_app/blob/main/src/features/deal/actions.ts): `src/features/deal/actions.ts`
- [Deal queries](https://github.com/ali00209/property_app/blob/main/src/features/deal/db-queries.ts): `src/features/deal/db-queries.ts`
- [Deal details](https://github.com/ali00209/property_app/blob/main/app/dashboard/deals/%5BdealId%5D/page.tsx): `app/dashboard/deals/[dealId]/page.tsx`
- [Tax policies](https://github.com/ali00209/property_app/blob/main/src/features/tax-policy/db-queries.ts): `src/features/tax-policy/db-queries.ts`
- [Transaction history](https://github.com/ali00209/property_app/blob/main/src/features/transaction/transaction-list.tsx): `src/features/transaction/transaction-list.tsx`

### Property operations

- [Maintenance requests](https://github.com/ali00209/property_app/blob/main/src/features/maintenance/maintenance-list.tsx): `src/features/maintenance/maintenance-list.tsx`
- [Document management](https://github.com/ali00209/property_app/blob/main/src/features/document/document-list.tsx): `src/features/document/document-list.tsx`
- [File uploads](https://github.com/ali00209/property_app/blob/main/src/lib/upload.ts): `src/lib/upload.ts`
- [Activity history](https://github.com/ali00209/property_app/blob/main/src/features/history/history-list.tsx): `src/features/history/history-list.tsx`
- [User administration](https://github.com/ali00209/property_app/blob/main/src/features/user/actions.ts): `src/features/user/actions.ts`

### Shared platform

- [JWT sessions](https://github.com/ali00209/property_app/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Drizzle client](https://github.com/ali00209/property_app/blob/main/src/db/index.ts): `src/db/index.ts`
- [Domain schema](https://github.com/ali00209/property_app/blob/main/src/db/schema.ts): `src/db/schema.ts`

### Other components

- **Platform user**
- **PostgreSQL**

## Connections

- Platform user → Sign-in forms: signs in (evidence: `src/features/auth/auth-form.tsx`)
- Sign-in forms → Auth actions: submits credentials (evidence: `src/features/auth/auth-form.tsx`)
- Auth actions → JWT sessions: sets session (evidence: `src/features/auth/actions.ts`)
- Platform user → Dashboard overview: opens dashboard (evidence: `README.md`)
- Dashboard overview → Property queries: loads properties (evidence: `app/dashboard/page.tsx`)
- Properties page → Property queries: loads portfolio (evidence: `app/dashboard/properties/page.tsx`)
- Properties page → Map view: renders map (evidence: `app/dashboard/properties/page.tsx`)
- Properties page → Areas and sectors: loads areas (evidence: `app/dashboard/properties/page.tsx`)
- Property management → File uploads: stores images
- Deal details → Deal queries: loads deal (evidence: `app/dashboard/deals/[dealId]/page.tsx`)
- Deal details → Deal lifecycle: offers deal actions
- Deal lifecycle → Deal queries: uses deal queries (evidence: `src/features/deal/actions.ts`)
- Deal lifecycle → File uploads: saves attachments (evidence: `src/features/deal/actions.ts`)
- Deal lifecycle → Tax policies: applies tax rules
- Maintenance requests → File uploads: attaches files
- Document management → File uploads: manages uploaded files
- Drizzle client → Domain schema: uses schema (evidence: `src/db/index.ts`)
- Drizzle client → PostgreSQL: connects to (evidence: `README.md`)
- Property queries → Drizzle client: queries data (evidence: `src/features/property/db-queries.ts`)
- Deal queries → Drizzle client: queries data (evidence: `src/features/deal/db-queries.ts`)
- Tax policies → Drizzle client: queries data (evidence: `src/features/tax-policy/db-queries.ts`)
