# ace-vizserve/vizserve-pms architecture

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

- Interactive diagram: https://gitdiagram.com/ace-vizserve/vizserve-pms
- Repository: https://github.com/ace-vizserve/vizserve-pms

## Overview

This is a workforce and project-operations web application: employees manage tasks, attendance, timesheets, requests, and leave, while administrators oversee workflows and reporting. The clearest sampled workflow is task management: the task table invokes server actions, which apply authorization and validation and can coordinate attachments, client approvals, email, and persistence. The tree also shows distinct forms, approvals, attendance, timesheet, analytics, and HR capabilities. The README is empty; links for unsampled feature areas are omitted rather than inferred from filenames.

Main entry points: [`app/(app)/tasks/actions.ts`](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/tasks/actions.ts) (Task Actions), [`utils/supabase/server.ts`](https://github.com/ace-vizserve/vizserve-pms/blob/main/utils/supabase/server.ts) (Session Database Client), [`lib/client-approval-server.ts`](https://github.com/ace-vizserve/vizserve-pms/blob/main/lib/client-approval-server.ts) (Client Approval), [`lib/email/client-emails.ts`](https://github.com/ace-vizserve/vizserve-pms/blob/main/lib/email/client-emails.ts) (Client Email)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_work["Task Work"]
  node_task_views["Task Views<br/>[tasks-table.tsx]"]
  node_task_actions["Task Actions<br/>[actions.ts]"]
  node_task_schema["Task Rules<br/>[tasks.ts]"]
  node_list_manager["List Manager<br/>[list-manager.tsx]"]
  node_client_approval["Client Approval"]
end

subgraph group_requests["Requests &amp; Forms"]
  node_requests_ui["Requests<br/>[page.tsx]"]
  node_approval_ui["Approvals<br/>[page.tsx]"]
  node_public_request["Public Requests<br/>[page.tsx]"]
  node_form_builder["Form Builder<br/>[page.tsx]"]
end

subgraph group_people["People Operations"]
  node_dtr_view["Attendance<br/>[page.tsx]"]
  node_punch_panel["Clock Actions<br/>[punch-panel.tsx]"]
  node_timesheet["Timesheets<br/>[page.tsx]"]
  node_leave["Leave<br/>[page.tsx]"]
end

subgraph group_insight["Reporting &amp; Admin"]
  node_analytics["Analytics<br/>[page.tsx]"]
  node_admin["Administration<br/>[page.tsx]"]
  node_daily_report["Attendance Report<br/>[route.ts]"]
end

subgraph group_platform["Shared Services"]
  node_authorization["Authorization<br/>[authorization.ts]"]
  node_attachments["Attachments"]
  node_email["Client Email<br/>[client-emails.ts]"]
  node_session_db["Session Database Client<br/>[server.ts]"]
  node_admin_db["Service Database Client<br/>[admin.ts]"]
end

node_employee(("Employee"))
node_database[("Supabase")]

node_employee -.->|"manages tasks"| node_task_views
node_task_views -->|"invokes"| node_task_actions
node_list_manager -->|"saves lists"| node_task_actions
node_task_actions -->|"checks access"| node_authorization
node_task_actions -->|"validates input"| node_task_schema
node_task_actions -->|"handles files"| node_attachments
node_task_actions -->|"issues approval"| node_client_approval
node_task_actions -->|"dispatches mail"| node_email
node_task_actions -->|"queries data"| node_session_db
node_client_approval -->|"issues tokens"| node_admin_db
node_client_approval -->|"sends approval"| node_email
node_email -->|"loads details"| node_session_db
node_punch_panel -.->|"supports clocking"| node_dtr_view
node_punch_panel -.->|"writes attendance"| node_session_db
node_daily_report -->|"reads records"| node_admin_db
node_daily_report -->|"loads attendance"| node_database
node_admin_db -.->|"connects as service"| node_database
node_session_db -.->|"connects by session"| node_database

click node_task_views "https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/tasks/tasks-table.tsx"
click node_task_actions "https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/tasks/actions.ts"
click node_task_schema "https://github.com/ace-vizserve/vizserve-pms/blob/main/lib/schemas/tasks.ts"
click node_list_manager "https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/tasks/lists/list-manager.tsx"
click node_client_approval "https://github.com/ace-vizserve/vizserve-pms/blob/main/lib/client-approval-server.ts"
click node_requests_ui "https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/requests/page.tsx"
click node_approval_ui "https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/approvals/page.tsx"
click node_public_request "https://github.com/ace-vizserve/vizserve-pms/blob/main/app/request/%5Bslug%5D/page.tsx"
click node_form_builder "https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(builder)/forms/%5Bid%5D/page.tsx"
click node_dtr_view "https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/dtr/page.tsx"
click node_punch_panel "https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/dtr/punch-panel.tsx"
click node_timesheet "https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/timesheet/page.tsx"
click node_leave "https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/hr/balances/page.tsx"
click node_analytics "https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/analytics/page.tsx"
click node_admin "https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/admin/settings/page.tsx"
click node_daily_report "https://github.com/ace-vizserve/vizserve-pms/blob/main/app/api/cron/daily-attendance/route.ts"
click node_authorization "https://github.com/ace-vizserve/vizserve-pms/blob/main/lib/auth/authorization.ts"
click node_attachments "https://github.com/ace-vizserve/vizserve-pms/blob/main/lib/attachments-server.ts"
click node_email "https://github.com/ace-vizserve/vizserve-pms/blob/main/lib/email/client-emails.ts"
click node_session_db "https://github.com/ace-vizserve/vizserve-pms/blob/main/utils/supabase/server.ts"
click node_admin_db "https://github.com/ace-vizserve/vizserve-pms/blob/main/utils/supabase/admin.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_task_views,node_task_actions,node_task_schema,node_list_manager,node_client_approval toneBlue
class node_requests_ui,node_approval_ui,node_public_request,node_form_builder,node_database toneAmber
class node_dtr_view,node_punch_panel,node_timesheet,node_leave toneMint
class node_analytics,node_admin,node_daily_report toneRose
class node_authorization,node_attachments,node_email,node_session_db,node_admin_db,node_employee toneIndigo
```

## Components

### Task Work

- [Task Views](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/tasks/tasks-table.tsx): `app/(app)/tasks/tasks-table.tsx`
- [Task Actions](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/tasks/actions.ts): `app/(app)/tasks/actions.ts`
- [Task Rules](https://github.com/ace-vizserve/vizserve-pms/blob/main/lib/schemas/tasks.ts): `lib/schemas/tasks.ts`
- [List Manager](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/tasks/lists/list-manager.tsx): `app/(app)/tasks/lists/list-manager.tsx`
- [Client Approval](https://github.com/ace-vizserve/vizserve-pms/blob/main/lib/client-approval-server.ts): `lib/client-approval-server.ts`

### Requests & Forms

- [Requests](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/requests/page.tsx): `app/(app)/requests/page.tsx`
- [Approvals](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/approvals/page.tsx): `app/(app)/approvals/page.tsx`
- [Public Requests](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/request/%5Bslug%5D/page.tsx): `app/request/[slug]/page.tsx`
- [Form Builder](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(builder)/forms/%5Bid%5D/page.tsx): `app/(builder)/forms/[id]/page.tsx`

### People Operations

- [Attendance](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/dtr/page.tsx): `app/(app)/dtr/page.tsx`
- [Clock Actions](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/dtr/punch-panel.tsx): `app/(app)/dtr/punch-panel.tsx`
- [Timesheets](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/timesheet/page.tsx): `app/(app)/timesheet/page.tsx`
- [Leave](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/hr/balances/page.tsx): `app/(app)/hr/balances/page.tsx`

### Reporting & Admin

- [Analytics](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/analytics/page.tsx): `app/(app)/analytics/page.tsx`
- [Administration](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/(app)/admin/settings/page.tsx): `app/(app)/admin/settings/page.tsx`
- [Attendance Report](https://github.com/ace-vizserve/vizserve-pms/blob/main/app/api/cron/daily-attendance/route.ts): `app/api/cron/daily-attendance/route.ts`

### Shared Services

- [Authorization](https://github.com/ace-vizserve/vizserve-pms/blob/main/lib/auth/authorization.ts): `lib/auth/authorization.ts`
- [Attachments](https://github.com/ace-vizserve/vizserve-pms/blob/main/lib/attachments-server.ts): `lib/attachments-server.ts`
- [Client Email](https://github.com/ace-vizserve/vizserve-pms/blob/main/lib/email/client-emails.ts): `lib/email/client-emails.ts`
- [Session Database Client](https://github.com/ace-vizserve/vizserve-pms/blob/main/utils/supabase/server.ts): `utils/supabase/server.ts`
- [Service Database Client](https://github.com/ace-vizserve/vizserve-pms/blob/main/utils/supabase/admin.ts): `utils/supabase/admin.ts`

### Other components

- **Employee**
- **Supabase**

## Connections

- Employee → Task Views: manages tasks
- Task Views → Task Actions: invokes (evidence: `app/(app)/tasks/tasks-table.tsx`)
- List Manager → Task Actions: saves lists (evidence: `app/(app)/tasks/lists/list-manager.tsx`)
- Task Actions → Authorization: checks access (evidence: `app/(app)/tasks/actions.ts`)
- Task Actions → Task Rules: validates input (evidence: `app/(app)/tasks/actions.ts`)
- Task Actions → Attachments: handles files (evidence: `app/(app)/tasks/actions.ts`)
- Task Actions → Client Approval: issues approval (evidence: `app/(app)/tasks/actions.ts`)
- Task Actions → Client Email: dispatches mail (evidence: `app/(app)/tasks/actions.ts`)
- Task Actions → Session Database Client: queries data (evidence: `app/(app)/tasks/actions.ts`)
- Client Approval → Service Database Client: issues tokens (evidence: `lib/client-approval-server.ts`)
- Client Approval → Client Email: sends approval (evidence: `lib/client-approval-server.ts`)
- Client Email → Session Database Client: loads details
- Clock Actions → Attendance: supports clocking
- Clock Actions → Session Database Client: writes attendance
- Attendance Report → Service Database Client: reads records (evidence: `app/api/cron/daily-attendance/route.ts`)
- Attendance Report → Supabase: loads attendance (evidence: `app/api/cron/daily-attendance/route.ts`)
- Service Database Client → Supabase: connects as service
- Session Database Client → Supabase: connects by session
