# navadeep-munjam/centre-for-career-planning-and-services-portal architecture

> Architecture diagram of the GitHub repository navadeep-munjam/centre-for-career-planning-and-services-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/navadeep-munjam/centre-for-career-planning-and-services-portal
- Repository: https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal

## Overview

This is a student, alumni, and career-services job portal. Its main workflow is finding and managing opportunities: students use the frontend to browse jobs and track applications, while CCPS professionals manage postings and review analytics. Authentication, referrals, resume generation, and alumni discussions are distinct supporting workflows. The backend routes requests to controllers, which operate on MongoDB-backed models; authentication also sends email, and discussion uploads can use Cloudinary. Several frontend pages and backend subsystems are documented or visible in the tree but were not sampled, so their connections are shown only where documented or marked unverified.

Main entry points: [`backend/server.js`](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/server.js) (HTTP server), [`backend/controllers/auth.controller.js`](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/controllers/auth.controller.js) (Authentication), [`frontend/src/App.jsx`](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/App.jsx) (Portal application), [`backend/routes/thread.routes.js`](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/routes/thread.routes.js) (Discussion routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Portal experience"]
  node_webapp["Portal application<br/>[App.jsx]"]
  node_authstate["Auth context<br/>[AuthContext.jsx]"]
  node_appstate["App context<br/>[AppContext.jsx]"]
  node_jobpages["Job and student pages<br/>[Dashboard.jsx]"]
  node_analytics["Analytics dashboard"]
  node_referralpage["Referral workflows<br/>[Referrals.jsx]"]
  node_resumepage["Resume builder<br/>[ResumeBuilder.jsx]"]
  node_forum["Discussion forum"]
end

subgraph group_identity["Identity and access"]
  node_authapi["Auth API hooks<br/>[useLogin.js]"]
  node_authroutes["Auth routes<br/>[auth.routes.js]"]
  node_authctrl["Authentication<br/>[auth.controller.js]"]
  node_users[("User records<br/>[user.model.js]")]
  node_authguard["Route protection<br/>[auth.middleware.js]"]
end

subgraph group_opportunities["Jobs and applications"]
  node_jobsapi["Job operations"]
  node_studentops["Student profiles<br/>[studentview.js]"]
  node_jobrecords[("Job postings")]
  node_stats["Placement analytics"]
  node_statsdata[("Analytics records<br/>[stats.model.js]")]
end

subgraph group_community["Community and resumes"]
  node_referrals["Referral operations"]
  node_refrecords[("Referral records<br/>[Referal.model.js]")]
  node_threadui["Thread components<br/>[Thread.jsx]"]
  node_threadroutes["Discussion routes<br/>[thread.routes.js]"]
  node_threadctrl["Discussion operations"]
  node_threadrecords[("Threads and comments<br/>[thread.model.js]")]
  node_resumeops["PDF generation<br/>[generatePDF.js]"]
end

subgraph group_platform["Backend services"]
  node_server["HTTP server<br/>[server.js]"]
  node_mainrouter["Job and student routes<br/>[router.js]"]
  node_database[("MongoDB")]
  node_mailer["Email delivery<br/>[emails.js]"]
  node_cloudinary["Cloudinary uploads<br/>[cloudinary.js]"]
end

node_students(("Students and staff"))

node_students -->|"use portal"| node_webapp
node_webapp -->|"uses context"| node_authstate
node_webapp -->|"uses context"| node_appstate
node_students -->|"find opportunities"| node_jobpages
node_students -->|"review metrics"| node_analytics
node_students -->|"request referrals"| node_referralpage
node_students -->|"build resume"| node_resumepage
node_students -->|"join discussions"| node_forum
node_authstate -.->|"supports auth"| node_authapi
node_authapi -.->|"sends requests"| node_authroutes
node_server -->|"mounts routes"| node_authroutes
node_authroutes -->|"dispatches to"| node_authctrl
node_authctrl -->|"reads and writes"| node_users
node_authctrl -->|"sends email"| node_mailer
node_authctrl -->|"issues tokens"| node_authguard
node_authguard -->|"loads user"| node_users
node_server -->|"mounts routes"| node_mainrouter
node_mainrouter -->|"dispatches to"| node_jobsapi
node_mainrouter -->|"dispatches to"| node_studentops
node_jobsapi -->|"reads and writes"| node_jobrecords
node_server -->|"mounts stats routes"| node_stats
node_stats -->|"uses model"| node_statsdata
node_server -->|"mounts routes"| node_threadroutes
node_threadroutes -->|"dispatches to"| node_threadctrl
node_threadroutes -->|"protects routes"| node_authguard
node_threadctrl -->|"reads and writes"| node_threadrecords
node_threadctrl -->|"uploads files"| node_cloudinary
node_server -->|"mounts referral routes"| node_referrals
node_referrals -->|"reads and writes"| node_refrecords
node_server -->|"connects database"| node_database
node_resumepage -.->|"requests PDF"| node_resumeops
node_threadui -.->|"renders threads"| node_forum

click node_webapp "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/App.jsx"
click node_authstate "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/context/AuthContext.jsx"
click node_appstate "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/context/AppContext.jsx"
click node_jobpages "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/pages/Dashboard.jsx"
click node_analytics "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/pages/AnalyticsDashboard.jsx"
click node_referralpage "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/pages/Referrals.jsx"
click node_resumepage "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/pages/ResumeBuilder.jsx"
click node_forum "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/pages/DiscussionForum.jsx"
click node_authapi "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/api/useLogin.js"
click node_authroutes "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/routes/auth.routes.js"
click node_authctrl "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/controllers/auth.controller.js"
click node_users "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/models/user.model.js"
click node_authguard "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/middleware/auth.middleware.js"
click node_jobsapi "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/controllers/jobs.controllers.js"
click node_studentops "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/controllers/studentview.js"
click node_jobrecords "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/models/jobPosting.model.js"
click node_stats "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/controllers/stats.controller.js"
click node_statsdata "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/models/stats.model.js"
click node_referrals "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/controllers/referal.controller.js"
click node_refrecords "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/models/Referal.model.js"
click node_threadui "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/components/Thread.jsx"
click node_threadroutes "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/routes/thread.routes.js"
click node_threadctrl "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/controllers/thread.controller.js"
click node_threadrecords "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/models/thread.model.js"
click node_resumeops "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/utils/generatePDF.js"
click node_server "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/server.js"
click node_mainrouter "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/routes/router.js"
click node_mailer "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/utils/emails.js"
click node_cloudinary "https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/config/cloudinary.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_appstate,node_jobpages,node_analytics,node_referralpage,node_resumepage,node_forum toneBlue
class node_authapi,node_authroutes,node_authctrl,node_users,node_authguard toneAmber
class node_jobsapi,node_studentops,node_jobrecords,node_stats,node_statsdata toneMint
class node_referrals,node_refrecords,node_threadui,node_threadroutes,node_threadctrl,node_threadrecords,node_resumeops toneRose
class node_server,node_mainrouter,node_database,node_mailer,node_cloudinary,node_students toneIndigo
```

## Components

### Portal experience

- [Portal application](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth context](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [App context](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/context/AppContext.jsx): `frontend/src/context/AppContext.jsx`
- [Job and student pages](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Analytics dashboard](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/pages/AnalyticsDashboard.jsx): `frontend/src/pages/AnalyticsDashboard.jsx`
- [Referral workflows](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/pages/Referrals.jsx): `frontend/src/pages/Referrals.jsx`
- [Resume builder](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/pages/ResumeBuilder.jsx): `frontend/src/pages/ResumeBuilder.jsx`
- [Discussion forum](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/pages/DiscussionForum.jsx): `frontend/src/pages/DiscussionForum.jsx`

### Identity and access

- [Auth API hooks](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/api/useLogin.js): `frontend/src/api/useLogin.js`
- [Auth routes](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/routes/auth.routes.js): `backend/routes/auth.routes.js`
- [Authentication](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/controllers/auth.controller.js): `backend/controllers/auth.controller.js`
- [User records](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/models/user.model.js): `backend/models/user.model.js`
- [Route protection](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/middleware/auth.middleware.js): `backend/middleware/auth.middleware.js`

### Jobs and applications

- [Job operations](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/controllers/jobs.controllers.js): `backend/controllers/jobs.controllers.js`
- [Student profiles](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/controllers/studentview.js): `backend/controllers/studentview.js`
- [Job postings](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/models/jobPosting.model.js): `backend/models/jobPosting.model.js`
- [Placement analytics](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/controllers/stats.controller.js): `backend/controllers/stats.controller.js`
- [Analytics records](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/models/stats.model.js): `backend/models/stats.model.js`

### Community and resumes

- [Referral operations](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/controllers/referal.controller.js): `backend/controllers/referal.controller.js`
- [Referral records](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/models/Referal.model.js): `backend/models/Referal.model.js`
- [Thread components](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/frontend/src/components/Thread.jsx): `frontend/src/components/Thread.jsx`
- [Discussion routes](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/routes/thread.routes.js): `backend/routes/thread.routes.js`
- [Discussion operations](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/controllers/thread.controller.js): `backend/controllers/thread.controller.js`
- [Threads and comments](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/models/thread.model.js): `backend/models/thread.model.js`
- [PDF generation](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/utils/generatePDF.js): `backend/utils/generatePDF.js`

### Backend services

- [HTTP server](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/server.js): `backend/server.js`
- [Job and student routes](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/routes/router.js): `backend/routes/router.js`
- **MongoDB**
- [Email delivery](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/utils/emails.js): `backend/utils/emails.js`
- [Cloudinary uploads](https://github.com/navadeep-munjam/centre-for-career-planning-and-services-portal/blob/main/backend/config/cloudinary.js): `backend/config/cloudinary.js`

### Other components

- **Students and staff**

## Connections

- Students and staff → Portal application: use portal (evidence: `README.md`)
- Portal application → Auth context: uses context (evidence: `frontend/src/main.jsx`)
- Portal application → App context: uses context (evidence: `frontend/src/main.jsx`)
- Students and staff → Job and student pages: find opportunities (evidence: `README.md`)
- Students and staff → Analytics dashboard: review metrics (evidence: `README.md`)
- Students and staff → Referral workflows: request referrals (evidence: `README.md`)
- Students and staff → Resume builder: build resume (evidence: `README.md`)
- Students and staff → Discussion forum: join discussions (evidence: `README.md`)
- Auth context → Auth API hooks: supports auth
- Auth API hooks → Auth routes: sends requests
- HTTP server → Auth routes: mounts routes (evidence: `backend/server.js`)
- Auth routes → Authentication: dispatches to (evidence: `backend/routes/auth.routes.js`)
- Authentication → User records: reads and writes (evidence: `backend/controllers/auth.controller.js`)
- Authentication → Email delivery: sends email (evidence: `backend/controllers/auth.controller.js`)
- Authentication → Route protection: issues tokens (evidence: `backend/controllers/auth.controller.js`)
- Route protection → User records: loads user (evidence: `backend/middleware/auth.middleware.js`)
- HTTP server → Job and student routes: mounts routes (evidence: `backend/server.js`)
- Job and student routes → Job operations: dispatches to (evidence: `backend/routes/router.js`)
- Job and student routes → Student profiles: dispatches to (evidence: `backend/routes/router.js`)
- Job operations → Job postings: reads and writes (evidence: `backend/controllers/jobs.controllers.js`)
- HTTP server → Placement analytics: mounts stats routes (evidence: `backend/server.js`)
- Placement analytics → Analytics records: uses model (evidence: `backend/controllers/stats.controller.js`)
- HTTP server → Discussion routes: mounts routes (evidence: `backend/server.js`)
- Discussion routes → Discussion operations: dispatches to (evidence: `backend/routes/thread.routes.js`)
- Discussion routes → Route protection: protects routes (evidence: `backend/routes/thread.routes.js`)
- Discussion operations → Threads and comments: reads and writes (evidence: `backend/controllers/thread.controller.js`)
- Discussion operations → Cloudinary uploads: uploads files (evidence: `backend/controllers/thread.controller.js`)
- HTTP server → Referral operations: mounts referral routes (evidence: `backend/server.js`)
- Referral operations → Referral records: reads and writes (evidence: `backend/controllers/referal.controller.js`)
- HTTP server → MongoDB: connects database (evidence: `backend/server.js`)
- Resume builder → PDF generation: requests PDF
- Thread components → Discussion forum: renders threads
