# yousef-shohber/prop-flow architecture

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

- Interactive diagram: https://gitdiagram.com/yousef-shohber/prop-flow
- Repository: https://github.com/yousef-shohber/prop-flow

## Overview

PropFlow is a NestJS property and rental management API. Its central workflow lets tenants discover units and request rentals; owners or admins review requests and manage leases, while tenants can request renewals. Owners also manage properties and units, and maintenance requests move through assignment and resolution. The graph preserves user administration, authentication, notifications, analytics, and audit logging as supporting capabilities. Relationship evidence is limited to the README and SOURCE INDEX references; unsampled runtime wiring is not asserted as verified.

Main entry points: [`src/auth/auth.controller.ts`](https://github.com/yousef-shohber/prop-flow/blob/main/src/auth/auth.controller.ts) (Auth endpoints), [`src/auth/auth.service.ts`](https://github.com/yousef-shohber/prop-flow/blob/main/src/auth/auth.service.ts) (Authentication), [`src/users/users.service.ts`](https://github.com/yousef-shohber/prop-flow/blob/main/src/users/users.service.ts) (User management), [`src/common/uploads/upload.service.ts`](https://github.com/yousef-shohber/prop-flow/blob/main/src/common/uploads/upload.service.ts) (Image uploads)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and access"]
  node_auth_controller["Auth endpoints<br/>[auth.controller.ts]"]
  node_auth_service["Authentication<br/>[auth.service.ts]"]
  node_google_auth["Google OAuth<br/>[google.service.ts]"]
  node_users_controller["User endpoints"]
  node_users_service["User management<br/>[users.service.ts]"]
  node_user_records[("User records<br/>[user.entity.ts]")]
end

subgraph group_listings["Listings and rentals"]
  node_properties_controller["Property endpoints"]
  node_properties_service["Property management"]
  node_units_controller["Unit endpoints"]
  node_units_service["Unit management<br/>[units.service.ts]"]
  node_rental_controller["Rental requests"]
  node_rental_service["Rental workflow"]
  node_leases_controller["Lease endpoints"]
  node_leases_service["Lease management<br/>[leases.service.ts]"]
  node_renewals_controller["Renewal requests"]
  node_renewals_service["Renewal workflow"]
end

subgraph group_operations["Operations"]
  node_maintenance_controller["Maintenance endpoints"]
  node_maintenance_service["Maintenance workflow"]
  node_notifications_controller["Notification endpoints"]
  node_notifications_service["Notifications"]
end

subgraph group_support["Platform services"]
  node_analytics["Dashboard analytics"]
  node_audit["Audit logs"]
  node_uploads["Image uploads<br/>[upload.service.ts]"]
  node_email["Email delivery<br/>[email.service.ts]"]
  node_postgres[("PostgreSQL")]
  node_redis[("Redis")]
  node_cloudinary["Cloudinary"]
end

node_client(("API client"))

node_client -.->|"calls API"| node_auth_controller
node_client -.->|"calls API"| node_properties_controller
node_client -.->|"calls API"| node_units_controller
node_client -.->|"calls API"| node_rental_controller
node_client -.->|"calls API"| node_leases_controller
node_client -.->|"calls API"| node_maintenance_controller
node_auth_controller -->|"delegates to"| node_auth_service
node_auth_controller -->|"delegates to"| node_google_auth
node_auth_service -->|"uses user lookup"| node_users_service
node_auth_controller -->|"uses service"| node_users_service
node_users_controller -->|"delegates to"| node_users_service
node_users_service -.->|"manages"| node_user_records
node_properties_controller -->|"delegates to"| node_properties_service
node_units_controller -->|"delegates to"| node_units_service
node_rental_controller -->|"delegates to"| node_rental_service
node_leases_controller -->|"delegates to"| node_leases_service
node_renewals_controller -->|"delegates to"| node_renewals_service
node_maintenance_controller -->|"delegates to"| node_maintenance_service
node_notifications_controller -->|"delegates to"| node_notifications_service
node_properties_controller -->|"uses upload constants"| node_uploads
node_units_controller -->|"uses upload constants"| node_uploads
node_maintenance_controller -->|"uses upload constants"| node_uploads
node_auth_service -->|"sends OTP email"| node_email
node_properties_service -.->|"persists listings"| node_postgres
node_units_service -.->|"persists units"| node_postgres
node_rental_service -.->|"persists requests"| node_postgres
node_leases_service -.->|"persists leases"| node_postgres
node_maintenance_service -.->|"persists requests"| node_postgres
node_uploads -.->|"stores images"| node_cloudinary
node_auth_service -.->|"stores OTPs"| node_redis
node_notifications_service -.->|"dispatches email"| node_email

click node_auth_controller "https://github.com/yousef-shohber/prop-flow/blob/main/src/auth/auth.controller.ts"
click node_auth_service "https://github.com/yousef-shohber/prop-flow/blob/main/src/auth/auth.service.ts"
click node_google_auth "https://github.com/yousef-shohber/prop-flow/blob/main/src/auth/google.service.ts"
click node_users_controller "https://github.com/yousef-shohber/prop-flow/blob/main/src/users/users.controller.ts"
click node_users_service "https://github.com/yousef-shohber/prop-flow/blob/main/src/users/users.service.ts"
click node_user_records "https://github.com/yousef-shohber/prop-flow/blob/main/src/users/entities/user.entity.ts"
click node_properties_controller "https://github.com/yousef-shohber/prop-flow/blob/main/src/properties/properties.controller.ts"
click node_properties_service "https://github.com/yousef-shohber/prop-flow/blob/main/src/properties/properties.service.ts"
click node_units_controller "https://github.com/yousef-shohber/prop-flow/blob/main/src/units/units.controller.ts"
click node_units_service "https://github.com/yousef-shohber/prop-flow/blob/main/src/units/units.service.ts"
click node_rental_controller "https://github.com/yousef-shohber/prop-flow/blob/main/src/rental-requests/rental-requests.controller.ts"
click node_rental_service "https://github.com/yousef-shohber/prop-flow/blob/main/src/rental-requests/rental-requests.service.ts"
click node_leases_controller "https://github.com/yousef-shohber/prop-flow/blob/main/src/leases/leases.controller.ts"
click node_leases_service "https://github.com/yousef-shohber/prop-flow/blob/main/src/leases/leases.service.ts"
click node_renewals_controller "https://github.com/yousef-shohber/prop-flow/blob/main/src/leases/lease-renewal-requests.controller.ts"
click node_renewals_service "https://github.com/yousef-shohber/prop-flow/blob/main/src/leases/lease-renewal-requests.service.ts"
click node_maintenance_controller "https://github.com/yousef-shohber/prop-flow/blob/main/src/maintenance/maintenance.controller.ts"
click node_maintenance_service "https://github.com/yousef-shohber/prop-flow/blob/main/src/maintenance/maintenance.service.ts"
click node_notifications_controller "https://github.com/yousef-shohber/prop-flow/blob/main/src/notifications/notifications.controller.ts"
click node_notifications_service "https://github.com/yousef-shohber/prop-flow/blob/main/src/notifications/notifications.service.ts"
click node_analytics "https://github.com/yousef-shohber/prop-flow/blob/main/src/analytics/analytics.service.ts"
click node_audit "https://github.com/yousef-shohber/prop-flow/blob/main/src/audit-logs/audit-logs.service.ts"
click node_uploads "https://github.com/yousef-shohber/prop-flow/blob/main/src/common/uploads/upload.service.ts"
click node_email "https://github.com/yousef-shohber/prop-flow/blob/main/src/common/mail/email.service.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_auth_controller,node_auth_service,node_google_auth,node_users_controller,node_users_service,node_user_records,node_client toneBlue
class node_properties_controller,node_properties_service,node_units_controller,node_units_service,node_rental_controller,node_rental_service,node_leases_controller,node_leases_service,node_renewals_controller,node_renewals_service toneAmber
class node_maintenance_controller,node_maintenance_service,node_notifications_controller,node_notifications_service toneMint
class node_analytics,node_audit,node_uploads,node_email,node_postgres,node_redis,node_cloudinary toneRose
```

## Components

### Identity and access

- [Auth endpoints](https://github.com/yousef-shohber/prop-flow/blob/main/src/auth/auth.controller.ts): `src/auth/auth.controller.ts`
- [Authentication](https://github.com/yousef-shohber/prop-flow/blob/main/src/auth/auth.service.ts): `src/auth/auth.service.ts`
- [Google OAuth](https://github.com/yousef-shohber/prop-flow/blob/main/src/auth/google.service.ts): `src/auth/google.service.ts`
- [User endpoints](https://github.com/yousef-shohber/prop-flow/blob/main/src/users/users.controller.ts): `src/users/users.controller.ts`
- [User management](https://github.com/yousef-shohber/prop-flow/blob/main/src/users/users.service.ts): `src/users/users.service.ts`
- [User records](https://github.com/yousef-shohber/prop-flow/blob/main/src/users/entities/user.entity.ts): `src/users/entities/user.entity.ts`

### Listings and rentals

- [Property endpoints](https://github.com/yousef-shohber/prop-flow/blob/main/src/properties/properties.controller.ts): `src/properties/properties.controller.ts`
- [Property management](https://github.com/yousef-shohber/prop-flow/blob/main/src/properties/properties.service.ts): `src/properties/properties.service.ts`
- [Unit endpoints](https://github.com/yousef-shohber/prop-flow/blob/main/src/units/units.controller.ts): `src/units/units.controller.ts`
- [Unit management](https://github.com/yousef-shohber/prop-flow/blob/main/src/units/units.service.ts): `src/units/units.service.ts`
- [Rental requests](https://github.com/yousef-shohber/prop-flow/blob/main/src/rental-requests/rental-requests.controller.ts): `src/rental-requests/rental-requests.controller.ts`
- [Rental workflow](https://github.com/yousef-shohber/prop-flow/blob/main/src/rental-requests/rental-requests.service.ts): `src/rental-requests/rental-requests.service.ts`
- [Lease endpoints](https://github.com/yousef-shohber/prop-flow/blob/main/src/leases/leases.controller.ts): `src/leases/leases.controller.ts`
- [Lease management](https://github.com/yousef-shohber/prop-flow/blob/main/src/leases/leases.service.ts): `src/leases/leases.service.ts`
- [Renewal requests](https://github.com/yousef-shohber/prop-flow/blob/main/src/leases/lease-renewal-requests.controller.ts): `src/leases/lease-renewal-requests.controller.ts`
- [Renewal workflow](https://github.com/yousef-shohber/prop-flow/blob/main/src/leases/lease-renewal-requests.service.ts): `src/leases/lease-renewal-requests.service.ts`

### Operations

- [Maintenance endpoints](https://github.com/yousef-shohber/prop-flow/blob/main/src/maintenance/maintenance.controller.ts): `src/maintenance/maintenance.controller.ts`
- [Maintenance workflow](https://github.com/yousef-shohber/prop-flow/blob/main/src/maintenance/maintenance.service.ts): `src/maintenance/maintenance.service.ts`
- [Notification endpoints](https://github.com/yousef-shohber/prop-flow/blob/main/src/notifications/notifications.controller.ts): `src/notifications/notifications.controller.ts`
- [Notifications](https://github.com/yousef-shohber/prop-flow/blob/main/src/notifications/notifications.service.ts): `src/notifications/notifications.service.ts`

### Platform services

- [Dashboard analytics](https://github.com/yousef-shohber/prop-flow/blob/main/src/analytics/analytics.service.ts): `src/analytics/analytics.service.ts`
- [Audit logs](https://github.com/yousef-shohber/prop-flow/blob/main/src/audit-logs/audit-logs.service.ts): `src/audit-logs/audit-logs.service.ts`
- [Image uploads](https://github.com/yousef-shohber/prop-flow/blob/main/src/common/uploads/upload.service.ts): `src/common/uploads/upload.service.ts`
- [Email delivery](https://github.com/yousef-shohber/prop-flow/blob/main/src/common/mail/email.service.ts): `src/common/mail/email.service.ts`
- **PostgreSQL**
- **Redis**
- **Cloudinary**

### Other components

- **API client**

## Connections

- API client → Auth endpoints: calls API
- API client → Property endpoints: calls API
- API client → Unit endpoints: calls API
- API client → Rental requests: calls API
- API client → Lease endpoints: calls API
- API client → Maintenance endpoints: calls API
- Auth endpoints → Authentication: delegates to (evidence: `src/auth/auth.controller.ts`)
- Auth endpoints → Google OAuth: delegates to (evidence: `src/auth/auth.controller.ts`)
- Authentication → User management: uses user lookup (evidence: `src/auth/auth.service.ts`)
- Auth endpoints → User management: uses service (evidence: `src/auth/auth.controller.ts`)
- User endpoints → User management: delegates to (evidence: `src/users/users.controller.ts`)
- User management → User records: manages (evidence: `src/users/users.service.ts`)
- Property endpoints → Property management: delegates to (evidence: `src/properties/properties.controller.ts`)
- Unit endpoints → Unit management: delegates to (evidence: `src/units/units.controller.ts`)
- Rental requests → Rental workflow: delegates to (evidence: `src/rental-requests/rental-requests.controller.ts`)
- Lease endpoints → Lease management: delegates to (evidence: `src/leases/leases.controller.ts`)
- Renewal requests → Renewal workflow: delegates to (evidence: `src/leases/lease-renewal-requests.controller.ts`)
- Maintenance endpoints → Maintenance workflow: delegates to (evidence: `src/maintenance/maintenance.controller.ts`)
- Notification endpoints → Notifications: delegates to (evidence: `src/notifications/notifications.controller.ts`)
- Property endpoints → Image uploads: uses upload constants (evidence: `src/properties/properties.controller.ts`)
- Unit endpoints → Image uploads: uses upload constants (evidence: `src/units/units.controller.ts`)
- Maintenance endpoints → Image uploads: uses upload constants (evidence: `src/maintenance/maintenance.controller.ts`)
- Authentication → Email delivery: sends OTP email (evidence: `src/auth/auth.service.ts`)
- Property management → PostgreSQL: persists listings
- Unit management → PostgreSQL: persists units
- Rental workflow → PostgreSQL: persists requests
- Lease management → PostgreSQL: persists leases
- Maintenance workflow → PostgreSQL: persists requests
- Image uploads → Cloudinary: stores images
- Authentication → Redis: stores OTPs
- Notifications → Email delivery: dispatches email
