# rajat-wyrm/apogee architecture

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

- Interactive diagram: https://gitdiagram.com/rajat-wyrm/apogee
- Repository: https://github.com/rajat-wyrm/apogee

## Overview

1. **Repository shape**
   - This is a monorepo with a Node/Express backend at the root and a React/Vite frontend in `apps/web`.
   - The architecture is clearly split into a server API, a browser client, shared operational scripts, and an extensive integration test suite.

2. **Backend entry and request pipeline**
   - The backend starts from `src/index.js`, with configuration in `src/config`, database access in `src/db`, middleware in `src/middleware`, and feature routes under `src/modules/*/routes.js`.
   - Incoming HTTP requests flow through middleware first, then into domain modules, then to database/service layers.
   - The middleware layer includes authentication, rate limiting, and caching, which are architectural concerns rather than feature code.

3. **Domain-driven API layout**
   - The backend is organized by business capability: auth, organizations, workspaces, projects, tasks, documents, files, analytics, AI, billing, admin, notifications, teams, search, wiki, whiteboards, calendar, goals, automations, exports, webhooks, presence, sharing, and more.
   - Each module owns its REST endpoints, which makes the API surface easy to diagram as a set of bounded contexts behind the same Express server.

4. **Multi-tenant and access-control boundaries**
   - The product is multi-tenant: organizations and workspaces are the core isolation units.
   - Auth, role-based access control, and tenant-aware database access are central boundaries; most routes are authenticated, and admin routes are explicitly separated.
   - The README indicates tenant isolation is enforced at the query layer, so the diagram should show tenancy being validated server-side, not just in the UI.

5. **Data layer and migrations**
   - PostgreSQL is the primary persistent store, accessed through `src/db/pool.js`.
   - Schema evolution is explicit via SQL schema files (`schema.sql`, `schema-phase2.sql`, `schema-advanced.sql`) and migration scripts (`scripts/migrate.js`, `src/db/migrate.js`).
   - There is also a seed script (`scripts/seed.js`) that bootstraps demo data, showing the app expects a structured DB setup before the API runs.

6. **Service layer and external integrations**
   - Cross-cutting backend services live in `src/services`: AI, audit logging, email, files, notifications, cache, and tokens.
   - These are where external dependencies matter: AI providers, email delivery, file storage (Cloudinary), billing (Stripe), and notification dispatch are abstracted away from route handlers.
   - `src/utils/crypto.js` and `src/utils/http.js` support lower-level security and HTTP concerns.

7. **Real-time subsystem**
   - Socket.IO is a separate subsystem under `src/sockets`, with its own setup and server wiring.
   - It appears to power live notifications and presence-style collaboration, complementing the REST API rather than replacing it.
   - In a diagram, this is a second inbound channel alongside HTTP, sharing auth/context with the backend but serving push updates.

8. **Frontend application structure**
   - The frontend entry is `apps/web/src/main.jsx`, with the UI built from `pages`, `features`, `components`, `layouts`, `store`, `hooks`, `lib`, and `theme`.
   - `pages` represent route-level screens, `features` group business domains, and `components` contain reusable UI primitives and shells.
   - This suggests a composition model: page → feature → shared component, rather than a tightly coupled SPA.

9. **Client-side state and API access**
   - `apps/web/src/lib/api.js` is the primary HTTP client boundary to the backend, and `apps/web/src/lib/socket.js` is the client connection for real-time events.
   - Zustand stores in `apps/web/src/store` handle auth, organization/workspace context, and theme.
   - The frontend therefore has two major outbound dependencies: REST for data mutation/query and Socket.IO for live updates.

10. **UI shell and navigation**
   - The app has a reusable application shell (`AppLayout`, `Layout`, `Sidebar`, `Topbar`, `WorkspaceSwitcher`, command palette, drawers, etc.) that wraps the feature pages.
   - There are separate auth layouts/screens for login, registration, forgot password, and two-factor flows.
   - This is important for the diagram because authenticated product flows and unauthenticated onboarding flows are structurally distinct.

11. **Product surface areas on the client**
   - The frontend mirrors the backend domains: dashboard, projects, tasks, documents, whiteboards, wiki, calendar, notifications, reports, billing, admin, settings, team, search, automations, goals, and helpdesk.
   - Many of these are likely feature views backed by the matching API module, so the safest diagram is a one-to-one alignment of client feature areas to backend route modules.

