# omarkhan56/placement-portal architecture

> Architecture diagram of the GitHub repository omarkhan56/placement-portal, 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/omarkhan56/placement-portal
- Repository: https://github.com/omarkhan56/placement-portal

## Overview

Campus Placement Portal coordinates student profiles and internship recommendations, applications and mentor approvals, employer selection, and placement-cell operations and analytics. Users enter through role-based React routes; the Express API handles authentication and domain requests, with MongoDB-backed models and documented email, resume-storage, and caching integrations. The graph preserves the README’s major role workflows. Some controller and integration details are unsampled, so those connections are documented or omitted rather than inferred from names alone.

Main entry points: [`frontend/src/App.jsx`](https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/App.jsx) (Role-based routes), [`backend/controllers/applicationController.js`](https://github.com/omarkhan56/placement-portal/blob/main/backend/controllers/applicationController.js) (Application lifecycle), [`backend/controllers/authController.js`](https://github.com/omarkhan56/placement-portal/blob/main/backend/controllers/authController.js) (Authentication logic), [`backend/models/Student.js`](https://github.com/omarkhan56/placement-portal/blob/main/backend/models/Student.js) (Student profiles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Role-based routes<br/>[App.jsx]"]
  node_auth_ui["Login and registration"]
  node_student_ui["Student dashboard"]
  node_profile_ui["Student profile<br/>[StudentProfile.jsx]"]
  node_student_jobs["Internship discovery"]
  node_student_apps["Application tracking"]
  node_placement_ui["Internship management"]
  node_mentor_ui["Mentor review"]
  node_employer_ui["Candidate selection"]
  node_analytics_ui["Analytics dashboard"]
  node_auth_context["Session context<br/>[AuthContext.jsx]"]
  node_api_client["HTTP client<br/>[axios.js]"]
end

subgraph group_api["API and access"]
  node_express_app["Express API<br/>[app.js]"]
  node_auth_routes["Authentication routes<br/>[auth.js]"]
  node_application_routes["Application routes<br/>[application.js]"]
  node_auth_controller["Authentication logic<br/>[authController.js]"]
end

subgraph group_placement["Placement workflows"]
  node_application_controller["Application lifecycle"]
  node_internship_controller["Internship matching"]
  node_analytics_controller["Placement analytics"]
  node_matching["Recommendation scoring"]
end

subgraph group_state["Domain data and services"]
  node_application_model[("Applications<br/>[Application.js]")]
  node_student_model[("Student profiles<br/>[Student.js]")]
  node_user_model[("User accounts<br/>[User.js]")]
  node_internship_model[("Internships<br/>[Internship.js]")]
  node_email["Email notifications<br/>[nodemailer.js]"]
  node_cloudinary["Resume storage<br/>[cloudinary.js]"]
  node_redis[("Cache<br/>[redis.js]")]
  node_mongodb[("MongoDB")]
end

node_student(("Student"))
node_mentor(("Mentor"))
node_employer(("Employer"))
node_placement_cell(("Placement cell"))
node_smtp["SMTP service"]
node_cloudinary_service["Cloudinary service"]

node_student -->|"uses"| node_app
node_mentor -->|"uses"| node_app
node_employer -->|"uses"| node_app
node_placement_cell -->|"uses"| node_app
node_app -->|"provides session"| node_auth_context
node_app -->|"routes to"| node_auth_ui
node_app -->|"routes to"| node_student_ui
node_app -->|"routes to"| node_profile_ui
node_app -->|"routes to"| node_placement_ui
node_app -->|"routes to"| node_mentor_ui
node_app -->|"routes to"| node_employer_ui
node_app -->|"routes to"| node_analytics_ui
node_student_ui -->|"renders"| node_student_jobs
node_student_ui -.->|"renders"| node_student_apps
node_auth_ui -.->|"requests"| node_api_client
node_profile_ui -->|"requests"| node_api_client
node_student_ui -->|"requests"| node_api_client
node_api_client -.->|"sends API requests"| node_express_app
node_express_app -->|"mounts"| node_auth_routes
node_express_app -->|"mounts"| node_application_routes
node_auth_routes -->|"dispatches"| node_auth_controller
node_application_routes -->|"dispatches"| node_application_controller
node_application_routes -->|"protects with"| node_auth_controller
node_auth_routes -->|"protects profile route"| node_auth_controller
node_auth_controller -->|"reads and writes"| node_user_model
node_auth_controller -->|"creates profile"| node_student_model
node_application_controller -->|"creates and updates"| node_application_model
node_application_controller -->|"loads student"| node_student_model
node_application_controller -->|"loads internship"| node_internship_model
node_application_controller -->|"loads recipient"| node_user_model
node_application_controller -->|"sends notifications"| node_email
node_application_controller -->|"invalidates cache"| node_redis
node_internship_controller -->|"uses scoring"| node_matching
node_internship_controller -->|"loads student"| node_student_model
node_internship_controller -->|"loads internships"| node_internship_model
node_internship_controller -->|"uses cache"| node_redis
node_analytics_ui -.->|"requests metrics"| node_analytics_controller
node_analytics_controller -.->|"reads placement data"| node_mongodb
node_student_model -->|"references"| node_user_model
node_application_model -->|"references"| node_student_model
node_application_model -->|"references"| node_internship_model
node_email -.->|"sends mail"| node_smtp
node_cloudinary -.->|"stores resumes"| node_cloudinary_service

click node_app "https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/omarkhan56/placement-portal/tree/main/frontend/src/pages"
click node_student_ui "https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/pages/StudentDashboard.jsx"
click node_profile_ui "https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/components/student/StudentProfile.jsx"
click node_student_jobs "https://github.com/omarkhan56/placement-portal/tree/main/frontend/src/components/student"
click node_student_apps "https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/components/student/ApplicationTracker.jsx"
click node_placement_ui "https://github.com/omarkhan56/placement-portal/tree/main/frontend/src/components/placement"
click node_mentor_ui "https://github.com/omarkhan56/placement-portal/tree/main/frontend/src/components/mentor"
click node_employer_ui "https://github.com/omarkhan56/placement-portal/tree/main/frontend/src/components/employer"
click node_analytics_ui "https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/components/placement/AnalyticsDashboard.jsx"
click node_auth_context "https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/context/AuthContext.jsx"
click node_api_client "https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/api/axios.js"
click node_express_app "https://github.com/omarkhan56/placement-portal/blob/main/backend/app.js"
click node_auth_routes "https://github.com/omarkhan56/placement-portal/blob/main/backend/routes/auth.js"
click node_application_routes "https://github.com/omarkhan56/placement-portal/blob/main/backend/routes/application.js"
click node_auth_controller "https://github.com/omarkhan56/placement-portal/blob/main/backend/controllers/authController.js"
click node_application_controller "https://github.com/omarkhan56/placement-portal/blob/main/backend/controllers/applicationController.js"
click node_internship_controller "https://github.com/omarkhan56/placement-portal/blob/main/backend/controllers/internshipController.js"
click node_analytics_controller "https://github.com/omarkhan56/placement-portal/blob/main/backend/controllers/analyticsController.js"
click node_application_model "https://github.com/omarkhan56/placement-portal/blob/main/backend/models/Application.js"
click node_student_model "https://github.com/omarkhan56/placement-portal/blob/main/backend/models/Student.js"
click node_user_model "https://github.com/omarkhan56/placement-portal/blob/main/backend/models/User.js"
click node_internship_model "https://github.com/omarkhan56/placement-portal/blob/main/backend/models/Internship.js"
click node_matching "https://github.com/omarkhan56/placement-portal/blob/main/backend/utils/matchingAlgorithm.js"
click node_email "https://github.com/omarkhan56/placement-portal/blob/main/backend/config/nodemailer.js"
click node_cloudinary "https://github.com/omarkhan56/placement-portal/blob/main/backend/config/cloudinary.js"
click node_redis "https://github.com/omarkhan56/placement-portal/blob/main/backend/config/redis.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_auth_ui,node_student_ui,node_profile_ui,node_student_jobs,node_student_apps,node_placement_ui,node_mentor_ui,node_employer_ui,node_analytics_ui,node_auth_context,node_api_client toneBlue
class node_express_app,node_auth_routes,node_application_routes,node_auth_controller toneAmber
class node_application_controller,node_internship_controller,node_analytics_controller,node_matching toneMint
class node_application_model,node_student_model,node_user_model,node_internship_model,node_email,node_cloudinary,node_redis,node_mongodb toneRose
class node_student,node_mentor,node_employer,node_placement_cell,node_smtp,node_cloudinary_service toneIndigo
```

## Components

### Web client

- [Role-based routes](https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Login and registration](https://github.com/omarkhan56/placement-portal/tree/main/frontend/src/pages): `frontend/src/pages`
- [Student dashboard](https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/pages/StudentDashboard.jsx): `frontend/src/pages/StudentDashboard.jsx`
- [Student profile](https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/components/student/StudentProfile.jsx): `frontend/src/components/student/StudentProfile.jsx`
- [Internship discovery](https://github.com/omarkhan56/placement-portal/tree/main/frontend/src/components/student): `frontend/src/components/student`
- [Application tracking](https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/components/student/ApplicationTracker.jsx): `frontend/src/components/student/ApplicationTracker.jsx`
- [Internship management](https://github.com/omarkhan56/placement-portal/tree/main/frontend/src/components/placement): `frontend/src/components/placement`
- [Mentor review](https://github.com/omarkhan56/placement-portal/tree/main/frontend/src/components/mentor): `frontend/src/components/mentor`
- [Candidate selection](https://github.com/omarkhan56/placement-portal/tree/main/frontend/src/components/employer): `frontend/src/components/employer`
- [Analytics dashboard](https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/components/placement/AnalyticsDashboard.jsx): `frontend/src/components/placement/AnalyticsDashboard.jsx`
- [Session context](https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [HTTP client](https://github.com/omarkhan56/placement-portal/blob/main/frontend/src/api/axios.js): `frontend/src/api/axios.js`

### API and access

- [Express API](https://github.com/omarkhan56/placement-portal/blob/main/backend/app.js): `backend/app.js`
- [Authentication routes](https://github.com/omarkhan56/placement-portal/blob/main/backend/routes/auth.js): `backend/routes/auth.js`
- [Application routes](https://github.com/omarkhan56/placement-portal/blob/main/backend/routes/application.js): `backend/routes/application.js`
- [Authentication logic](https://github.com/omarkhan56/placement-portal/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`

### Placement workflows

- [Application lifecycle](https://github.com/omarkhan56/placement-portal/blob/main/backend/controllers/applicationController.js): `backend/controllers/applicationController.js`
- [Internship matching](https://github.com/omarkhan56/placement-portal/blob/main/backend/controllers/internshipController.js): `backend/controllers/internshipController.js`
- [Placement analytics](https://github.com/omarkhan56/placement-portal/blob/main/backend/controllers/analyticsController.js): `backend/controllers/analyticsController.js`
- [Recommendation scoring](https://github.com/omarkhan56/placement-portal/blob/main/backend/utils/matchingAlgorithm.js): `backend/utils/matchingAlgorithm.js`

### Domain data and services

- [Applications](https://github.com/omarkhan56/placement-portal/blob/main/backend/models/Application.js): `backend/models/Application.js`
- [Student profiles](https://github.com/omarkhan56/placement-portal/blob/main/backend/models/Student.js): `backend/models/Student.js`
- [User accounts](https://github.com/omarkhan56/placement-portal/blob/main/backend/models/User.js): `backend/models/User.js`
- [Internships](https://github.com/omarkhan56/placement-portal/blob/main/backend/models/Internship.js): `backend/models/Internship.js`
- [Email notifications](https://github.com/omarkhan56/placement-portal/blob/main/backend/config/nodemailer.js): `backend/config/nodemailer.js`
- [Resume storage](https://github.com/omarkhan56/placement-portal/blob/main/backend/config/cloudinary.js): `backend/config/cloudinary.js`
- [Cache](https://github.com/omarkhan56/placement-portal/blob/main/backend/config/redis.js): `backend/config/redis.js`
- **MongoDB**

### Other components

- **Student**
- **Mentor**
- **Employer**
- **Placement cell**
- **SMTP service**
- **Cloudinary service**

## Connections

- Student → Role-based routes: uses (evidence: `README.md`)
- Mentor → Role-based routes: uses (evidence: `README.md`)
- Employer → Role-based routes: uses (evidence: `README.md`)
- Placement cell → Role-based routes: uses (evidence: `README.md`)
- Role-based routes → Session context: provides session (evidence: `frontend/src/App.jsx`)
- Role-based routes → Login and registration: routes to (evidence: `frontend/src/App.jsx`)
- Role-based routes → Student dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Role-based routes → Student profile: routes to (evidence: `frontend/src/App.jsx`)
- Role-based routes → Internship management: routes to (evidence: `frontend/src/App.jsx`)
- Role-based routes → Mentor review: routes to (evidence: `frontend/src/App.jsx`)
- Role-based routes → Candidate selection: routes to (evidence: `frontend/src/App.jsx`)
- Role-based routes → Analytics dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Student dashboard → Internship discovery: renders (evidence: `frontend/src/pages/StudentDashboard.jsx`)
- Student dashboard → Application tracking: renders (evidence: `frontend/src/pages/StudentDashboard.jsx`)
- Login and registration → HTTP client: requests (evidence: `frontend/src/pages/StudentDashboard.jsx`)
- Student profile → HTTP client: requests (evidence: `frontend/src/components/student/StudentProfile.jsx`)
- Student dashboard → HTTP client: requests (evidence: `frontend/src/pages/StudentDashboard.jsx`)
- HTTP client → Express API: sends API requests
- Express API → Authentication routes: mounts (evidence: `backend/app.js`)
- Express API → Application routes: mounts (evidence: `backend/app.js`)
- Authentication routes → Authentication logic: dispatches (evidence: `backend/routes/auth.js`)
- Application routes → Application lifecycle: dispatches (evidence: `backend/routes/application.js`)
- Application routes → Authentication logic: protects with (evidence: `backend/routes/application.js`)
- Authentication routes → Authentication logic: protects profile route (evidence: `backend/routes/auth.js`)
- Authentication logic → User accounts: reads and writes (evidence: `backend/controllers/authController.js`)
- Authentication logic → Student profiles: creates profile (evidence: `backend/controllers/authController.js`)
- Application lifecycle → Applications: creates and updates (evidence: `backend/controllers/applicationController.js`)
- Application lifecycle → Student profiles: loads student (evidence: `backend/controllers/applicationController.js`)
- Application lifecycle → Internships: loads internship (evidence: `backend/controllers/applicationController.js`)
- Application lifecycle → User accounts: loads recipient (evidence: `backend/controllers/applicationController.js`)
- Application lifecycle → Email notifications: sends notifications (evidence: `backend/controllers/applicationController.js`)
- Application lifecycle → Cache: invalidates cache (evidence: `backend/controllers/applicationController.js`)
- Internship matching → Recommendation scoring: uses scoring (evidence: `backend/controllers/internshipController.js`)
- Internship matching → Student profiles: loads student (evidence: `backend/controllers/internshipController.js`)
- Internship matching → Internships: loads internships (evidence: `backend/controllers/internshipController.js`)
- Internship matching → Cache: uses cache (evidence: `backend/controllers/internshipController.js`)
- Analytics dashboard → Placement analytics: requests metrics
- Placement analytics → MongoDB: reads placement data
- Student profiles → User accounts: references (evidence: `backend/models/Student.js`)
- Applications → Student profiles: references (evidence: `backend/models/Application.js`)
- Applications → Internships: references (evidence: `backend/models/Application.js`)
- Email notifications → SMTP service: sends mail (evidence: `README.md`)
- Resume storage → Cloudinary service: stores resumes (evidence: `README.md`)
