# srmistphdapp/srmtrp architecture

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

- Interactive diagram: https://gitdiagram.com/srmistphdapp/srmtrp
- Repository: https://github.com/srmistphdapp/srmtrp

## Overview

This is a multi-campus PhD management web application with login and separate director, administrator, department, and FOET portals. The main workflow moves scholar applications through department review and faculty-level forwarding, then supports examinations, interviews, question papers, results, and queries. Shared services and Supabase provide data access across the portals. The README gives no capability detail; portal capabilities are inferred from the source tree and the sampled router/component references, so unsampled internal links are omitted.

Main entry points: [`src/apps/department/App.js`](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/App.js) (Department portal), [`src/apps/department/services/departmentScholarService.js`](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/services/departmentScholarService.js) (Department review service), [`src/App.js`](https://github.com/srmistphdapp/srmtrp/blob/main/src/App.js) (Application router), [`src/supabaseClient.js`](https://github.com/srmistphdapp/srmtrp/blob/main/src/supabaseClient.js) (Campus client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and identity"]
  node_router["Application router<br/>[App.js]"]
  node_login["Login pages<br/>[App.js]"]
end

subgraph group_oversight["Central administration"]
  node_admin["Admin portal<br/>[QueryScholars.js]"]
  node_director["Director portal<br/>[DirectorPortal.js]"]
  node_director_stages["Oversight workflows<br/>[Examination.js]"]
  node_director_scholars["Scholar oversight"]
end

subgraph group_department["Department review"]
  node_department_app["Department portal<br/>[App.js]"]
  node_department_context["Department context<br/>[AppContext.js]"]
  node_applications["Scholar applications"]
  node_review["Department decisions"]
  node_meetings["Interviews and meetings<br/>[Interview.js]"]
  node_queries["Queries and results<br/>[QueriesPage.js]"]
  node_department_papers["Question papers<br/>[QuestionPapers.js]"]
end

subgraph group_faculty["Faculty operations"]
  node_foet_app["FOET portal<br/>[App.js]"]
  node_foet_forward["Scholar forwarding<br/>[QueryScholar.js]"]
  node_foet_services["Faculty data service<br/>[supabaseService.js]"]
end

subgraph group_data["Shared data layer"]
  node_shared_scholars["Scholar data service<br/>[scholarService.js]"]
  node_shared_departments["Department data service"]
  node_department_scholars["Department review service"]
  node_department_helpers["Department matching<br/>[departmentUtils.js]"]
  node_supabase_client["Campus client<br/>[supabaseClient.js]"]
end

node_users(("Portal users"))
node_supabase[("Supabase")]

node_users -->|"opens"| node_router
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_admin
node_router -->|"routes to"| node_director
node_router -->|"routes to"| node_department_app
node_router -->|"routes to"| node_foet_app
node_director -->|"renders"| node_director_stages
node_director -->|"renders"| node_director_scholars
node_admin -->|"reads and updates"| node_shared_scholars
node_admin -->|"loads departments"| node_shared_departments
node_department_app -->|"provides context"| node_department_context
node_department_app -->|"renders"| node_applications
node_department_app -->|"renders"| node_review
node_department_app -->|"renders"| node_meetings
node_department_app -->|"renders"| node_queries
node_department_app -->|"renders"| node_department_papers
node_department_context -->|"loads and approves"| node_department_scholars
node_applications -->|"uses"| node_department_scholars
node_review -->|"uses"| node_department_scholars
node_meetings -->|"uses"| node_department_scholars
node_queries -->|"uses"| node_department_scholars
node_department_papers -->|"reads and writes"| node_supabase
node_foet_app -->|"loads faculty data"| node_foet_services
node_foet_app -->|"routes feature"| node_foet_forward
node_foet_forward -->|"updates forwarding"| node_foet_services
node_foet_services -->|"uses"| node_supabase_client
node_shared_scholars -->|"queries"| node_supabase_client
node_shared_scholars -->|"normalizes names"| node_department_helpers
node_shared_departments -->|"queries"| node_supabase_client
node_department_scholars -->|"updates reviews"| node_supabase_client
node_department_scholars -->|"generates codes"| node_department_helpers
node_supabase_client -->|"connects to"| node_supabase

click node_router "https://github.com/srmistphdapp/srmtrp/blob/main/src/App.js"
click node_login "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/login/App.js"
click node_admin "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/admin/admin-portal/components/QueryScholars.js"
click node_director "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/director/director-portal/DirectorPortal.js"
click node_director_stages "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/director/director-portal/components/Examination.js"
click node_director_scholars "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/director/director-portal/components/ScholarManagement.js"
click node_department_app "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/App.js"
click node_department_context "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/contexts/AppContext.js"
click node_applications "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/components/ScholarApplications.js"
click node_review "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/components/ApprovedScholars.js"
click node_meetings "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/components/Interview.js"
click node_queries "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/components/QueriesPage.js"
click node_department_papers "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/components/QuestionPapers.js"
click node_foet_app "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/foet/App.js"
click node_foet_forward "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/foet/components/QueryScholar.js"
click node_foet_services "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/foet/services/supabaseService.js"
click node_shared_scholars "https://github.com/srmistphdapp/srmtrp/blob/main/src/services/scholarService.js"
click node_shared_departments "https://github.com/srmistphdapp/srmtrp/blob/main/src/services/departmentService.js"
click node_department_scholars "https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/services/departmentScholarService.js"
click node_department_helpers "https://github.com/srmistphdapp/srmtrp/blob/main/src/utils/departmentUtils.js"
click node_supabase_client "https://github.com/srmistphdapp/srmtrp/blob/main/src/supabaseClient.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_router,node_login,node_users toneBlue
class node_admin,node_director,node_director_stages,node_director_scholars,node_supabase toneAmber
class node_department_app,node_department_context,node_applications,node_review,node_meetings,node_queries,node_department_papers toneMint
class node_foet_app,node_foet_forward,node_foet_services toneRose
class node_shared_scholars,node_shared_departments,node_department_scholars,node_department_helpers,node_supabase_client toneIndigo
```

## Components

### Entry and identity

- [Application router](https://github.com/srmistphdapp/srmtrp/blob/main/src/App.js): `src/App.js`
- [Login pages](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/login/App.js): `src/apps/login/App.js`

### Central administration

- [Admin portal](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/admin/admin-portal/components/QueryScholars.js): `src/apps/admin/admin-portal/components/QueryScholars.js`
- [Director portal](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/director/director-portal/DirectorPortal.js): `src/apps/director/director-portal/DirectorPortal.js`
- [Oversight workflows](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/director/director-portal/components/Examination.js): `src/apps/director/director-portal/components/Examination.js`
- [Scholar oversight](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/director/director-portal/components/ScholarManagement.js): `src/apps/director/director-portal/components/ScholarManagement.js`

### Department review

- [Department portal](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/App.js): `src/apps/department/App.js`
- [Department context](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/contexts/AppContext.js): `src/apps/department/contexts/AppContext.js`
- [Scholar applications](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/components/ScholarApplications.js): `src/apps/department/components/ScholarApplications.js`
- [Department decisions](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/components/ApprovedScholars.js): `src/apps/department/components/ApprovedScholars.js`
- [Interviews and meetings](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/components/Interview.js): `src/apps/department/components/Interview.js`
- [Queries and results](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/components/QueriesPage.js): `src/apps/department/components/QueriesPage.js`
- [Question papers](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/components/QuestionPapers.js): `src/apps/department/components/QuestionPapers.js`

### Faculty operations

- [FOET portal](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/foet/App.js): `src/apps/foet/App.js`
- [Scholar forwarding](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/foet/components/QueryScholar.js): `src/apps/foet/components/QueryScholar.js`
- [Faculty data service](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/foet/services/supabaseService.js): `src/apps/foet/services/supabaseService.js`

### Shared data layer

- [Scholar data service](https://github.com/srmistphdapp/srmtrp/blob/main/src/services/scholarService.js): `src/services/scholarService.js`
- [Department data service](https://github.com/srmistphdapp/srmtrp/blob/main/src/services/departmentService.js): `src/services/departmentService.js`
- [Department review service](https://github.com/srmistphdapp/srmtrp/blob/main/src/apps/department/services/departmentScholarService.js): `src/apps/department/services/departmentScholarService.js`
- [Department matching](https://github.com/srmistphdapp/srmtrp/blob/main/src/utils/departmentUtils.js): `src/utils/departmentUtils.js`
- [Campus client](https://github.com/srmistphdapp/srmtrp/blob/main/src/supabaseClient.js): `src/supabaseClient.js`

### Other components

- **Portal users**
- **Supabase**

## Connections

- Portal users → Application router: opens (evidence: `src/App.js`)
- Application router → Login pages: routes to (evidence: `src/App.js`)
- Application router → Admin portal: routes to (evidence: `src/App.js`)
- Application router → Director portal: routes to (evidence: `src/App.js`)
- Application router → Department portal: routes to (evidence: `src/App.js`)
- Application router → FOET portal: routes to (evidence: `src/App.js`)
- Director portal → Oversight workflows: renders (evidence: `src/apps/director/director-portal/DirectorPortal.js`)
- Director portal → Scholar oversight: renders (evidence: `src/apps/director/director-portal/DirectorPortal.js`)
- Admin portal → Scholar data service: reads and updates (evidence: `src/apps/admin/admin-portal/components/QueryScholars.js`)
- Admin portal → Department data service: loads departments (evidence: `src/apps/admin/admin-portal/components/QueryScholars.js`)
- Department portal → Department context: provides context (evidence: `src/apps/department/App.js`)
- Department portal → Scholar applications: renders (evidence: `src/apps/department/App.js`)
- Department portal → Department decisions: renders (evidence: `src/apps/department/App.js`)
- Department portal → Interviews and meetings: renders (evidence: `src/apps/department/App.js`)
- Department portal → Queries and results: renders (evidence: `src/apps/department/App.js`)
- Department portal → Question papers: renders (evidence: `src/apps/department/App.js`)
- Department context → Department review service: loads and approves (evidence: `src/apps/department/contexts/AppContext.js`)
- Scholar applications → Department review service: uses (evidence: `src/apps/department/components/ScholarApplications.js`)
- Department decisions → Department review service: uses (evidence: `src/apps/department/components/ApprovedScholars.js`)
- Interviews and meetings → Department review service: uses (evidence: `src/apps/department/components/Interview.js`)
- Queries and results → Department review service: uses (evidence: `src/apps/department/components/QueriesPage.js`)
- Question papers → Supabase: reads and writes (evidence: `src/apps/department/components/QuestionPapers.js`)
- FOET portal → Faculty data service: loads faculty data (evidence: `src/apps/foet/App.js`)
- FOET portal → Scholar forwarding: routes feature (evidence: `src/apps/foet/App.js`)
- Scholar forwarding → Faculty data service: updates forwarding (evidence: `src/apps/foet/components/QueryScholar.js`)
- Faculty data service → Campus client: uses (evidence: `src/apps/foet/services/supabaseService.js`)
- Scholar data service → Campus client: queries (evidence: `src/services/scholarService.js`)
- Scholar data service → Department matching: normalizes names (evidence: `src/services/scholarService.js`)
- Department data service → Campus client: queries (evidence: `src/services/departmentService.js`)
- Department review service → Campus client: updates reviews (evidence: `src/apps/department/services/departmentScholarService.js`)
- Department review service → Department matching: generates codes (evidence: `src/apps/department/services/departmentScholarService.js`)
- Campus client → Supabase: connects to (evidence: `src/supabaseClient.js`)
