# johnram1975/condoplus architecture

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

- Interactive diagram: https://gitdiagram.com/johnram1975/condoplus
- Repository: https://github.com/johnram1975/condoplus

## Overview

CondoPlus is a multi-tenant SaaS for condominium operations, with a React PWA and private NestJS API. Residents and condominium staff sign in, select a membership context, and use tenant-scoped features such as requests, documents, residents, and communications; platform administrators manage the SaaS separately. The graph highlights authentication and request handling as the primary workflow, plus documented/runtime feature areas. Some feature internals were not sampled, so their connections are limited to routes or documented architecture rather than inferred service calls.

Main entry points: [`apps/web/src/shared/api/client.ts`](https://github.com/johnram1975/condoplus/blob/main/apps/web/src/shared/api/client.ts) (API client), [`apps/web/src/app/router.tsx`](https://github.com/johnram1975/condoplus/blob/main/apps/web/src/app/router.tsx) (PWA routes), [`apps/api/src/modules/auth/auth.service.ts`](https://github.com/johnram1975/condoplus/blob/main/apps/api/src/modules/auth/auth.service.ts) (Authentication), [`apps/web/src/features/requests/RequestDetailPage.tsx`](https://github.com/johnram1975/condoplus/blob/main/apps/web/src/features/requests/RequestDetailPage.tsx) (Requests screens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_webapp["PWA routes<br/>[router.tsx]"]
  node_authui["Session provider<br/>[AuthProvider.tsx]"]
  node_apiclient["API client<br/>[client.ts]"]
  node_requestsui["Requests screens"]
  node_platformui["Platform console<br/>[PlatformPages.tsx]"]
end

subgraph group_identity["Identity and tenancy"]
  node_authapi["Authentication<br/>[auth.service.ts]"]
  node_authguards["JWT and permissions"]
  node_tenantctx["Tenant context"]
  node_tenancy["Condominium onboarding<br/>[tenancy.service.ts]"]
end

subgraph group_operations["Condominium operations"]
  node_requestapi["Request handling"]
  node_requestservice["Request domain service"]
  node_documents["Documents and files"]
  node_residents["Resident management"]
  node_assemblies["Assemblies and polls"]
  node_communications["Communications"]
  node_notifications["Notifications"]
  node_dashboard["Operational dashboard"]
  node_audit["Audit trail"]
end

subgraph group_platform["SaaS administration"]
  node_platformapi["Platform administration"]
end

node_people(("Residents and staff"))
node_postgres[("Postgres with RLS")]
node_redis[("Redis services<br/>[redis.service.ts]")]

node_people -->|"use"| node_webapp
node_webapp -->|"routes through"| node_authui
node_authui -->|"calls"| node_apiclient
node_apiclient -->|"requests"| node_authapi
node_authapi -->|"reads and writes"| node_postgres
node_authapi -->|"uses cache and limits"| node_redis
node_people -->|"submit requests"| node_requestsui
node_webapp -->|"routes to"| node_requestsui
node_requestsui -.->|"submits data"| node_apiclient
node_apiclient -->|"sends API calls"| node_requestapi
node_requestapi -->|"delegates"| node_requestservice
node_requestservice -.->|"reads and writes"| node_postgres
node_authguards -.->|"enforces context"| node_tenantctx
node_people -.->|"onboard condominium"| node_tenancy
node_platformui -.->|"manages platform"| node_platformapi
node_webapp -->|"routes to"| node_platformui
node_apiclient -.->|"requests feature APIs"| node_documents
node_apiclient -.->|"requests feature APIs"| node_residents
node_apiclient -.->|"requests feature APIs"| node_assemblies
node_apiclient -.->|"requests feature APIs"| node_communications
node_apiclient -.->|"requests feature APIs"| node_notifications
node_apiclient -.->|"requests feature APIs"| node_dashboard
node_apiclient -.->|"requests feature APIs"| node_audit

click node_webapp "https://github.com/johnram1975/condoplus/blob/main/apps/web/src/app/router.tsx"
click node_authui "https://github.com/johnram1975/condoplus/blob/main/apps/web/src/features/auth/AuthProvider.tsx"
click node_apiclient "https://github.com/johnram1975/condoplus/blob/main/apps/web/src/shared/api/client.ts"
click node_authapi "https://github.com/johnram1975/condoplus/blob/main/apps/api/src/modules/auth/auth.service.ts"
click node_authguards "https://github.com/johnram1975/condoplus/tree/main/apps/api/src/common/guards"
click node_tenantctx "https://github.com/johnram1975/condoplus/tree/main/apps/api/src/common/tenant"
click node_tenancy "https://github.com/johnram1975/condoplus/blob/main/apps/api/src/modules/tenancy/tenancy.service.ts"
click node_requestsui "https://github.com/johnram1975/condoplus/blob/main/apps/web/src/features/requests/RequestDetailPage.tsx"
click node_requestapi "https://github.com/johnram1975/condoplus/blob/main/apps/api/src/modules/requests/requests.controller.ts"
click node_requestservice "https://github.com/johnram1975/condoplus/blob/main/apps/api/src/modules/requests/requests.service.ts"
click node_documents "https://github.com/johnram1975/condoplus/tree/main/apps/api/src/modules/documents"
click node_residents "https://github.com/johnram1975/condoplus/tree/main/apps/api/src/modules/residents"
click node_assemblies "https://github.com/johnram1975/condoplus/tree/main/apps/api/src/modules/assemblies"
click node_communications "https://github.com/johnram1975/condoplus/tree/main/apps/api/src/modules/communications"
click node_notifications "https://github.com/johnram1975/condoplus/tree/main/apps/api/src/modules/notifications"
click node_dashboard "https://github.com/johnram1975/condoplus/tree/main/apps/api/src/modules/dashboard"
click node_audit "https://github.com/johnram1975/condoplus/tree/main/apps/api/src/modules/audit"
click node_platformui "https://github.com/johnram1975/condoplus/blob/main/apps/web/src/features/platform/PlatformPages.tsx"
click node_platformapi "https://github.com/johnram1975/condoplus/blob/main/apps/api/src/modules/platform/platform.service.ts"
click node_redis "https://github.com/johnram1975/condoplus/blob/main/apps/api/src/redis/redis.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_webapp,node_authui,node_apiclient,node_requestsui,node_platformui toneBlue
class node_authapi,node_authguards,node_tenantctx,node_tenancy,node_postgres,node_redis toneAmber
class node_requestapi,node_requestservice,node_documents,node_residents,node_assemblies,node_communications,node_notifications,node_dashboard,node_audit toneMint
class node_platformapi toneRose
class node_people toneIndigo
```

## Components

### Web application

- [PWA routes](https://github.com/johnram1975/condoplus/blob/main/apps/web/src/app/router.tsx): `apps/web/src/app/router.tsx`
- [Session provider](https://github.com/johnram1975/condoplus/blob/main/apps/web/src/features/auth/AuthProvider.tsx): `apps/web/src/features/auth/AuthProvider.tsx`
- [API client](https://github.com/johnram1975/condoplus/blob/main/apps/web/src/shared/api/client.ts): `apps/web/src/shared/api/client.ts`
- [Requests screens](https://github.com/johnram1975/condoplus/blob/main/apps/web/src/features/requests/RequestDetailPage.tsx): `apps/web/src/features/requests/RequestDetailPage.tsx`
- [Platform console](https://github.com/johnram1975/condoplus/blob/main/apps/web/src/features/platform/PlatformPages.tsx): `apps/web/src/features/platform/PlatformPages.tsx`

### Identity and tenancy

- [Authentication](https://github.com/johnram1975/condoplus/blob/main/apps/api/src/modules/auth/auth.service.ts): `apps/api/src/modules/auth/auth.service.ts`
- [JWT and permissions](https://github.com/johnram1975/condoplus/tree/main/apps/api/src/common/guards): `apps/api/src/common/guards`
- [Tenant context](https://github.com/johnram1975/condoplus/tree/main/apps/api/src/common/tenant): `apps/api/src/common/tenant`
- [Condominium onboarding](https://github.com/johnram1975/condoplus/blob/main/apps/api/src/modules/tenancy/tenancy.service.ts): `apps/api/src/modules/tenancy/tenancy.service.ts`

### Condominium operations

- [Request handling](https://github.com/johnram1975/condoplus/blob/main/apps/api/src/modules/requests/requests.controller.ts): `apps/api/src/modules/requests/requests.controller.ts`
- [Request domain service](https://github.com/johnram1975/condoplus/blob/main/apps/api/src/modules/requests/requests.service.ts): `apps/api/src/modules/requests/requests.service.ts`
- [Documents and files](https://github.com/johnram1975/condoplus/tree/main/apps/api/src/modules/documents): `apps/api/src/modules/documents`
- [Resident management](https://github.com/johnram1975/condoplus/tree/main/apps/api/src/modules/residents): `apps/api/src/modules/residents`
- [Assemblies and polls](https://github.com/johnram1975/condoplus/tree/main/apps/api/src/modules/assemblies): `apps/api/src/modules/assemblies`
- [Communications](https://github.com/johnram1975/condoplus/tree/main/apps/api/src/modules/communications): `apps/api/src/modules/communications`
- [Notifications](https://github.com/johnram1975/condoplus/tree/main/apps/api/src/modules/notifications): `apps/api/src/modules/notifications`
- [Operational dashboard](https://github.com/johnram1975/condoplus/tree/main/apps/api/src/modules/dashboard): `apps/api/src/modules/dashboard`
- [Audit trail](https://github.com/johnram1975/condoplus/tree/main/apps/api/src/modules/audit): `apps/api/src/modules/audit`

### SaaS administration

- [Platform administration](https://github.com/johnram1975/condoplus/blob/main/apps/api/src/modules/platform/platform.service.ts): `apps/api/src/modules/platform/platform.service.ts`

### Other components

- **Residents and staff**
- **Postgres with RLS**
- [Redis services](https://github.com/johnram1975/condoplus/blob/main/apps/api/src/redis/redis.service.ts): `apps/api/src/redis/redis.service.ts`

## Connections

- Residents and staff → PWA routes: use
- PWA routes → Session provider: routes through (evidence: `apps/web/src/app/App.tsx`)
- Session provider → API client: calls (evidence: `apps/web/src/features/auth/AuthProvider.tsx`)
- API client → Authentication: requests (evidence: `apps/web/src/shared/api/client.ts`)
- Authentication → Postgres with RLS: reads and writes (evidence: `apps/api/src/modules/auth/auth.service.ts`)
- Authentication → Redis services: uses cache and limits (evidence: `apps/api/src/modules/auth/auth.service.ts`)
- Residents and staff → Requests screens: submit requests
- PWA routes → Requests screens: routes to (evidence: `apps/web/src/app/router.tsx`)
- Requests screens → API client: submits data (evidence: `apps/web/src/features/requests/RequestDetailPage.tsx`)
- API client → Request handling: sends API calls
- Request handling → Request domain service: delegates (evidence: `apps/api/src/modules/requests/requests.controller.ts`)
- Request domain service → Postgres with RLS: reads and writes
- JWT and permissions → Tenant context: enforces context
- Residents and staff → Condominium onboarding: onboard condominium
- Platform console → Platform administration: manages platform
- PWA routes → Platform console: routes to (evidence: `apps/web/src/app/router.tsx`)
- API client → Documents and files: requests feature APIs
- API client → Resident management: requests feature APIs
- API client → Assemblies and polls: requests feature APIs
- API client → Communications: requests feature APIs
- API client → Notifications: requests feature APIs
- API client → Operational dashboard: requests feature APIs
- API client → Audit trail: requests feature APIs
