# juddrussel/path-system architecture

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

- Interactive diagram: https://gitdiagram.com/juddrussel/path-system
- Repository: https://github.com/juddrussel/path-system

## Overview

This is an academic document and task workflow application: faculty submit forms or complete assigned work, while reviewers and administrators manage review, assignment, collaboration, and workflow configuration. The client routes users into these activities; the Express server exposes the corresponding APIs and real-time events. Sampled source confirms form review, task handling, workflow execution, authentication, and SLA alert behavior. The README is empty, and many routes and pages were not sampled, so their internal wiring is not inferred.

Main entry points: [`server/config/db.js`](https://github.com/juddrussel/path-system/blob/main/server/config/db.js) (Application database), [`client/src/App.jsx`](https://github.com/juddrussel/path-system/blob/main/client/src/App.jsx) (Application router), [`server/index.js`](https://github.com/juddrussel/path-system/blob/main/server/index.js) (API server), [`server/routes/form.routes.js`](https://github.com/juddrussel/path-system/blob/main/server/routes/form.routes.js) (Form submissions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_webapp["Application router<br/>[App.jsx]"]
  node_formui["Forms<br/>[Forms.jsx]"]
  node_taskui["Task work<br/>[MyTasks.jsx]"]
  node_workflowui["Workflow tools"]
  node_reviewui["Review queue<br/>[Documentreview.jsx]"]
end

subgraph group_workflow["Submission and tasks"]
  node_forms["Form submissions<br/>[form.routes.js]"]
  node_tasks["Task assignment<br/>[task.routes.js]"]
  node_collaboration["Collaborative tasks"]
  node_workflowapi["Workflow API"]
  node_execution["Workflow execution"]
  node_workflowmodel["Workflow model<br/>[Workflow.js]"]
end

subgraph group_platform["Administration and services"]
  node_auth["Authentication<br/>[auth.routes.js]"]
  node_database[("Application database<br/>[db.js]")]
  node_storage["File storage<br/>[r2.js]"]
  node_realtime["Socket events<br/>[index.js]"]
  node_audit["Audit trail<br/>[audit.routes.js]"]
  node_sla["SLA management<br/>[slaController.js]"]
  node_slacron["SLA monitoring<br/>[slaCron.js]"]
  node_email["Alert email<br/>[slaEmailService.js]"]
end

subgraph group_runtime["Server runtime"]
  node_server["API server<br/>[index.js]"]
end

node_faculty(("Faculty"))
node_reviewer(("Reviewer"))
node_administrator(("Chair or admin"))
node_externalstorage[("Object storage")]
node_mailservice["Email service"]

node_faculty -->|"uses"| node_webapp
node_reviewer -->|"uses"| node_webapp
node_administrator -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_formui
node_webapp -->|"routes to"| node_taskui
node_webapp -->|"routes to"| node_workflowui
node_webapp -->|"routes to"| node_reviewui
node_server -->|"mounts"| node_auth
node_server -->|"mounts"| node_forms
node_server -->|"mounts"| node_tasks
node_server -->|"mounts"| node_collaboration
node_server -->|"mounts"| node_workflowapi
node_server -->|"hosts"| node_realtime
node_formui -->|"submits forms"| node_forms
node_reviewui -->|"reviews submissions"| node_forms
node_taskui -->|"manages tasks"| node_tasks
node_taskui -->|"collaborates"| node_collaboration
node_workflowui -->|"configures workflows"| node_workflowapi
node_forms -->|"reads and writes"| node_database
node_forms -->|"uploads files"| node_storage
node_tasks -->|"reads and writes"| node_database
node_tasks -->|"manages attachments"| node_storage
node_collaboration -->|"reads and writes"| node_database
node_collaboration -->|"broadcasts updates"| node_realtime
node_workflowapi -->|"calls"| node_workflowmodel
node_workflowmodel -->|"queries"| node_database
node_execution -->|"tracks transitions"| node_database
node_execution -->|"creates tasks"| node_tasks
node_auth -->|"reads and writes"| node_database
node_audit -->|"records activity"| node_database
node_slacron -->|"checks deadlines"| node_sla
node_sla -->|"reads and writes"| node_database
node_sla -->|"sends alerts"| node_email
node_email -->|"delivers email"| node_mailservice
node_storage -.->|"stores files"| node_externalstorage

click node_webapp "https://github.com/juddrussel/path-system/blob/main/client/src/App.jsx"
click node_formui "https://github.com/juddrussel/path-system/blob/main/client/src/pages/Forms.jsx"
click node_taskui "https://github.com/juddrussel/path-system/blob/main/client/src/pages/MyTasks.jsx"
click node_workflowui "https://github.com/juddrussel/path-system/blob/main/client/src/pages/WorkflowDesigner.jsx"
click node_reviewui "https://github.com/juddrussel/path-system/blob/main/client/src/pages/Documentreview.jsx"
click node_server "https://github.com/juddrussel/path-system/blob/main/server/index.js"
click node_auth "https://github.com/juddrussel/path-system/blob/main/server/routes/auth.routes.js"
click node_forms "https://github.com/juddrussel/path-system/blob/main/server/routes/form.routes.js"
click node_tasks "https://github.com/juddrussel/path-system/blob/main/server/routes/task.routes.js"
click node_collaboration "https://github.com/juddrussel/path-system/blob/main/server/routes/collaborative.routes.js"
click node_workflowapi "https://github.com/juddrussel/path-system/blob/main/server/controllers/workflow.controller.js"
click node_execution "https://github.com/juddrussel/path-system/blob/main/server/services/workflowExecution.service.js"
click node_workflowmodel "https://github.com/juddrussel/path-system/blob/main/server/models/Workflow.js"
click node_database "https://github.com/juddrussel/path-system/blob/main/server/config/db.js"
click node_storage "https://github.com/juddrussel/path-system/blob/main/server/config/r2.js"
click node_realtime "https://github.com/juddrussel/path-system/blob/main/server/index.js"
click node_audit "https://github.com/juddrussel/path-system/blob/main/server/routes/audit.routes.js"
click node_sla "https://github.com/juddrussel/path-system/blob/main/server/controllers/slaController.js"
click node_slacron "https://github.com/juddrussel/path-system/blob/main/server/cron/slaCron.js"
click node_email "https://github.com/juddrussel/path-system/blob/main/server/services/slaEmailService.js"

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_formui,node_taskui,node_workflowui,node_reviewui,node_reviewer toneBlue
class node_forms,node_tasks,node_collaboration,node_workflowapi,node_execution,node_workflowmodel,node_externalstorage toneAmber
class node_auth,node_database,node_storage,node_realtime,node_audit,node_sla,node_slacron,node_email toneMint
class node_server toneRose
class node_faculty,node_administrator,node_mailservice toneIndigo
```

## Components

### Web client

- [Application router](https://github.com/juddrussel/path-system/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Forms](https://github.com/juddrussel/path-system/blob/main/client/src/pages/Forms.jsx): `client/src/pages/Forms.jsx`
- [Task work](https://github.com/juddrussel/path-system/blob/main/client/src/pages/MyTasks.jsx): `client/src/pages/MyTasks.jsx`
- [Workflow tools](https://github.com/juddrussel/path-system/blob/main/client/src/pages/WorkflowDesigner.jsx): `client/src/pages/WorkflowDesigner.jsx`
- [Review queue](https://github.com/juddrussel/path-system/blob/main/client/src/pages/Documentreview.jsx): `client/src/pages/Documentreview.jsx`

### Submission and tasks

- [Form submissions](https://github.com/juddrussel/path-system/blob/main/server/routes/form.routes.js): `server/routes/form.routes.js`
- [Task assignment](https://github.com/juddrussel/path-system/blob/main/server/routes/task.routes.js): `server/routes/task.routes.js`
- [Collaborative tasks](https://github.com/juddrussel/path-system/blob/main/server/routes/collaborative.routes.js): `server/routes/collaborative.routes.js`
- [Workflow API](https://github.com/juddrussel/path-system/blob/main/server/controllers/workflow.controller.js): `server/controllers/workflow.controller.js`
- [Workflow execution](https://github.com/juddrussel/path-system/blob/main/server/services/workflowExecution.service.js): `server/services/workflowExecution.service.js`
- [Workflow model](https://github.com/juddrussel/path-system/blob/main/server/models/Workflow.js): `server/models/Workflow.js`

### Administration and services

- [Authentication](https://github.com/juddrussel/path-system/blob/main/server/routes/auth.routes.js): `server/routes/auth.routes.js`
- [Application database](https://github.com/juddrussel/path-system/blob/main/server/config/db.js): `server/config/db.js`
- [File storage](https://github.com/juddrussel/path-system/blob/main/server/config/r2.js): `server/config/r2.js`
- [Socket events](https://github.com/juddrussel/path-system/blob/main/server/index.js): `server/index.js`
- [Audit trail](https://github.com/juddrussel/path-system/blob/main/server/routes/audit.routes.js): `server/routes/audit.routes.js`
- [SLA management](https://github.com/juddrussel/path-system/blob/main/server/controllers/slaController.js): `server/controllers/slaController.js`
- [SLA monitoring](https://github.com/juddrussel/path-system/blob/main/server/cron/slaCron.js): `server/cron/slaCron.js`
- [Alert email](https://github.com/juddrussel/path-system/blob/main/server/services/slaEmailService.js): `server/services/slaEmailService.js`

### Server runtime

- [API server](https://github.com/juddrussel/path-system/blob/main/server/index.js): `server/index.js`

### Other components

- **Faculty**
- **Reviewer**
- **Chair or admin**
- **Object storage**
- **Email service**

## Connections

- Faculty → Application router: uses
- Reviewer → Application router: uses
- Chair or admin → Application router: uses
- Application router → Forms: routes to
- Application router → Task work: routes to
- Application router → Workflow tools: routes to
- Application router → Review queue: routes to
- API server → Authentication: mounts
- API server → Form submissions: mounts
- API server → Task assignment: mounts
- API server → Collaborative tasks: mounts
- API server → Workflow API: mounts
- API server → Socket events: hosts
- Forms → Form submissions: submits forms
- Review queue → Form submissions: reviews submissions
- Task work → Task assignment: manages tasks
- Task work → Collaborative tasks: collaborates
- Workflow tools → Workflow API: configures workflows
- Form submissions → Application database: reads and writes
- Form submissions → File storage: uploads files
- Task assignment → Application database: reads and writes
- Task assignment → File storage: manages attachments
- Collaborative tasks → Application database: reads and writes
- Collaborative tasks → Socket events: broadcasts updates
- Workflow API → Workflow model: calls
- Workflow model → Application database: queries
- Workflow execution → Application database: tracks transitions
- Workflow execution → Task assignment: creates tasks
- Authentication → Application database: reads and writes
- Audit trail → Application database: records activity
- SLA monitoring → SLA management: checks deadlines
- SLA management → Application database: reads and writes
- SLA management → Alert email: sends alerts
- Alert email → Email service: delivers email
- File storage → Object storage: stores files
