# ideahub-solutions-llc/cql-deliverables architecture

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

- Interactive diagram: https://gitdiagram.com/ideahub-solutions-llc/cql-deliverables
- Repository: https://github.com/ideahub-solutions-llc/cql-deliverables

## Overview

PMS is a workspace-scoped daily-delivery application: staff sign in, select a workspace and project, update assigned deliverables, and reviewers manage definitions and accept completed work. The interface also supports Board, Schedule, Recovery, and History views, comments, alerts, profiles, and user administration. Sampled routes show authentication and workspace checks around D1-backed updates; unsampled route relationships are included only where the README documents the capability. The repository excerpt does not establish production hosting or the later AI-reporting integration.

Main entry points: [`app/api/state/route.ts`](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/api/state/route.ts) (Progress and validation), [`app/page.tsx`](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/page.tsx) (Workspace project routing), [`db/schema.ts`](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/db/schema.ts) (D1 application data), [`app/api/deliverables/route.ts`](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/api/deliverables/route.ts) (Deliverable management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Accounts and access"]
  node_signin["Sign-in and signup<br/>[login-form.tsx]"]
  node_auth["Session and roles<br/>[auth.ts]"]
  node_profiles["Account profiles<br/>[profile-form.tsx]"]
  node_useradmin["User administration<br/>[user-directory.tsx]"]
end

subgraph group_workspace["Workspace navigation"]
  node_home["Workspace project routing<br/>[page.tsx]"]
  node_navigation["Dashboard navigation"]
  node_workspacehome["Workspace and projects<br/>[workspace-home.tsx]"]
  node_workspaceapi["Workspace APIs<br/>[route.ts]"]
  node_projectapi["Project APIs<br/>[route.ts]"]
end

subgraph group_delivery["Delivery workflow"]
  node_deliveryui["Delivery console"]
  node_projectui["Project console"]
  node_deliverables["Deliverable management<br/>[route.ts]"]
  node_stateapi["Progress and validation<br/>[route.ts]"]
  node_deliveryrules["Task validation<br/>[delivery.ts]"]
  node_workstreams["Workstream catalog<br/>[workstreams.ts]"]
end

subgraph group_collaboration["Team collaboration"]
  node_comments["Comments<br/>[route.ts]"]
  node_notifications["In-app alerts<br/>[route.ts]"]
end

subgraph group_storage["Persistence"]
  node_database[("D1 application data<br/>[schema.ts]")]
end

node_staff(("Staff and reviewers"))

node_staff -->|"signs in"| node_signin
node_signin -.->|"uses sessions"| node_auth
node_staff -->|"opens dashboard"| node_home
node_home -->|"checks session"| node_auth
node_home -->|"routes legacy project"| node_deliveryui
node_home -->|"routes projects"| node_projectui
node_home -->|"shows workspace"| node_workspacehome
node_workspacehome -->|"renders shell"| node_navigation
node_staff -->|"selects workspace"| node_navigation
node_staff -->|"creates projects"| node_projectapi
node_staff -->|"manages workspaces"| node_workspaceapi
node_staff -->|"updates work"| node_deliveryui
node_deliveryui -.->|"saves progress"| node_stateapi
node_projectui -.->|"saves progress"| node_stateapi
node_staff -->|"manages deliverables"| node_deliverables
node_deliverables -->|"remembers names"| node_workstreams
node_stateapi -->|"checks identity"| node_auth
node_stateapi -->|"validates updates"| node_deliveryrules
node_stateapi -->|"remembers names"| node_workstreams
node_staff -->|"comments on work"| node_comments
node_staff -->|"views alerts"| node_notifications
node_comments -->|"reads and writes"| node_database
node_deliverables -->|"reads and writes"| node_database
node_projectapi -->|"reads and writes"| node_database
node_stateapi -->|"reads and writes"| node_database
node_notifications -->|"reads and writes"| node_database
node_staff -->|"updates profile"| node_profiles
node_staff -->|"manages accounts"| node_useradmin

click node_signin "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/login/login-form.tsx"
click node_auth "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/lib/auth.ts"
click node_profiles "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/profile/profile-form.tsx"
click node_useradmin "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/user-directory.tsx"
click node_home "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/page.tsx"
click node_navigation "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/dashboard-shell.tsx"
click node_workspacehome "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/workspace-home.tsx"
click node_workspaceapi "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/api/workspaces/route.ts"
click node_projectapi "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/api/projects/route.ts"
click node_deliveryui "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/delivery-console.tsx"
click node_projectui "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/project-console.tsx"
click node_deliverables "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/api/deliverables/route.ts"
click node_stateapi "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/api/state/route.ts"
click node_deliveryrules "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/lib/delivery.ts"
click node_workstreams "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/lib/workstreams.ts"
click node_comments "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/api/comments/route.ts"
click node_notifications "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/api/notifications/route.ts"
click node_database "https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/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_signin,node_auth,node_profiles,node_useradmin,node_staff toneBlue
class node_home,node_navigation,node_workspacehome,node_workspaceapi,node_projectapi toneAmber
class node_deliveryui,node_projectui,node_deliverables,node_stateapi,node_deliveryrules,node_workstreams toneMint
class node_comments,node_notifications toneRose
class node_database toneIndigo
```

## Components

### Accounts and access

- [Sign-in and signup](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/login/login-form.tsx): `app/login/login-form.tsx`
- [Session and roles](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/lib/auth.ts): `lib/auth.ts`
- [Account profiles](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/profile/profile-form.tsx): `app/profile/profile-form.tsx`
- [User administration](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/user-directory.tsx): `app/user-directory.tsx`

### Workspace navigation

- [Workspace project routing](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/page.tsx): `app/page.tsx`
- [Dashboard navigation](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/dashboard-shell.tsx): `app/dashboard-shell.tsx`
- [Workspace and projects](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/workspace-home.tsx): `app/workspace-home.tsx`
- [Workspace APIs](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/api/workspaces/route.ts): `app/api/workspaces/route.ts`
- [Project APIs](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/api/projects/route.ts): `app/api/projects/route.ts`

### Delivery workflow

- [Delivery console](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/delivery-console.tsx): `app/delivery-console.tsx`
- [Project console](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/project-console.tsx): `app/project-console.tsx`
- [Deliverable management](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/api/deliverables/route.ts): `app/api/deliverables/route.ts`
- [Progress and validation](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/api/state/route.ts): `app/api/state/route.ts`
- [Task validation](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/lib/delivery.ts): `lib/delivery.ts`
- [Workstream catalog](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/lib/workstreams.ts): `lib/workstreams.ts`

### Team collaboration

- [Comments](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/api/comments/route.ts): `app/api/comments/route.ts`
- [In-app alerts](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/app/api/notifications/route.ts): `app/api/notifications/route.ts`

### Persistence

- [D1 application data](https://github.com/ideahub-solutions-llc/cql-deliverables/blob/main/db/schema.ts): `db/schema.ts`

### Other components

- **Staff and reviewers**

## Connections

- Staff and reviewers → Sign-in and signup: signs in (evidence: `README.md`)
- Sign-in and signup → Session and roles: uses sessions
- Staff and reviewers → Workspace project routing: opens dashboard (evidence: `README.md`)
- Workspace project routing → Session and roles: checks session (evidence: `app/page.tsx`)
- Workspace project routing → Delivery console: routes legacy project (evidence: `app/page.tsx`)
- Workspace project routing → Project console: routes projects (evidence: `app/page.tsx`)
- Workspace project routing → Workspace and projects: shows workspace (evidence: `app/page.tsx`)
- Workspace and projects → Dashboard navigation: renders shell (evidence: `app/dashboard-shell.tsx`)
- Staff and reviewers → Dashboard navigation: selects workspace (evidence: `README.md`)
- Staff and reviewers → Project APIs: creates projects (evidence: `app/api/projects/route.ts`)
- Staff and reviewers → Workspace APIs: manages workspaces (evidence: `README.md`)
- Staff and reviewers → Delivery console: updates work (evidence: `README.md`)
- Delivery console → Progress and validation: saves progress
- Project console → Progress and validation: saves progress
- Staff and reviewers → Deliverable management: manages deliverables (evidence: `README.md`)
- Deliverable management → Workstream catalog: remembers names (evidence: `app/api/deliverables/route.ts`)
- Progress and validation → Session and roles: checks identity (evidence: `app/api/state/route.ts`)
- Progress and validation → Task validation: validates updates (evidence: `app/api/state/route.ts`)
- Progress and validation → Workstream catalog: remembers names (evidence: `app/api/state/route.ts`)
- Staff and reviewers → Comments: comments on work (evidence: `README.md`)
- Staff and reviewers → In-app alerts: views alerts (evidence: `README.md`)
- Comments → D1 application data: reads and writes (evidence: `app/api/comments/route.ts`)
- Deliverable management → D1 application data: reads and writes (evidence: `app/api/deliverables/route.ts`)
- Project APIs → D1 application data: reads and writes (evidence: `app/api/projects/route.ts`)
- Progress and validation → D1 application data: reads and writes (evidence: `app/api/state/route.ts`)
- In-app alerts → D1 application data: reads and writes (evidence: `app/api/notifications/route.ts`)
- Staff and reviewers → Account profiles: updates profile (evidence: `README.md`)
- Staff and reviewers → User administration: manages accounts (evidence: `README.md`)
