# vashista1947-dot/student-portal architecture

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

- Interactive diagram: https://gitdiagram.com/vashista1947-dot/student-portal
- Repository: https://github.com/vashista1947-dot/student-portal

## Overview

This is a Training & Placement portal for students and placement administrators. Students register or sign in, maintain a profile, browse placement events and apply; administrators manage companies, events, students and announcements, and dispatch applicant data or invitations. The graph separates the frontend, API and domain workflows, persistence, and email/scheduling services. Some capabilities are established by the API client and file tree, but their implementation was not sampled; those connections are omitted rather than inferred.

Main entry points: [`backend/server.js`](https://github.com/vashista1947-dot/student-portal/blob/main/backend/server.js) (API server and routes), [`backend/controllers/dispatchController.js`](https://github.com/vashista1947-dot/student-portal/blob/main/backend/controllers/dispatchController.js) (Dispatch and invitations), [`frontend/src/App.jsx`](https://github.com/vashista1947-dot/student-portal/blob/main/frontend/src/App.jsx) (Portal routes), [`frontend/src/services/api.js`](https://github.com/vashista1947-dot/student-portal/blob/main/frontend/src/services/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Portal interface"]
  node_app["Portal routes<br/>[App.jsx]"]
  node_authstate["Auth state<br/>[AuthContext.jsx]"]
  node_authpages["Sign-in and registration"]
  node_studentpages["Student portal pages"]
  node_adminpages["Admin portal pages"]
  node_api["API client<br/>[api.js]"]
end

subgraph group_identity["Identity and profiles"]
  node_authcontroller["Authentication<br/>[authController.js]"]
  node_authmiddleware["Token and role checks<br/>[auth.js]"]
  node_profilecontroller["Student profiles"]
end

subgraph group_placement["Placement workflows"]
  node_eventcontroller["Placement events<br/>[eventController.js]"]
  node_applicationcontroller["Event applications"]
end

subgraph group_administration["Administration and dispatch"]
  node_admincontroller["Admin and student controls<br/>[adminController.js]"]
  node_catalogcontrollers["Company and announcements"]
  node_dispatchcontroller["Dispatch and invitations"]
end

subgraph group_platform["Persistence and services"]
  node_server["API server and routes<br/>[server.js]"]
  node_user[("User accounts<br/>[User.js]")]
  node_profile[("Student records<br/>[StudentProfile.js]")]
  node_eventmodel[("Job events<br/>[JobEvent.js]")]
  node_applicationmodel[("Applications<br/>[Application.js]")]
  node_scheduledemails[("Scheduled email records<br/>[ScheduledEmail.js]")]
  node_excel["Applicant spreadsheet builder<br/>[excelBuilder.js]"]
  node_email["Email delivery<br/>[emailService.js]"]
  node_scheduler["Email scheduler<br/>[scheduler.js]"]
  node_company[("Company records<br/>[Company.js]")]
  node_mongo[("MongoDB<br/>[db.js]")]
end

node_student(("Student"))
node_admin(("Placement admin"))

node_student -->|"uses portal"| node_app
node_admin -->|"uses portal"| node_app
node_app -->|"routes to"| node_authpages
node_app -->|"routes to"| node_studentpages
node_app -->|"routes to"| node_adminpages
node_app -->|"reads auth"| node_authstate
node_authstate -->|"verifies session"| node_api
node_authpages -->|"calls endpoints"| node_api
node_studentpages -->|"calls endpoints"| node_api
node_adminpages -->|"calls endpoints"| node_api
node_api -->|"HTTP requests"| node_server
node_server -->|"routes auth"| node_authcontroller
node_server -->|"routes events"| node_eventcontroller
node_server -->|"routes student"| node_applicationcontroller
node_server -->|"routes dispatch"| node_dispatchcontroller
node_server -->|"routes admin"| node_admincontroller
node_server -->|"routes company and announcements"| node_catalogcontrollers
node_server -->|"starts scheduler"| node_scheduler
node_authcontroller -->|"reads and writes"| node_user
node_authcontroller -->|"sends OTP"| node_email
node_authmiddleware -->|"loads account"| node_user
node_profilecontroller -->|"reads and writes"| node_profile
node_admincontroller -->|"manages accounts"| node_user
node_admincontroller -->|"manages student records"| node_profile
node_eventcontroller -->|"reads and writes"| node_eventmodel
node_eventcontroller -->|"checks company"| node_company
node_eventcontroller -->|"reads registrations"| node_applicationmodel
node_applicationcontroller -->|"reads and writes"| node_applicationmodel
node_applicationcontroller -->|"loads student profile"| node_profile
node_applicationcontroller -->|"checks event"| node_eventmodel
node_dispatchcontroller -->|"finds applicants"| node_applicationmodel
node_dispatchcontroller -->|"finds event"| node_eventmodel
node_dispatchcontroller -->|"finds company"| node_company
node_dispatchcontroller -->|"builds spreadsheet"| node_excel
node_dispatchcontroller -->|"sends dispatch"| node_email
node_dispatchcontroller -->|"reads schedules"| node_scheduledemails
node_scheduler -->|"loads scheduled mail"| node_scheduledemails
node_scheduler -->|"sends scheduled mail"| node_email
node_server -->|"connects database"| node_mongo

click node_app "https://github.com/vashista1947-dot/student-portal/blob/main/frontend/src/App.jsx"
click node_authstate "https://github.com/vashista1947-dot/student-portal/blob/main/frontend/src/context/AuthContext.jsx"
click node_authpages "https://github.com/vashista1947-dot/student-portal/tree/main/frontend/src/pages/auth"
click node_studentpages "https://github.com/vashista1947-dot/student-portal/tree/main/frontend/src/pages/student"
click node_adminpages "https://github.com/vashista1947-dot/student-portal/tree/main/frontend/src/pages/admin"
click node_api "https://github.com/vashista1947-dot/student-portal/blob/main/frontend/src/services/api.js"
click node_server "https://github.com/vashista1947-dot/student-portal/blob/main/backend/server.js"
click node_authcontroller "https://github.com/vashista1947-dot/student-portal/blob/main/backend/controllers/authController.js"
click node_authmiddleware "https://github.com/vashista1947-dot/student-portal/blob/main/backend/middlewares/auth.js"
click node_profilecontroller "https://github.com/vashista1947-dot/student-portal/blob/main/backend/controllers/studentController.js"
click node_user "https://github.com/vashista1947-dot/student-portal/blob/main/backend/models/User.js"
click node_profile "https://github.com/vashista1947-dot/student-portal/blob/main/backend/models/StudentProfile.js"
click node_eventcontroller "https://github.com/vashista1947-dot/student-portal/blob/main/backend/controllers/eventController.js"
click node_applicationcontroller "https://github.com/vashista1947-dot/student-portal/blob/main/backend/controllers/applicationController.js"
click node_eventmodel "https://github.com/vashista1947-dot/student-portal/blob/main/backend/models/JobEvent.js"
click node_applicationmodel "https://github.com/vashista1947-dot/student-portal/blob/main/backend/models/Application.js"
click node_admincontroller "https://github.com/vashista1947-dot/student-portal/blob/main/backend/controllers/adminController.js"
click node_catalogcontrollers "https://github.com/vashista1947-dot/student-portal/tree/main/backend/controllers"
click node_dispatchcontroller "https://github.com/vashista1947-dot/student-portal/blob/main/backend/controllers/dispatchController.js"
click node_scheduledemails "https://github.com/vashista1947-dot/student-portal/blob/main/backend/models/ScheduledEmail.js"
click node_excel "https://github.com/vashista1947-dot/student-portal/blob/main/backend/utils/excelBuilder.js"
click node_email "https://github.com/vashista1947-dot/student-portal/blob/main/backend/utils/emailService.js"
click node_scheduler "https://github.com/vashista1947-dot/student-portal/blob/main/backend/utils/scheduler.js"
click node_company "https://github.com/vashista1947-dot/student-portal/blob/main/backend/models/Company.js"
click node_mongo "https://github.com/vashista1947-dot/student-portal/blob/main/backend/config/db.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_app,node_authstate,node_authpages,node_studentpages,node_adminpages,node_api toneBlue
class node_authcontroller,node_authmiddleware,node_profilecontroller toneAmber
class node_eventcontroller,node_applicationcontroller toneMint
class node_admincontroller,node_catalogcontrollers,node_dispatchcontroller toneRose
class node_server,node_user,node_profile,node_eventmodel,node_applicationmodel,node_scheduledemails,node_excel,node_email,node_scheduler,node_company,node_mongo,node_student,node_admin toneIndigo
```

## Components

### Portal interface

- [Portal routes](https://github.com/vashista1947-dot/student-portal/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth state](https://github.com/vashista1947-dot/student-portal/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Sign-in and registration](https://github.com/vashista1947-dot/student-portal/tree/main/frontend/src/pages/auth): `frontend/src/pages/auth`
- [Student portal pages](https://github.com/vashista1947-dot/student-portal/tree/main/frontend/src/pages/student): `frontend/src/pages/student`
- [Admin portal pages](https://github.com/vashista1947-dot/student-portal/tree/main/frontend/src/pages/admin): `frontend/src/pages/admin`
- [API client](https://github.com/vashista1947-dot/student-portal/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Identity and profiles

- [Authentication](https://github.com/vashista1947-dot/student-portal/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Token and role checks](https://github.com/vashista1947-dot/student-portal/blob/main/backend/middlewares/auth.js): `backend/middlewares/auth.js`
- [Student profiles](https://github.com/vashista1947-dot/student-portal/blob/main/backend/controllers/studentController.js): `backend/controllers/studentController.js`

### Placement workflows

- [Placement events](https://github.com/vashista1947-dot/student-portal/blob/main/backend/controllers/eventController.js): `backend/controllers/eventController.js`
- [Event applications](https://github.com/vashista1947-dot/student-portal/blob/main/backend/controllers/applicationController.js): `backend/controllers/applicationController.js`

### Administration and dispatch

- [Admin and student controls](https://github.com/vashista1947-dot/student-portal/blob/main/backend/controllers/adminController.js): `backend/controllers/adminController.js`
- [Company and announcements](https://github.com/vashista1947-dot/student-portal/tree/main/backend/controllers): `backend/controllers`
- [Dispatch and invitations](https://github.com/vashista1947-dot/student-portal/blob/main/backend/controllers/dispatchController.js): `backend/controllers/dispatchController.js`

### Persistence and services

- [API server and routes](https://github.com/vashista1947-dot/student-portal/blob/main/backend/server.js): `backend/server.js`
- [User accounts](https://github.com/vashista1947-dot/student-portal/blob/main/backend/models/User.js): `backend/models/User.js`
- [Student records](https://github.com/vashista1947-dot/student-portal/blob/main/backend/models/StudentProfile.js): `backend/models/StudentProfile.js`
- [Job events](https://github.com/vashista1947-dot/student-portal/blob/main/backend/models/JobEvent.js): `backend/models/JobEvent.js`
- [Applications](https://github.com/vashista1947-dot/student-portal/blob/main/backend/models/Application.js): `backend/models/Application.js`
- [Scheduled email records](https://github.com/vashista1947-dot/student-portal/blob/main/backend/models/ScheduledEmail.js): `backend/models/ScheduledEmail.js`
- [Applicant spreadsheet builder](https://github.com/vashista1947-dot/student-portal/blob/main/backend/utils/excelBuilder.js): `backend/utils/excelBuilder.js`
- [Email delivery](https://github.com/vashista1947-dot/student-portal/blob/main/backend/utils/emailService.js): `backend/utils/emailService.js`
- [Email scheduler](https://github.com/vashista1947-dot/student-portal/blob/main/backend/utils/scheduler.js): `backend/utils/scheduler.js`
- [Company records](https://github.com/vashista1947-dot/student-portal/blob/main/backend/models/Company.js): `backend/models/Company.js`
- [MongoDB](https://github.com/vashista1947-dot/student-portal/blob/main/backend/config/db.js): `backend/config/db.js`

### Other components

- **Student**
- **Placement admin**

## Connections

- Student → Portal routes: uses portal (evidence: `frontend/src/App.jsx`)
- Placement admin → Portal routes: uses portal (evidence: `frontend/src/App.jsx`)
- Portal routes → Sign-in and registration: routes to (evidence: `frontend/src/App.jsx`)
- Portal routes → Student portal pages: routes to (evidence: `frontend/src/App.jsx`)
- Portal routes → Admin portal pages: routes to (evidence: `frontend/src/App.jsx`)
- Portal routes → Auth state: reads auth (evidence: `frontend/src/App.jsx`)
- Auth state → API client: verifies session (evidence: `frontend/src/context/AuthContext.jsx`)
- Sign-in and registration → API client: calls endpoints (evidence: `frontend/src/pages/auth/LoginPage.jsx`)
- Student portal pages → API client: calls endpoints (evidence: `frontend/src/pages/student/ProfileSetup.jsx`)
- Admin portal pages → API client: calls endpoints (evidence: `frontend/src/pages/admin/AllEvents.jsx`)
- API client → API server and routes: HTTP requests (evidence: `frontend/src/services/api.js`)
- API server and routes → Authentication: routes auth (evidence: `backend/server.js`)
- API server and routes → Placement events: routes events (evidence: `backend/server.js`)
- API server and routes → Event applications: routes student (evidence: `backend/server.js`)
- API server and routes → Dispatch and invitations: routes dispatch (evidence: `backend/server.js`)
- API server and routes → Admin and student controls: routes admin (evidence: `backend/server.js`)
- API server and routes → Company and announcements: routes company and announcements (evidence: `backend/server.js`)
- API server and routes → Email scheduler: starts scheduler (evidence: `backend/server.js`)
- Authentication → User accounts: reads and writes (evidence: `backend/controllers/authController.js`)
- Authentication → Email delivery: sends OTP (evidence: `backend/controllers/authController.js`)
- Token and role checks → User accounts: loads account (evidence: `backend/middlewares/auth.js`)
- Student profiles → Student records: reads and writes (evidence: `backend/controllers/studentController.js`)
- Admin and student controls → User accounts: manages accounts (evidence: `backend/controllers/adminController.js`)
- Admin and student controls → Student records: manages student records (evidence: `backend/controllers/adminController.js`)
- Placement events → Job events: reads and writes (evidence: `backend/controllers/eventController.js`)
- Placement events → Company records: checks company (evidence: `backend/controllers/eventController.js`)
- Placement events → Applications: reads registrations (evidence: `backend/controllers/eventController.js`)
- Event applications → Applications: reads and writes (evidence: `backend/controllers/applicationController.js`)
- Event applications → Student records: loads student profile (evidence: `backend/controllers/applicationController.js`)
- Event applications → Job events: checks event (evidence: `backend/controllers/applicationController.js`)
- Dispatch and invitations → Applications: finds applicants (evidence: `backend/controllers/dispatchController.js`)
- Dispatch and invitations → Job events: finds event (evidence: `backend/controllers/dispatchController.js`)
- Dispatch and invitations → Company records: finds company (evidence: `backend/controllers/dispatchController.js`)
- Dispatch and invitations → Applicant spreadsheet builder: builds spreadsheet (evidence: `backend/controllers/dispatchController.js`)
- Dispatch and invitations → Email delivery: sends dispatch (evidence: `backend/controllers/dispatchController.js`)
- Dispatch and invitations → Scheduled email records: reads schedules (evidence: `backend/controllers/dispatchController.js`)
- Email scheduler → Scheduled email records: loads scheduled mail (evidence: `backend/utils/scheduler.js`)
- Email scheduler → Email delivery: sends scheduled mail (evidence: `backend/utils/scheduler.js`)
- API server and routes → MongoDB: connects database (evidence: `backend/server.js`)
