# dexode-03/capstone-faculty-eval-system architecture

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

- Interactive diagram: https://gitdiagram.com/dexode-03/capstone-faculty-eval-system
- Repository: https://github.com/dexode-03/capstone-faculty-eval-system

## Overview

FEFAS is a faculty evaluation and feedback system. Students sign in, find instructors, submit rated and written evaluations, and later review their submissions; faculty and administrators view reports and dashboard summaries, while administrators manage accounts and system-wide evaluation data. The backend routes role-protected requests to controllers, which apply domain logic and use MySQL-backed models; evaluation analysis also uses privacy and sentiment utilities. The README is empty, so capability coverage is based on the source index and excerpts; several page and route implementations were not sampled.

Main entry points: [`backend/controllers/evaluationController.js`](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/controllers/evaluationController.js) (Evaluation workflows), [`frontend/src/App.jsx`](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/App.jsx) (Route and page shell), [`backend/config/db.js`](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/config/db.js) (MySQL database), [`backend/controllers/authController.js`](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/controllers/authController.js) (Account workflows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_webapp["Route and page shell<br/>[App.jsx]"]
  node_authstate["Auth context<br/>[AuthContext.jsx]"]
  node_authhook["Auth hook<br/>[useAuth.js]"]
  node_evaluationform["Evaluation form<br/>[EvaluationForm.jsx]"]
  node_dashboardpage["Dashboard views<br/>[Dashboard.jsx]"]
  node_reportpages["Reports<br/>[Reports.jsx]"]
  node_accountpages["Account management<br/>[AdminAccounts.jsx]"]
  node_apiservice["HTTP API client<br/>[api.js]"]
end

subgraph group_identity["Identity and accounts"]
  node_authservice["Auth service<br/>[authService.js]"]
  node_authroutes["Auth routes<br/>[authRoutes.js]"]
  node_authmiddleware["JWT and role checks<br/>[auth.js]"]
  node_authcontroller["Account workflows<br/>[authController.js]"]
  node_email["Email delivery<br/>[email.js]"]
end

subgraph group_evaluation["Evaluation and insights"]
  node_evaluationservice["Evaluation service"]
  node_dashboardservice["Dashboard service"]
  node_evaluationroutes["Evaluation routes"]
  node_evaluationcontroller["Evaluation workflows"]
  node_dashboardcontroller["Dashboard aggregation"]
  node_sentiment["Sentiment analysis"]
  node_privacy["Feedback privacy<br/>[privacy.js]"]
end

subgraph group_data["Backend data"]
  node_mysql[("MySQL database<br/>[db.js]")]
  node_evaluationmodel["Evaluation records<br/>[Evaluation.js]"]
  node_responsemodel["Question responses"]
  node_questionmodel["Evaluation questions"]
  node_facultymodel["Faculty records<br/>[Faculty.js]"]
  node_studentmodel["Student records<br/>[Student.js]"]
  node_usermodel["User records<br/>[User.js]"]
  node_subjectmodel["Subjects<br/>[Subject.js]"]
end

node_users(("Students, faculty, admins"))

node_users -->|"use"| node_webapp
node_webapp -->|"provides auth"| node_authstate
node_webapp -->|"routes to"| node_evaluationform
node_webapp -->|"routes to"| node_dashboardpage
node_webapp -->|"routes to"| node_reportpages
node_webapp -->|"routes to"| node_accountpages
node_authstate -->|"calls"| node_authservice
node_authhook -->|"reads"| node_authstate
node_evaluationform -->|"reads user"| node_authhook
node_evaluationform -->|"requests evaluation"| node_evaluationservice
node_dashboardpage -->|"reads user"| node_authhook
node_dashboardpage -->|"requests stats"| node_dashboardservice
node_dashboardpage -->|"requests evaluations"| node_evaluationservice
node_reportpages -->|"requests reports"| node_evaluationservice
node_authservice -->|"uses"| node_apiservice
node_evaluationservice -->|"uses"| node_apiservice
node_authroutes -->|"applies"| node_authmiddleware
node_authroutes -->|"dispatches"| node_authcontroller
node_authcontroller -->|"reads and updates"| node_usermodel
node_authcontroller -->|"assigns subjects"| node_facultymodel
node_authcontroller -->|"assigns subjects"| node_studentmodel
node_authcontroller -->|"sends messages"| node_email
node_evaluationroutes -->|"applies"| node_authmiddleware
node_evaluationroutes -->|"dispatches"| node_evaluationcontroller
node_evaluationcontroller -->|"creates and reads"| node_evaluationmodel
node_evaluationcontroller -->|"stores responses"| node_responsemodel
node_evaluationcontroller -->|"loads questions"| node_questionmodel
node_evaluationcontroller -->|"looks up faculty"| node_facultymodel
node_evaluationcontroller -->|"loads student"| node_studentmodel
node_evaluationcontroller -->|"analyzes feedback"| node_sentiment
node_evaluationcontroller -->|"protects identity"| node_privacy
node_dashboardcontroller -->|"aggregates evaluations"| node_evaluationmodel
node_dashboardcontroller -->|"counts faculty"| node_facultymodel
node_dashboardcontroller -->|"counts students"| node_studentmodel
node_evaluationmodel -->|"queries"| node_mysql
node_responsemodel -->|"queries"| node_mysql
node_questionmodel -->|"queries"| node_mysql
node_facultymodel -->|"queries"| node_mysql
node_studentmodel -->|"queries"| node_mysql
node_usermodel -->|"queries"| node_mysql
node_subjectmodel -->|"queries"| node_mysql

click node_webapp "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/App.jsx"
click node_authstate "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/context/AuthContext.jsx"
click node_authhook "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/hooks/useAuth.js"
click node_evaluationform "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/pages/EvaluationForm.jsx"
click node_dashboardpage "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/pages/Dashboard.jsx"
click node_reportpages "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/pages/Reports.jsx"
click node_accountpages "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/pages/AdminAccounts.jsx"
click node_apiservice "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/services/api.js"
click node_authservice "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/services/authService.js"
click node_authroutes "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/routes/authRoutes.js"
click node_authmiddleware "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/middleware/auth.js"
click node_authcontroller "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/controllers/authController.js"
click node_email "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/config/email.js"
click node_evaluationservice "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/services/evaluationService.js"
click node_dashboardservice "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/services/dashboardService.js"
click node_evaluationroutes "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/routes/evaluationRoutes.js"
click node_evaluationcontroller "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/controllers/evaluationController.js"
click node_dashboardcontroller "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/controllers/dashboardController.js"
click node_sentiment "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/utils/sentimentAnalyzer.js"
click node_privacy "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/utils/privacy.js"
click node_mysql "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/config/db.js"
click node_evaluationmodel "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/models/Evaluation.js"
click node_responsemodel "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/models/EvaluationResponse.js"
click node_questionmodel "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/models/EvaluationQuestion.js"
click node_facultymodel "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/models/Faculty.js"
click node_studentmodel "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/models/Student.js"
click node_usermodel "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/models/User.js"
click node_subjectmodel "https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/models/Subject.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_authstate,node_authhook,node_evaluationform,node_dashboardpage,node_reportpages,node_accountpages,node_apiservice toneBlue
class node_authservice,node_authroutes,node_authmiddleware,node_authcontroller,node_email toneAmber
class node_evaluationservice,node_dashboardservice,node_evaluationroutes,node_evaluationcontroller,node_dashboardcontroller,node_sentiment,node_privacy toneMint
class node_mysql,node_evaluationmodel,node_responsemodel,node_questionmodel,node_facultymodel,node_studentmodel,node_usermodel,node_subjectmodel toneRose
class node_users toneIndigo
```

## Components

### Web application

- [Route and page shell](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth context](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Auth hook](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/hooks/useAuth.js): `frontend/src/hooks/useAuth.js`
- [Evaluation form](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/pages/EvaluationForm.jsx): `frontend/src/pages/EvaluationForm.jsx`
- [Dashboard views](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Reports](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/pages/Reports.jsx): `frontend/src/pages/Reports.jsx`
- [Account management](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/pages/AdminAccounts.jsx): `frontend/src/pages/AdminAccounts.jsx`
- [HTTP API client](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Identity and accounts

- [Auth service](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/services/authService.js): `frontend/src/services/authService.js`
- [Auth routes](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [JWT and role checks](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/middleware/auth.js): `backend/middleware/auth.js`
- [Account workflows](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Email delivery](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/config/email.js): `backend/config/email.js`

### Evaluation and insights

- [Evaluation service](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/services/evaluationService.js): `frontend/src/services/evaluationService.js`
- [Dashboard service](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/frontend/src/services/dashboardService.js): `frontend/src/services/dashboardService.js`
- [Evaluation routes](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/routes/evaluationRoutes.js): `backend/routes/evaluationRoutes.js`
- [Evaluation workflows](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/controllers/evaluationController.js): `backend/controllers/evaluationController.js`
- [Dashboard aggregation](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/controllers/dashboardController.js): `backend/controllers/dashboardController.js`
- [Sentiment analysis](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/utils/sentimentAnalyzer.js): `backend/utils/sentimentAnalyzer.js`
- [Feedback privacy](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/utils/privacy.js): `backend/utils/privacy.js`

### Backend data

- [MySQL database](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/config/db.js): `backend/config/db.js`
- [Evaluation records](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/models/Evaluation.js): `backend/models/Evaluation.js`
- [Question responses](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/models/EvaluationResponse.js): `backend/models/EvaluationResponse.js`
- [Evaluation questions](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/models/EvaluationQuestion.js): `backend/models/EvaluationQuestion.js`
- [Faculty records](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/models/Faculty.js): `backend/models/Faculty.js`
- [Student records](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/models/Student.js): `backend/models/Student.js`
- [User records](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/models/User.js): `backend/models/User.js`
- [Subjects](https://github.com/dexode-03/capstone-faculty-eval-system/blob/main/backend/models/Subject.js): `backend/models/Subject.js`

### Other components

- **Students, faculty, admins**

## Connections

- Students, faculty, admins → Route and page shell: use (evidence: `frontend/src/App.jsx`)
- Route and page shell → Auth context: provides auth (evidence: `frontend/src/App.jsx`)
- Route and page shell → Evaluation form: routes to (evidence: `frontend/src/App.jsx`)
- Route and page shell → Dashboard views: routes to (evidence: `frontend/src/App.jsx`)
- Route and page shell → Reports: routes to (evidence: `frontend/src/App.jsx`)
- Route and page shell → Account management: routes to (evidence: `frontend/src/App.jsx`)
- Auth context → Auth service: calls (evidence: `frontend/src/context/AuthContext.jsx`)
- Auth hook → Auth context: reads (evidence: `frontend/src/hooks/useAuth.js`)
- Evaluation form → Auth hook: reads user (evidence: `frontend/src/pages/EvaluationForm.jsx`)
- Evaluation form → Evaluation service: requests evaluation (evidence: `frontend/src/pages/EvaluationForm.jsx`)
- Dashboard views → Auth hook: reads user (evidence: `frontend/src/pages/Dashboard.jsx`)
- Dashboard views → Dashboard service: requests stats (evidence: `frontend/src/pages/Dashboard.jsx`)
- Dashboard views → Evaluation service: requests evaluations (evidence: `frontend/src/pages/Dashboard.jsx`)
- Reports → Evaluation service: requests reports (evidence: `frontend/src/pages/Reports.jsx`)
- Auth service → HTTP API client: uses (evidence: `frontend/src/services/authService.js`)
- Evaluation service → HTTP API client: uses (evidence: `frontend/src/services/evaluationService.js`)
- Auth routes → JWT and role checks: applies (evidence: `backend/routes/authRoutes.js`)
- Auth routes → Account workflows: dispatches (evidence: `backend/routes/authRoutes.js`)
- Account workflows → User records: reads and updates (evidence: `backend/controllers/authController.js`)
- Account workflows → Faculty records: assigns subjects (evidence: `backend/controllers/authController.js`)
- Account workflows → Student records: assigns subjects (evidence: `backend/controllers/authController.js`)
- Account workflows → Email delivery: sends messages (evidence: `backend/controllers/authController.js`)
- Evaluation routes → JWT and role checks: applies (evidence: `backend/routes/evaluationRoutes.js`)
- Evaluation routes → Evaluation workflows: dispatches (evidence: `backend/routes/evaluationRoutes.js`)
- Evaluation workflows → Evaluation records: creates and reads (evidence: `backend/controllers/evaluationController.js`)
- Evaluation workflows → Question responses: stores responses (evidence: `backend/controllers/evaluationController.js`)
- Evaluation workflows → Evaluation questions: loads questions (evidence: `backend/controllers/evaluationController.js`)
- Evaluation workflows → Faculty records: looks up faculty (evidence: `backend/controllers/evaluationController.js`)
- Evaluation workflows → Student records: loads student (evidence: `backend/controllers/evaluationController.js`)
- Evaluation workflows → Sentiment analysis: analyzes feedback (evidence: `backend/controllers/evaluationController.js`)
- Evaluation workflows → Feedback privacy: protects identity (evidence: `backend/controllers/evaluationController.js`)
- Dashboard aggregation → Evaluation records: aggregates evaluations (evidence: `backend/controllers/dashboardController.js`)
- Dashboard aggregation → Faculty records: counts faculty (evidence: `backend/controllers/dashboardController.js`)
- Dashboard aggregation → Student records: counts students (evidence: `backend/controllers/dashboardController.js`)
- Evaluation records → MySQL database: queries (evidence: `backend/models/Evaluation.js`)
- Question responses → MySQL database: queries (evidence: `backend/models/EvaluationResponse.js`)
- Evaluation questions → MySQL database: queries (evidence: `backend/models/EvaluationQuestion.js`)
- Faculty records → MySQL database: queries (evidence: `backend/models/Faculty.js`)
- Student records → MySQL database: queries (evidence: `backend/models/Student.js`)
- User records → MySQL database: queries (evidence: `backend/models/User.js`)
- Subjects → MySQL database: queries (evidence: `backend/models/Subject.js`)
