# cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system architecture

> Architecture diagram of the GitHub repository cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system
- Repository: https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system

## Overview

This is a role-based postgraduate lifecycle platform: applicants enter through public intake, then students and academic staff advance admissions, research milestones, examination, and completion through role-specific dashboards and API workflows. The README documents the major lifecycle capabilities and architectural integrations; sampled code confirms selected authentication, dashboard, document, and maintenance relationships. Some domain modules were not sampled, so their placement reflects documented capabilities, while unverified internal calls are omitted.

Main entry points: [`src/app/api`](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/tree/main/src/app/api) (Route handlers), [`src/lib/proposals/submission.ts`](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/proposals/submission.ts) (Proposal workflows), [`src/lib/progress-reports/milestone-workflow.ts`](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/progress-reports/milestone-workflow.ts) (Progress reports), [`src/lib/examination/department-workflow.ts`](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/examination/department-workflow.ts) (Examination workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Role-based experience"]
  node_dashboard["Role dashboards"]
  node_admission_form["Application intake"]
  node_review_panel["Application review"]
  node_proposal_panel["Proposal submission"]
  node_progress_panel["Progress workspace"]
end

subgraph group_admissions["Admissions and research"]
  node_research_intake["Application workflows<br/>[submission.ts]"]
  node_proposal_workflow["Proposal workflows<br/>[submission.ts]"]
  node_assignment_workflow["Staff assignments"]
  node_registration["Registration rules<br/>[rules.ts]"]
end

subgraph group_academic["Academic lifecycle"]
  node_milestones["Progress reports"]
  node_ethics["Ethics approvals<br/>[approvals.ts]"]
  node_thesis["Thesis submissions<br/>[submission.ts]"]
  node_examination["Examination workflow"]
  node_corrections["Corrections"]
  node_completion["Completion and archive"]
end

subgraph group_platform["Platform services"]
  node_api["Route handlers"]
  node_auth["Authentication<br/>[with-auth.ts]"]
  node_dashboard_service["Dashboard summaries<br/>[summary.ts]"]
  node_documents["Document services<br/>[documents.ts]"]
  node_storage["File storage<br/>[storage.ts]"]
  node_database[("PostgreSQL")]
  node_prisma["Prisma client<br/>[client.ts]"]
  node_maintenance["Maintenance jobs<br/>[route.ts]"]
  node_outbox["Notification outbox<br/>[service.ts]"]
  node_email["Email delivery<br/>[email.ts]"]
  node_auth_types["Role definitions<br/>[auth.ts]"]
  node_dashboard_server["Dashboard context<br/>[server.ts]"]
end

node_applicant(("Applicant"))
node_academic_staff(("Academic staff"))

node_applicant -->|"submits application"| node_admission_form
node_academic_staff -->|"uses role portal"| node_dashboard
node_admission_form -.->|"sends requests"| node_api
node_review_panel -->|"reviews intake"| node_api
node_proposal_panel -.->|"submits proposals"| node_api
node_progress_panel -.->|"submits progress"| node_api
node_api -->|"authenticates routes"| node_auth
node_auth -->|"uses roles"| node_auth_types
node_api -->|"delegates intake"| node_research_intake
node_api -->|"delegates proposals"| node_proposal_workflow
node_dashboard -->|"loads context"| node_dashboard_server
node_dashboard_server -->|"loads summary"| node_dashboard_service
node_api -->|"serves documents"| node_documents
node_api -->|"runs maintenance"| node_milestones
node_api -->|"runs maintenance"| node_outbox
node_api -->|"cleans sessions"| node_storage
node_outbox -->|"sends email"| node_email
node_prisma -->|"accesses records"| node_database
node_api -->|"persists workflows"| node_database
node_api -->|"stores uploads"| node_storage
node_research_intake -->|"continues to review"| node_proposal_workflow
node_proposal_workflow -->|"precedes admission"| node_registration
node_registration -->|"generates milestones"| node_milestones
node_milestones -->|"gates thesis"| node_ethics
node_ethics -->|"clears submission"| node_thesis
node_thesis -->|"enters examination"| node_examination
node_examination -->|"orders corrections"| node_corrections
node_corrections -->|"enables completion"| node_completion
node_assignment_workflow -->|"assigns examiners"| node_examination

click node_dashboard "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/tree/main/src/app/dashboard"
click node_admission_form "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/components/application/application-form.tsx"
click node_review_panel "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/components/admin/application-review-panel.tsx"
click node_proposal_panel "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/components/proposals/proposal-submission-panel.tsx"
click node_progress_panel "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/components/student/student-progress-dashboard.tsx"
click node_research_intake "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/applications/submission.ts"
click node_proposal_workflow "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/proposals/submission.ts"
click node_assignment_workflow "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/tree/main/src/lib/assignments"
click node_registration "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/programmes/rules.ts"
click node_milestones "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/progress-reports/milestone-workflow.ts"
click node_ethics "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/ethics/approvals.ts"
click node_thesis "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/theses/submission.ts"
click node_examination "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/examination/department-workflow.ts"
click node_corrections "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/completion/corrections-workflow.ts"
click node_completion "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/completion/department-workflow.ts"
click node_api "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/tree/main/src/app/api"
click node_auth "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/firebase/with-auth.ts"
click node_dashboard_service "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/dashboard/summary.ts"
click node_documents "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/documents.ts"
click node_storage "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/storage.ts"
click node_prisma "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/prisma/client.ts"
click node_maintenance "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/app/api/cron/maintenance/route.ts"
click node_outbox "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/outbox/service.ts"
click node_email "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/email.ts"
click node_auth_types "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/types/auth.ts"
click node_dashboard_server "https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/dashboard/server.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_dashboard,node_admission_form,node_review_panel,node_proposal_panel,node_progress_panel toneBlue
class node_research_intake,node_proposal_workflow,node_assignment_workflow,node_registration toneAmber
class node_milestones,node_ethics,node_thesis,node_examination,node_corrections,node_completion toneMint
class node_api,node_auth,node_dashboard_service,node_documents,node_storage,node_database,node_prisma,node_maintenance,node_outbox,node_email,node_auth_types,node_dashboard_server toneRose
class node_applicant,node_academic_staff toneIndigo
```

## Components

### Role-based experience

- [Role dashboards](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/tree/main/src/app/dashboard): `src/app/dashboard`
- [Application intake](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/components/application/application-form.tsx): `src/components/application/application-form.tsx`
- [Application review](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/components/admin/application-review-panel.tsx): `src/components/admin/application-review-panel.tsx`
- [Proposal submission](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/components/proposals/proposal-submission-panel.tsx): `src/components/proposals/proposal-submission-panel.tsx`
- [Progress workspace](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/components/student/student-progress-dashboard.tsx): `src/components/student/student-progress-dashboard.tsx`

### Admissions and research

- [Application workflows](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/applications/submission.ts): `src/lib/applications/submission.ts`
- [Proposal workflows](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/proposals/submission.ts): `src/lib/proposals/submission.ts`
- [Staff assignments](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/tree/main/src/lib/assignments): `src/lib/assignments`
- [Registration rules](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/programmes/rules.ts): `src/lib/programmes/rules.ts`

### Academic lifecycle

- [Progress reports](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/progress-reports/milestone-workflow.ts): `src/lib/progress-reports/milestone-workflow.ts`
- [Ethics approvals](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/ethics/approvals.ts): `src/lib/ethics/approvals.ts`
- [Thesis submissions](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/theses/submission.ts): `src/lib/theses/submission.ts`
- [Examination workflow](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/examination/department-workflow.ts): `src/lib/examination/department-workflow.ts`
- [Corrections](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/completion/corrections-workflow.ts): `src/lib/completion/corrections-workflow.ts`
- [Completion and archive](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/completion/department-workflow.ts): `src/lib/completion/department-workflow.ts`

### Platform services

- [Route handlers](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/tree/main/src/app/api): `src/app/api`
- [Authentication](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/firebase/with-auth.ts): `src/lib/firebase/with-auth.ts`
- [Dashboard summaries](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/dashboard/summary.ts): `src/lib/dashboard/summary.ts`
- [Document services](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/documents.ts): `src/lib/documents.ts`
- [File storage](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/storage.ts): `src/lib/storage.ts`
- **PostgreSQL**
- [Prisma client](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/prisma/client.ts): `src/lib/prisma/client.ts`
- [Maintenance jobs](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/app/api/cron/maintenance/route.ts): `src/app/api/cron/maintenance/route.ts`
- [Notification outbox](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/outbox/service.ts): `src/lib/outbox/service.ts`
- [Email delivery](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/email.ts): `src/lib/email.ts`
- [Role definitions](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/types/auth.ts): `src/types/auth.ts`
- [Dashboard context](https://github.com/cepdnaclk/e23-co2060-mphil-phd-lifecycle-management-system/blob/main/src/lib/dashboard/server.ts): `src/lib/dashboard/server.ts`

### Other components

- **Applicant**
- **Academic staff**

## Connections

- Applicant → Application intake: submits application (evidence: `README.md`)
- Academic staff → Role dashboards: uses role portal (evidence: `README.md`)
- Application intake → Route handlers: sends requests
- Application review → Route handlers: reviews intake (evidence: `src/components/admin/application-review-panel.tsx`)
- Proposal submission → Route handlers: submits proposals
- Progress workspace → Route handlers: submits progress
- Route handlers → Authentication: authenticates routes (evidence: `src/lib/firebase/with-auth.ts`)
- Authentication → Role definitions: uses roles (evidence: `src/lib/firebase/with-auth.ts`)
- Route handlers → Application workflows: delegates intake (evidence: `src/app/api/applications/route.ts`)
- Route handlers → Proposal workflows: delegates proposals (evidence: `src/app/api/proposals/route.ts`)
- Role dashboards → Dashboard context: loads context (evidence: `src/lib/dashboard/server.ts`)
- Dashboard context → Dashboard summaries: loads summary (evidence: `src/lib/dashboard/server.ts`)
- Route handlers → Document services: serves documents (evidence: `src/app/api/documents/route.ts`)
- Route handlers → Progress reports: runs maintenance (evidence: `src/app/api/cron/maintenance/route.ts`)
- Route handlers → Notification outbox: runs maintenance (evidence: `src/app/api/cron/maintenance/route.ts`)
- Route handlers → File storage: cleans sessions (evidence: `src/app/api/cron/maintenance/route.ts`)
- Notification outbox → Email delivery: sends email (evidence: `src/lib/outbox/service.ts`)
- Prisma client → PostgreSQL: accesses records (evidence: `README.md`)
- Route handlers → PostgreSQL: persists workflows (evidence: `README.md`)
- Route handlers → File storage: stores uploads (evidence: `README.md`)
- Application workflows → Proposal workflows: continues to review (evidence: `README.md`)
- Proposal workflows → Registration rules: precedes admission (evidence: `README.md`)
- Registration rules → Progress reports: generates milestones (evidence: `README.md`)
- Progress reports → Ethics approvals: gates thesis (evidence: `README.md`)
- Ethics approvals → Thesis submissions: clears submission (evidence: `README.md`)
- Thesis submissions → Examination workflow: enters examination (evidence: `README.md`)
- Examination workflow → Corrections: orders corrections (evidence: `README.md`)
- Corrections → Completion and archive: enables completion (evidence: `README.md`)
- Staff assignments → Examination workflow: assigns examiners (evidence: `README.md`)
