# chathurdha2024/results-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/chathurdha2024/results-management-system
- Repository: https://github.com/chathurdha2024/results-management-system

## Overview

Ruhuna EngRMS is a results-management product for engineering students, examiners, and administrators. The principal workflow is administrators managing academic records and uploading results, examiners supporting result review, and students viewing published results and GPA through web or mobile. The backend exposes authenticated role-specific APIs and persists academic data through Prisma/PostgreSQL. The README documents notifications and real-time capability, while the sampled sources show student notification endpoints but not WebSocket wiring. Several frontend implementations were not sampled, so those documented connections are shown as unverified.

Main entry points: [`backend/src/lib/prisma.js`](https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/lib/prisma.js) (Prisma client), [`backend/src/server.js`](https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/server.js) (API server), [`backend/src/routes/adminRoutes.js`](https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/routes/adminRoutes.js) (Admin API), [`student-mobile/src/api.js`](https://github.com/chathurdha2024/results-management-system/blob/main/student-mobile/src/api.js) (Mobile API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_backend["API and persistence"]
  node_api_server["API server<br/>[server.js]"]
  node_auth_routes["Authentication<br/>[authRoutes.js]"]
  node_admin_routes["Admin API<br/>[adminRoutes.js]"]
  node_examiner_routes["Examiner API<br/>[examinerRoutes.js]"]
  node_student_routes["Student API<br/>[studentRoutes.js]"]
  node_prisma["Prisma client<br/>[prisma.js]"]
  node_database[("PostgreSQL")]
end

subgraph group_admin["Administration"]
  node_admin_portal["Admin portal<br/>[App.jsx]"]
  node_admin_login["Admin login<br/>[Login.jsx]"]
  node_admin_dashboard["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_admin_results["Result operations"]
  node_admin_records["Academic management"]
  node_examiner_workspace["Examiner workspace"]
end

subgraph group_studentweb["Student web"]
  node_student_web["Student web app<br/>[App.jsx]"]
  node_student_web_login["Student login<br/>[Login.jsx]"]
  node_student_web_dashboard["Results dashboard"]
  node_student_profile["Student profile<br/>[ProfileView.jsx]"]
end

subgraph group_mobile["Student mobile"]
  node_mobile_app["Mobile app<br/>[App.js]"]
  node_mobile_login["Mobile login<br/>[LoginScreen.js]"]
  node_mobile_dashboard["Mobile dashboard<br/>[DashboardScreen.js]"]
  node_mobile_profile["Mobile profile<br/>[ProfileView.js]"]
  node_mobile_api["Mobile API client<br/>[api.js]"]
end

node_admin_actor(("Administrator"))
node_examiner_actor(("Examiner"))
node_student_actor(("Student"))

node_api_server -->|"registers"| node_auth_routes
node_api_server -->|"registers"| node_admin_routes
node_api_server -->|"registers"| node_student_routes
node_api_server -->|"registers"| node_examiner_routes
node_api_server -->|"seeds via"| node_prisma
node_admin_routes -->|"reads/writes"| node_prisma
node_student_routes -->|"reads/writes"| node_prisma
node_auth_routes -->|"uses"| node_prisma
node_examiner_routes -->|"uses"| node_prisma
node_prisma -->|"connects"| node_database
node_admin_actor -.->|"uses"| node_admin_portal
node_examiner_actor -.->|"uses"| node_examiner_workspace
node_admin_portal -->|"routes to"| node_admin_login
node_admin_portal -->|"routes to"| node_admin_dashboard
node_admin_dashboard -->|"renders"| node_admin_records
node_admin_dashboard -->|"renders"| node_admin_results
node_admin_dashboard -.->|"supports"| node_examiner_workspace
node_admin_portal -.->|"authenticates via"| node_auth_routes
node_admin_records -.->|"manages records via"| node_admin_routes
node_admin_results -.->|"uploads results via"| node_admin_routes
node_examiner_workspace -.->|"uses"| node_examiner_routes
node_admin_routes -.->|"publishes results for"| node_student_routes
node_student_actor -.->|"uses"| node_student_web
node_student_web -->|"routes to"| node_student_web_login
node_student_web -->|"routes to"| node_student_web_dashboard
node_student_web_dashboard -->|"renders"| node_student_profile
node_student_web -.->|"requests results"| node_student_routes
node_student_actor -.->|"uses"| node_mobile_app
node_mobile_app -->|"navigates to"| node_mobile_login
node_mobile_app -->|"navigates to"| node_mobile_dashboard
node_mobile_login -->|"calls"| node_mobile_api
node_mobile_dashboard -->|"loads data via"| node_mobile_api
node_mobile_profile -->|"updates profile via"| node_mobile_api
node_mobile_dashboard -->|"renders"| node_mobile_profile
node_mobile_api -->|"sends login requests"| node_auth_routes
node_mobile_api -->|"requests student data"| node_student_routes

click node_api_server "https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/server.js"
click node_auth_routes "https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/routes/authRoutes.js"
click node_admin_routes "https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/routes/adminRoutes.js"
click node_examiner_routes "https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/routes/examinerRoutes.js"
click node_student_routes "https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/routes/studentRoutes.js"
click node_prisma "https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/lib/prisma.js"
click node_admin_portal "https://github.com/chathurdha2024/results-management-system/blob/main/frontend/src/App.jsx"
click node_admin_login "https://github.com/chathurdha2024/results-management-system/blob/main/frontend/src/pages/Login.jsx"
click node_admin_dashboard "https://github.com/chathurdha2024/results-management-system/blob/main/frontend/src/pages/admin/AdminDashboard.jsx"
click node_admin_results "https://github.com/chathurdha2024/results-management-system/blob/main/frontend/src/components/ResultUploadModal.jsx"
click node_admin_records "https://github.com/chathurdha2024/results-management-system/blob/main/frontend/src/components/ModuleManagement.jsx"
click node_examiner_workspace "https://github.com/chathurdha2024/results-management-system/blob/main/frontend/src/pages/examiner/ExaminerDashboard.jsx"
click node_student_web "https://github.com/chathurdha2024/results-management-system/blob/main/student-frontend/src/App.jsx"
click node_student_web_login "https://github.com/chathurdha2024/results-management-system/blob/main/student-frontend/src/pages/Login.jsx"
click node_student_web_dashboard "https://github.com/chathurdha2024/results-management-system/blob/main/student-frontend/src/pages/student/StudentDashboard.jsx"
click node_student_profile "https://github.com/chathurdha2024/results-management-system/blob/main/student-frontend/src/pages/student/ProfileView.jsx"
click node_mobile_app "https://github.com/chathurdha2024/results-management-system/blob/main/student-mobile/App.js"
click node_mobile_login "https://github.com/chathurdha2024/results-management-system/blob/main/student-mobile/src/screens/LoginScreen.js"
click node_mobile_dashboard "https://github.com/chathurdha2024/results-management-system/blob/main/student-mobile/src/screens/DashboardScreen.js"
click node_mobile_profile "https://github.com/chathurdha2024/results-management-system/blob/main/student-mobile/src/components/ProfileView.js"
click node_mobile_api "https://github.com/chathurdha2024/results-management-system/blob/main/student-mobile/src/api.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_api_server,node_auth_routes,node_admin_routes,node_examiner_routes,node_student_routes,node_prisma,node_database toneBlue
class node_admin_portal,node_admin_login,node_admin_dashboard,node_admin_results,node_admin_records,node_examiner_workspace toneAmber
class node_student_web,node_student_web_login,node_student_web_dashboard,node_student_profile toneMint
class node_mobile_app,node_mobile_login,node_mobile_dashboard,node_mobile_profile,node_mobile_api toneRose
class node_admin_actor,node_examiner_actor,node_student_actor toneIndigo
```

## Components

### API and persistence

- [API server](https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/server.js): `backend/src/server.js`
- [Authentication](https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/routes/authRoutes.js): `backend/src/routes/authRoutes.js`
- [Admin API](https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/routes/adminRoutes.js): `backend/src/routes/adminRoutes.js`
- [Examiner API](https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/routes/examinerRoutes.js): `backend/src/routes/examinerRoutes.js`
- [Student API](https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/routes/studentRoutes.js): `backend/src/routes/studentRoutes.js`
- [Prisma client](https://github.com/chathurdha2024/results-management-system/blob/main/backend/src/lib/prisma.js): `backend/src/lib/prisma.js`
- **PostgreSQL**

### Administration

- [Admin portal](https://github.com/chathurdha2024/results-management-system/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Admin login](https://github.com/chathurdha2024/results-management-system/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Admin dashboard](https://github.com/chathurdha2024/results-management-system/blob/main/frontend/src/pages/admin/AdminDashboard.jsx): `frontend/src/pages/admin/AdminDashboard.jsx`
- [Result operations](https://github.com/chathurdha2024/results-management-system/blob/main/frontend/src/components/ResultUploadModal.jsx): `frontend/src/components/ResultUploadModal.jsx`
- [Academic management](https://github.com/chathurdha2024/results-management-system/blob/main/frontend/src/components/ModuleManagement.jsx): `frontend/src/components/ModuleManagement.jsx`
- [Examiner workspace](https://github.com/chathurdha2024/results-management-system/blob/main/frontend/src/pages/examiner/ExaminerDashboard.jsx): `frontend/src/pages/examiner/ExaminerDashboard.jsx`

### Student web

- [Student web app](https://github.com/chathurdha2024/results-management-system/blob/main/student-frontend/src/App.jsx): `student-frontend/src/App.jsx`
- [Student login](https://github.com/chathurdha2024/results-management-system/blob/main/student-frontend/src/pages/Login.jsx): `student-frontend/src/pages/Login.jsx`
- [Results dashboard](https://github.com/chathurdha2024/results-management-system/blob/main/student-frontend/src/pages/student/StudentDashboard.jsx): `student-frontend/src/pages/student/StudentDashboard.jsx`
- [Student profile](https://github.com/chathurdha2024/results-management-system/blob/main/student-frontend/src/pages/student/ProfileView.jsx): `student-frontend/src/pages/student/ProfileView.jsx`

### Student mobile

- [Mobile app](https://github.com/chathurdha2024/results-management-system/blob/main/student-mobile/App.js): `student-mobile/App.js`
- [Mobile login](https://github.com/chathurdha2024/results-management-system/blob/main/student-mobile/src/screens/LoginScreen.js): `student-mobile/src/screens/LoginScreen.js`
- [Mobile dashboard](https://github.com/chathurdha2024/results-management-system/blob/main/student-mobile/src/screens/DashboardScreen.js): `student-mobile/src/screens/DashboardScreen.js`
- [Mobile profile](https://github.com/chathurdha2024/results-management-system/blob/main/student-mobile/src/components/ProfileView.js): `student-mobile/src/components/ProfileView.js`
- [Mobile API client](https://github.com/chathurdha2024/results-management-system/blob/main/student-mobile/src/api.js): `student-mobile/src/api.js`

### Other components

- **Administrator**
- **Examiner**
- **Student**

## Connections

- API server → Authentication: registers (evidence: `backend/src/server.js`)
- API server → Admin API: registers (evidence: `backend/src/server.js`)
- API server → Student API: registers (evidence: `backend/src/server.js`)
- API server → Examiner API: registers (evidence: `backend/src/server.js`)
- API server → Prisma client: seeds via (evidence: `backend/src/server.js`)
- Admin API → Prisma client: reads/writes (evidence: `backend/src/routes/adminRoutes.js`)
- Student API → Prisma client: reads/writes (evidence: `backend/src/routes/studentRoutes.js`)
- Authentication → Prisma client: uses (evidence: `backend/src/routes/authRoutes.js`)
- Examiner API → Prisma client: uses (evidence: `backend/src/routes/examinerRoutes.js`)
- Prisma client → PostgreSQL: connects (evidence: `backend/src/lib/prisma.js`)
- Administrator → Admin portal: uses
- Examiner → Examiner workspace: uses
- Admin portal → Admin login: routes to (evidence: `frontend/src/App.jsx`)
- Admin portal → Admin dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Admin dashboard → Academic management: renders (evidence: `frontend/src/pages/admin/AdminDashboard.jsx`)
- Admin dashboard → Result operations: renders (evidence: `frontend/src/pages/admin/AdminDashboard.jsx`)
- Admin dashboard → Examiner workspace: supports
- Admin portal → Authentication: authenticates via
- Academic management → Admin API: manages records via
- Result operations → Admin API: uploads results via
- Examiner workspace → Examiner API: uses
- Admin API → Student API: publishes results for
- Student → Student web app: uses
- Student web app → Student login: routes to (evidence: `student-frontend/src/App.jsx`)
- Student web app → Results dashboard: routes to (evidence: `student-frontend/src/App.jsx`)
- Results dashboard → Student profile: renders (evidence: `student-frontend/src/pages/student/StudentDashboard.jsx`)
- Student web app → Student API: requests results
- Student → Mobile app: uses
- Mobile app → Mobile login: navigates to (evidence: `student-mobile/App.js`)
- Mobile app → Mobile dashboard: navigates to (evidence: `student-mobile/App.js`)
- Mobile login → Mobile API client: calls (evidence: `student-mobile/src/screens/LoginScreen.js`)
- Mobile dashboard → Mobile API client: loads data via (evidence: `student-mobile/src/screens/DashboardScreen.js`)
- Mobile profile → Mobile API client: updates profile via (evidence: `student-mobile/src/components/ProfileView.js`)
- Mobile dashboard → Mobile profile: renders (evidence: `student-mobile/src/screens/DashboardScreen.js`)
- Mobile API client → Authentication: sends login requests (evidence: `student-mobile/src/api.js`)
- Mobile API client → Student API: requests student data (evidence: `student-mobile/src/api.js`)