12. **Operational and delivery concerns**
   - Docker is first-class: there are separate Dockerfiles for backend and frontend, plus `docker-compose.yml`.
   - CI is handled through GitHub Actions (`.github/workflows/ci.yml`), and Jest/Supertest provide integration coverage for the backend contract.
   - The frontend also has PWA-oriented setup via Vite config and manifest assets, indicating offline-capable browser behavior is part of the delivery model.

13. **Main end-to-end data flow**
   - A user interacts with the React app, which reads auth/org state from client stores, calls the Express API via `lib/api.js`, and subscribes to Socket.IO for live events.
   - The backend authenticates and authorizes the request, resolves the tenant/workspace context, performs DB operations in PostgreSQL, and may invoke services for files, email, billing, AI, or notifications.
   - The result is returned synchronously over HTTP and, when relevant, broadcast asynchronously over sockets.

14. **What to emphasize in an architecture diagram**
   - Show three major zones: browser frontend, Node/Express backend, PostgreSQL data store.
   - Add side integrations for Socket.IO, AI providers, Stripe, Cloudinary, and email/notification services.
   - Inside the backend, depict middleware, domain modules, and shared services as the main internal boundaries; inside the frontend, depict layouts/shell, page-level features, shared components, and client state/API layers.

Main entry points: [`src/modules`](https://github.com/rajat-wyrm/apogee/tree/main/src/modules) (API modules), [`src/index.js`](https://github.com/rajat-wyrm/apogee/blob/main/src/index.js) (API entry), [`src/db/pool.js`](https://github.com/rajat-wyrm/apogee/blob/main/src/db/pool.js) (PostgreSQL), [`src/services`](https://github.com/rajat-wyrm/apogee/tree/main/src/services) (Services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_frontend["Frontend"]
  node_n_fe_entry["Web entry<br/>React bootstrap<br/>[main.jsx]"]
  node_n_fe_shell["App shell<br/>layout system<br/>[AppLayout.jsx]"]
  node_n_fe_auth["Auth UI<br/>auth screens"]
  node_n_fe_pages["Pages<br/>route screens"]
  node_n_fe_features["Features<br/>domain views"]
  node_n_fe_components["Components<br/>ui kit"]
  node_n_fe_state["State<br/>zustand stores"]
  node_n_fe_api["API client<br/>REST client<br/>[api.js]"]
  node_n_fe_socket["Socket client<br/>realtime client<br/>[socket.js]"]
end

subgraph group_grp_backend["Backend"]
  node_n_backend_entry["API entry<br/>Express server<br/>[index.js]"]
  node_n_backend_config["Config<br/>[index.js]"]
  node_n_backend_middleware["Middleware<br/>request pipeline<br/>[index.js]"]
  node_n_backend_modules["API modules<br/>domain routes"]
  node_n_backend_services["Services"]
  node_n_backend_sockets(("Sockets<br/>realtime gateway"))
  node_n_backend_utils["Utils<br/>security/http helpers"]
  node_n_module_auth["Auth<br/>[routes.js]"]
  node_n_module_orgs["Orgs<br/>tenant module<br/>[routes.js]"]
  node_n_module_workspaces["Workspaces<br/>tenant module<br/>[routes.js]"]
  node_n_module_projects["Projects<br/>domain module<br/>[routes.js]"]
  node_n_module_tasks["Tasks<br/>domain module<br/>[routes.js]"]
  node_n_module_docs["Documents<br/>content module<br/>[routes.js]"]
  node_n_module_ai["AI<br/>[routes.js]"]
  node_n_module_billing["Billing<br/>[routes.js]"]
  node_n_module_admin["Admin<br/>[routes.js]"]
  node_n_module_notifications["Notifications<br/>domain module<br/>[routes.js]"]
end

subgraph group_grp_data["Data"]
  node_n_db_pool[("PostgreSQL<br/>database pool<br/>[pool.js]")]
  node_n_db_migrations["Migrations<br/>schema evolution<br/>[migrate.js]"]
  node_n_db_seed["Seed data<br/>bootstrap script<br/>[seed.js]"]
end

subgraph group_grp_ops["Ops"]
  node_n_ops_docker["Containers<br/>docker<br/>[docker-compose.yml]"]
  node_n_ops_ci["CI<br/>github actions<br/>[ci.yml]"]
  node_n_ops_tests["Integration tests<br/>jest/supertest"]
end

node_n_backend_entry -->|"loads"| node_n_backend_config
node_n_backend_entry -->|"uses"| node_n_backend_middleware
node_n_backend_entry -->|"mounts"| node_n_backend_modules
node_n_backend_entry -->|"calls"| node_n_backend_services
node_n_backend_entry -->|"starts"| node_n_backend_sockets
node_n_backend_entry -->|"connects"| node_n_db_pool
node_n_backend_middleware -->|"protects"| node_n_module_auth
node_n_backend_middleware -->|"gates"| node_n_module_admin
node_n_backend_modules -->|"includes"| node_n_module_auth
node_n_backend_modules -->|"includes"| node_n_module_orgs
node_n_backend_modules -->|"includes"| node_n_module_workspaces
node_n_backend_modules -->|"includes"| node_n_module_projects
node_n_backend_modules -->|"includes"| node_n_module_tasks
node_n_backend_modules -->|"includes"| node_n_module_docs
node_n_backend_modules -->|"includes"| node_n_module_ai
node_n_backend_modules -->|"includes"| node_n_module_billing
node_n_backend_modules -->|"includes"| node_n_module_admin
node_n_backend_modules -->|"includes"| node_n_module_notifications
node_n_module_orgs -->|"queries"| node_n_db_pool
node_n_module_workspaces -->|"queries"| node_n_db_pool
node_n_module_projects -->|"queries"| node_n_db_pool
node_n_module_tasks -->|"queries"| node_n_db_pool
node_n_module_docs -->|"queries"| node_n_db_pool
node_n_module_ai -->|"uses"| node_n_backend_services
node_n_module_billing -->|"uses"| node_n_backend_services
node_n_module_notifications -->|"uses"| node_n_backend_services
node_n_backend_services -->|"publishes"| node_n_backend_sockets
node_n_backend_services -->|"persists"| node_n_db_pool
node_n_db_migrations -->|"prepares"| node_n_db_pool
node_n_db_seed -->|"loads"| node_n_db_pool
node_n_fe_entry -->|"renders"| node_n_fe_shell
node_n_fe_entry -->|"routes"| node_n_fe_pages
node_n_fe_shell -->|"composes"| node_n_fe_components
node_n_fe_pages -->|"composes"| node_n_fe_features
node_n_fe_features -->|"uses"| node_n_fe_components
node_n_fe_entry -->|"initializes"| node_n_fe_state
node_n_fe_features -->|"calls"| node_n_fe_api
node_n_fe_features -->|"subscribes"| node_n_fe_socket
node_n_fe_state -->|"configures"| node_n_fe_api
node_n_fe_socket -->|"connects"| node_n_backend_sockets
node_n_fe_api -->|"requests"| node_n_backend_entry
node_n_ops_docker -->|"packages"| node_n_backend_entry
node_n_ops_docker -->|"packages"| node_n_fe_entry
node_n_ops_ci -->|"runs"| node_n_ops_tests
node_n_ops_ci -->|"builds"| node_n_ops_docker
node_n_ops_tests -->|"verifies"| node_n_backend_entry

click node_n_backend_entry "https://github.com/rajat-wyrm/apogee/blob/main/src/index.js"
click node_n_backend_config "https://github.com/rajat-wyrm/apogee/blob/main/src/config/index.js"
click node_n_backend_middleware "https://github.com/rajat-wyrm/apogee/blob/main/src/middleware/index.js"
click node_n_backend_modules "https://github.com/rajat-wyrm/apogee/tree/main/src/modules"
click node_n_backend_services "https://github.com/rajat-wyrm/apogee/tree/main/src/services"
click node_n_backend_sockets "https://github.com/rajat-wyrm/apogee/tree/main/src/sockets"
click node_n_backend_utils "https://github.com/rajat-wyrm/apogee/tree/main/src/utils"
click node_n_module_auth "https://github.com/rajat-wyrm/apogee/blob/main/src/modules/auth/routes.js"
click node_n_module_orgs "https://github.com/rajat-wyrm/apogee/blob/main/src/modules/organizations/routes.js"
click node_n_module_workspaces "https://github.com/rajat-wyrm/apogee/blob/main/src/modules/workspaces/routes.js"
click node_n_module_projects "https://github.com/rajat-wyrm/apogee/blob/main/src/modules/projects/routes.js"
click node_n_module_tasks "https://github.com/rajat-wyrm/apogee/blob/main/src/modules/tasks/routes.js"
click node_n_module_docs "https://github.com/rajat-wyrm/apogee/blob/main/src/modules/documents/routes.js"
click node_n_module_ai "https://github.com/rajat-wyrm/apogee/blob/main/src/modules/ai/routes.js"
click node_n_module_billing "https://github.com/rajat-wyrm/apogee/blob/main/src/modules/billing/routes.js"
click node_n_module_admin "https://github.com/rajat-wyrm/apogee/blob/main/src/modules/admin/routes.js"
click node_n_module_notifications "https://github.com/rajat-wyrm/apogee/blob/main/src/modules/notifications/routes.js"
click node_n_db_pool "https://github.com/rajat-wyrm/apogee/blob/main/src/db/pool.js"
click node_n_db_migrations "https://github.com/rajat-wyrm/apogee/blob/main/src/db/migrate.js"
click node_n_db_seed "https://github.com/rajat-wyrm/apogee/blob/main/scripts/seed.js"
click node_n_fe_entry "https://github.com/rajat-wyrm/apogee/blob/main/apps/web/src/main.jsx"
click node_n_fe_shell "https://github.com/rajat-wyrm/apogee/blob/main/apps/web/src/layouts/AppLayout.jsx"
click node_n_fe_auth "https://github.com/rajat-wyrm/apogee/tree/main/apps/web/src/features/auth"
click node_n_fe_pages "https://github.com/rajat-wyrm/apogee/tree/main/apps/web/src/pages"
click node_n_fe_features "https://github.com/rajat-wyrm/apogee/tree/main/apps/web/src/features"
click node_n_fe_components "https://github.com/rajat-wyrm/apogee/tree/main/apps/web/src/components"
click node_n_fe_state "https://github.com/rajat-wyrm/apogee/tree/main/apps/web/src/store"
click node_n_fe_api "https://github.com/rajat-wyrm/apogee/blob/main/apps/web/src/lib/api.js"
click node_n_fe_socket "https://github.com/rajat-wyrm/apogee/blob/main/apps/web/src/lib/socket.js"
click node_n_ops_docker "https://github.com/rajat-wyrm/apogee/blob/main/docker-compose.yml"
click node_n_ops_ci "https://github.com/rajat-wyrm/apogee/blob/main/.github/workflows/ci.yml"
click node_n_ops_tests "https://github.com/rajat-wyrm/apogee/tree/main/tests"

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_n_fe_entry,node_n_fe_shell,node_n_fe_auth,node_n_fe_pages,node_n_fe_features,node_n_fe_components,node_n_fe_state,node_n_fe_api,node_n_fe_socket toneBlue
class node_n_backend_entry,node_n_backend_config,node_n_backend_middleware,node_n_backend_modules,node_n_backend_services,node_n_backend_sockets,node_n_backend_utils,node_n_module_auth,node_n_module_orgs,node_n_module_workspaces,node_n_module_projects,node_n_module_tasks,node_n_module_docs,node_n_module_ai,node_n_module_billing,node_n_module_admin,node_n_module_notifications toneAmber
class node_n_db_pool,node_n_db_migrations,node_n_db_seed toneMint
class node_n_ops_docker,node_n_ops_ci,node_n_ops_tests toneRose
```

## Components

### Frontend

React/Vite browser app and its UI composition layers.

- [Web entry](https://github.com/rajat-wyrm/apogee/blob/main/apps/web/src/main.jsx): React bootstrap · Browser app bootstrap and root rendering. · `apps/web/src/main.jsx`
- [App shell](https://github.com/rajat-wyrm/apogee/blob/main/apps/web/src/layouts/AppLayout.jsx): layout system · Authenticated app layout, navigation, drawers, and command palette. · `apps/web/src/layouts/AppLayout.jsx`
- [Auth UI](https://github.com/rajat-wyrm/apogee/tree/main/apps/web/src/features/auth): auth screens · Login, register, forgot password, and two-factor screens. · `apps/web/src/features/auth`
- [Pages](https://github.com/rajat-wyrm/apogee/tree/main/apps/web/src/pages): route screens · Route-level screens for product areas like dashboard, projects, tasks, and settings. · `apps/web/src/pages`
- [Features](https://github.com/rajat-wyrm/apogee/tree/main/apps/web/src/features): domain views · Business-domain UI modules aligned to backend capabilities. · `apps/web/src/features`
- [Components](https://github.com/rajat-wyrm/apogee/tree/main/apps/web/src/components): ui kit · Reusable UI primitives and shell components. · `apps/web/src/components`
- [State](https://github.com/rajat-wyrm/apogee/tree/main/apps/web/src/store): zustand stores · Client auth, org context, and theme state. · `apps/web/src/store`
- [API client](https://github.com/rajat-wyrm/apogee/blob/main/apps/web/src/lib/api.js): REST client · Primary HTTP boundary to the backend. · `apps/web/src/lib/api.js`
- [Socket client](https://github.com/rajat-wyrm/apogee/blob/main/apps/web/src/lib/socket.js): realtime client · Client connection for live events and collaboration signals. · `apps/web/src/lib/socket.js`

### Backend

Express API, domain modules, services, and realtime wiring.

- [API entry](https://github.com/rajat-wyrm/apogee/blob/main/src/index.js): Express server · Backend bootstrap and HTTP server startup. · `src/index.js`
- [Config](https://github.com/rajat-wyrm/apogee/blob/main/src/config/index.js): runtime config · Environment and app configuration. · `src/config/index.js`
- [Middleware](https://github.com/rajat-wyrm/apogee/blob/main/src/middleware/index.js): request pipeline · Shared HTTP concerns such as auth, rate limiting, and cache. · `src/middleware/index.js`
- [API modules](https://github.com/rajat-wyrm/apogee/tree/main/src/modules): domain routes · Feature bounded contexts exposed as REST routes. · `src/modules`
- [Services](https://github.com/rajat-wyrm/apogee/tree/main/src/services): cross-cutting services · Shared service layer for AI, audit, email, files, notifications, cache, and tokens. · `src/services`
- [Sockets](https://github.com/rajat-wyrm/apogee/tree/main/src/sockets): realtime gateway · Socket.IO setup for live notifications and presence. · `src/sockets`
- [Utils](https://github.com/rajat-wyrm/apogee/tree/main/src/utils): security/http helpers · Low-level crypto and HTTP utilities. · `src/utils`
- [Auth](https://github.com/rajat-wyrm/apogee/blob/main/src/modules/auth/routes.js): auth module · Login, registration, two-factor, and token flows. · `src/modules/auth/routes.js`
- [Orgs](https://github.com/rajat-wyrm/apogee/blob/main/src/modules/organizations/routes.js): tenant module · Organization-level isolation and access boundaries. · `src/modules/organizations/routes.js`
- [Workspaces](https://github.com/rajat-wyrm/apogee/blob/main/src/modules/workspaces/routes.js): tenant module · Workspace context and tenant-scoped routing. · `src/modules/workspaces/routes.js`
- [Projects](https://github.com/rajat-wyrm/apogee/blob/main/src/modules/projects/routes.js): domain module · Project REST endpoints and coordination. · `src/modules/projects/routes.js`
- [Tasks](https://github.com/rajat-wyrm/apogee/blob/main/src/modules/tasks/routes.js): domain module · Task management endpoints and workflow. · `src/modules/tasks/routes.js`
- [Documents](https://github.com/rajat-wyrm/apogee/blob/main/src/modules/documents/routes.js): content module · Document CRUD and editing routes. · `src/modules/documents/routes.js`
- [AI](https://github.com/rajat-wyrm/apogee/blob/main/src/modules/ai/routes.js): ai module · AI-powered backend endpoints and provider integration. · `src/modules/ai/routes.js`
- [Billing](https://github.com/rajat-wyrm/apogee/blob/main/src/modules/billing/routes.js): billing module · Subscription and payment-related routes. · `src/modules/billing/routes.js`
- [Admin](https://github.com/rajat-wyrm/apogee/blob/main/src/modules/admin/routes.js): admin module · Explicit administrative backend surface. · `src/modules/admin/routes.js`
- [Notifications](https://github.com/rajat-wyrm/apogee/blob/main/src/modules/notifications/routes.js): domain module · Notification delivery and querying routes. · `src/modules/notifications/routes.js`

### Data

Database schema, migrations, and seeding.

- [PostgreSQL](https://github.com/rajat-wyrm/apogee/blob/main/src/db/pool.js): database pool · Primary database access layer. · `src/db/pool.js`
- [Migrations](https://github.com/rajat-wyrm/apogee/blob/main/src/db/migrate.js): schema evolution · SQL schema files and migration runner. · `src/db/migrate.js`
- [Seed data](https://github.com/rajat-wyrm/apogee/blob/main/scripts/seed.js): bootstrap script · Demo and fixture data bootstrap. · `scripts/seed.js`

### Ops

Build, container, and CI delivery concerns.

- [Containers](https://github.com/rajat-wyrm/apogee/blob/main/docker-compose.yml): docker · Backend and frontend container definitions plus compose orchestration. · `docker-compose.yml`
- [CI](https://github.com/rajat-wyrm/apogee/blob/main/.github/workflows/ci.yml): github actions · Continuous integration workflow. · `.github/workflows/ci.yml`
- [Integration tests](https://github.com/rajat-wyrm/apogee/tree/main/tests): jest/supertest · Backend and end-to-end contract coverage. · `tests`

## Connections

- API entry → Config: loads · Bootstraps runtime settings.
- API entry → Middleware: uses · Installs shared request pipeline.
- API entry → API modules: mounts · Registers feature routes.
- API entry → Services: calls · Uses shared services during request handling.
- API entry → Sockets: starts · Wires realtime server alongside HTTP.
- API entry → PostgreSQL: connects · Opens database access.
- Middleware → Auth: protects · Enforces authentication and tenant context.
- Middleware → Admin: gates · Separates privileged admin access.
- API modules → Auth: includes · Auth bounded context.
- API modules → Orgs: includes · Tenant organization context.
- API modules → Workspaces: includes · Workspace isolation context.
- API modules → Projects: includes · Project domain routes.
- API modules → Tasks: includes · Task domain routes.
- API modules → Documents: includes · Document domain routes.
- API modules → AI: includes · AI domain routes.
- API modules → Billing: includes · Billing domain routes.
- API modules → Admin: includes · Admin routes.
- API modules → Notifications: includes · Notification routes.
- Orgs → PostgreSQL: queries · Tenant-aware database access.
- Workspaces → PostgreSQL: queries · Workspace-scoped database access.
- Projects → PostgreSQL: queries · Reads and writes project data.
- Tasks → PostgreSQL: queries · Reads and writes task data.
- Documents → PostgreSQL: queries · Persists documents and related metadata.
- AI → Services: uses · Delegates to AI provider abstraction.
- Billing → Services: uses · Delegates to payment-related service boundary.
- Notifications → Services: uses · Delegates delivery and audit concerns.
- Services → Sockets: publishes · Pushes live updates when needed.
- Services → PostgreSQL: persists · Service-backed data operations.
- Migrations → PostgreSQL: prepares · Defines and evolves the database schema.
- Seed data → PostgreSQL: loads · Bootstraps demo content into PostgreSQL.
- Web entry → App shell: renders · Mounts application shell.
- Web entry → Pages: routes · Connects route-level pages.
- App shell → Components: composes · Uses shared layout and UI primitives.
- Pages → Features: composes · Page screens are built from feature modules.
- Features → Components: uses · Feature views share reusable UI.
- Web entry → State: initializes · Loads client state stores.
- Features → API client: calls · Reads and mutates backend data.
- Features → Socket client: subscribes · Receives live events and presence updates.
- State → API client: configures · Shares auth and tenant context with API calls.
- Socket client → Sockets: connects · Opens realtime channel to backend.
- API client → API entry: requests · Primary HTTP client path to the Express API.
- Containers → API entry: packages · Backend container image.
- Containers → Web entry: packages · Frontend container image.
- CI → Integration tests: runs · CI executes repository tests.
- CI → Containers: builds · CI validates containerized delivery.
- Integration tests → API entry: verifies · Exercises API and integration flows.
