# prajwal-33-hp/careerhub-guide architecture

> Architecture diagram of the GitHub repository prajwal-33-hp/careerhub-guide, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prajwal-33-hp/careerhub-guide
- Repository: https://github.com/prajwal-33-hp/careerhub-guide

## Overview

CareerHub is a job and internship portal for students, recruiters, and administrators. Its principal journey is discovering opportunities, applying, and tracking applications; recruiter and admin dashboards support job management, applicant review, and recruiter verification. The frontend also exposes career-planning tools, learning content, messaging, and video interviews. The README says authentication is wired end-to-end, while most other frontend data still comes from mock data despite corresponding backend APIs. Connections below reflect README statements and shown imports/routes; unsampled page-to-API calls are not assumed.

Main entry points: [`client/src/routes/AppRoutes.jsx`](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/routes/AppRoutes.jsx) (Role-based routing), [`server/server.js`](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/server.js) (Express API), [`client/src/services/api.js`](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/services/api.js) (HTTP client), [`server/routes/authRoutes.js`](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/routes/authRoutes.js) (Auth endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Frontend experiences"]
  node_webapp["React application<br/>[main.jsx]"]
  node_routing["Role-based routing<br/>[AppRoutes.jsx]"]
  node_publicjobs["Job discovery<br/>[Jobs.jsx]"]
  node_student["Student workspace<br/>[Applications.jsx]"]
  node_recruiter["Recruiter workspace"]
  node_admin["Admin workspace"]
  node_careerai["AI career tools<br/>[AICareerSuite.jsx]"]
  node_interviewui["Video interviews"]
  node_authui["Authentication UI<br/>[Login.jsx]"]
  node_api["HTTP client<br/>[api.js]"]
end

subgraph group_server["API workflows"]
  node_authroutes["Auth endpoints<br/>[authRoutes.js]"]
  node_jobroutes["Job endpoints<br/>[jobRoutes.js]"]
  node_companyroutes["Company endpoints<br/>[companyRoutes.js]"]
  node_airoutes["AI endpoints<br/>[aiRoutes.js]"]
  node_authcontroller["Account workflows<br/>[authController.js]"]
  node_verification["Recruiter verification"]
  node_aicontroller["AI workflows<br/>[aiController.js]"]
end

subgraph group_data["Domain data"]
  node_users[("User records<br/>[User.js]")]
  node_applications[("Applications<br/>[Application.js]")]
  node_jobs[("Job records<br/>[Job.js]")]
  node_company[("Company records<br/>[Company.js]")]
end

subgraph group_platform["Runtime services"]
  node_server["Express API<br/>[server.js]"]
  node_aiworker["AI service<br/>[aiService.js]"]
  node_authguard["JWT authorization<br/>[auth.js]"]
  node_email["Email delivery<br/>[emailService.js]"]
  node_socket["Realtime messaging<br/>[socket.js]"]
end

node_user(("Portal user"))
node_mongodb[("MongoDB")]

node_user -->|"uses"| node_webapp
node_webapp -->|"renders routes"| node_routing
node_routing -->|"routes to"| node_publicjobs
node_routing -->|"routes to"| node_student
node_routing -->|"routes to"| node_recruiter
node_routing -->|"routes to"| node_admin
node_routing -->|"routes to"| node_interviewui
node_user -->|"registers or logs in"| node_authui
node_authui -->|"uses API"| node_api
node_api -->|"requests"| node_server
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_jobroutes
node_server -->|"mounts"| node_companyroutes
node_server -->|"mounts"| node_airoutes
node_authroutes -->|"dispatches"| node_authcontroller
node_authroutes -->|"protects endpoints"| node_authguard
node_companyroutes -->|"dispatches verification"| node_verification
node_airoutes -->|"dispatches"| node_aicontroller
node_aicontroller -->|"uses"| node_aiworker
node_authcontroller -->|"reads and updates"| node_users
node_authcontroller -->|"sends account email"| node_email
node_authguard -->|"loads user"| node_users
node_authguard -->|"checks membership"| node_company
node_user -->|"uses career tools"| node_careerai
node_user -->|"tracks applications"| node_student
node_user -->|"manages hiring"| node_recruiter
node_publicjobs -->|"uses mock data today"| node_api
node_student -->|"backend integration pending"| node_api
node_mongodb -.->|"stores"| node_jobs
node_mongodb -.->|"stores"| node_applications
node_mongodb -.->|"stores"| node_company
node_server -->|"initializes"| node_socket

click node_webapp "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/main.jsx"
click node_routing "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/routes/AppRoutes.jsx"
click node_publicjobs "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/pages/Jobs.jsx"
click node_student "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/pages/student/Applications.jsx"
click node_recruiter "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/pages/recruiter/RecruiterOnboarding.jsx"
click node_admin "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/pages/admin/RecruiterApplications.jsx"
click node_careerai "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/pages/student/AICareerSuite.jsx"
click node_interviewui "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/pages/interview/VideoInterviewRoom.jsx"
click node_authui "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/pages/Login.jsx"
click node_api "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/services/api.js"
click node_server "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/server.js"
click node_authroutes "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/routes/authRoutes.js"
click node_jobroutes "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/routes/jobRoutes.js"
click node_companyroutes "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/routes/companyRoutes.js"
click node_airoutes "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/routes/aiRoutes.js"
click node_authcontroller "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/controllers/authController.js"
click node_verification "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/controllers/recruiterVerificationController.js"
click node_aicontroller "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/controllers/aiController.js"
click node_aiworker "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/services/aiService.js"
click node_authguard "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/middleware/auth.js"
click node_users "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/models/User.js"
click node_applications "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/models/Application.js"
click node_jobs "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/models/Job.js"
click node_company "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/models/Company.js"
click node_email "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/services/emailService.js"
click node_socket "https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/utils/socket.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_routing,node_publicjobs,node_student,node_recruiter,node_admin,node_careerai,node_interviewui,node_authui,node_api,node_user toneBlue
class node_authroutes,node_jobroutes,node_companyroutes,node_airoutes,node_authcontroller,node_verification,node_aicontroller,node_mongodb toneAmber
class node_users,node_applications,node_jobs,node_company toneMint
class node_server,node_aiworker,node_authguard,node_email,node_socket toneRose
```

## Components

### Frontend experiences

- [React application](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/main.jsx): `client/src/main.jsx`
- [Role-based routing](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/routes/AppRoutes.jsx): `client/src/routes/AppRoutes.jsx`
- [Job discovery](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/pages/Jobs.jsx): `client/src/pages/Jobs.jsx`
- [Student workspace](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/pages/student/Applications.jsx): `client/src/pages/student/Applications.jsx`
- [Recruiter workspace](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/pages/recruiter/RecruiterOnboarding.jsx): `client/src/pages/recruiter/RecruiterOnboarding.jsx`
- [Admin workspace](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/pages/admin/RecruiterApplications.jsx): `client/src/pages/admin/RecruiterApplications.jsx`
- [AI career tools](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/pages/student/AICareerSuite.jsx): `client/src/pages/student/AICareerSuite.jsx`
- [Video interviews](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/pages/interview/VideoInterviewRoom.jsx): `client/src/pages/interview/VideoInterviewRoom.jsx`
- [Authentication UI](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/pages/Login.jsx): `client/src/pages/Login.jsx`
- [HTTP client](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/client/src/services/api.js): `client/src/services/api.js`

### API workflows

- [Auth endpoints](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/routes/authRoutes.js): `server/routes/authRoutes.js`
- [Job endpoints](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/routes/jobRoutes.js): `server/routes/jobRoutes.js`
- [Company endpoints](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/routes/companyRoutes.js): `server/routes/companyRoutes.js`
- [AI endpoints](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/routes/aiRoutes.js): `server/routes/aiRoutes.js`
- [Account workflows](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/controllers/authController.js): `server/controllers/authController.js`
- [Recruiter verification](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/controllers/recruiterVerificationController.js): `server/controllers/recruiterVerificationController.js`
- [AI workflows](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/controllers/aiController.js): `server/controllers/aiController.js`

### Domain data

- [User records](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/models/User.js): `server/models/User.js`
- [Applications](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/models/Application.js): `server/models/Application.js`
- [Job records](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/models/Job.js): `server/models/Job.js`
- [Company records](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/models/Company.js): `server/models/Company.js`

### Runtime services

- [Express API](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/server.js): `server/server.js`
- [AI service](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/services/aiService.js): `server/services/aiService.js`
- [JWT authorization](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/middleware/auth.js): `server/middleware/auth.js`
- [Email delivery](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/services/emailService.js): `server/services/emailService.js`
- [Realtime messaging](https://github.com/prajwal-33-hp/careerhub-guide/blob/main/server/utils/socket.js): `server/utils/socket.js`

### Other components

- **Portal user**
- **MongoDB**

## Connections

- Portal user → React application: uses (evidence: `README.md`)
- React application → Role-based routing: renders routes (evidence: `client/src/main.jsx`)
- Role-based routing → Job discovery: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Role-based routing → Student workspace: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Role-based routing → Recruiter workspace: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Role-based routing → Admin workspace: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Role-based routing → Video interviews: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Portal user → Authentication UI: registers or logs in (evidence: `README.md`)
- Authentication UI → HTTP client: uses API
- HTTP client → Express API: requests (evidence: `README.md`)
- Express API → Auth endpoints: mounts (evidence: `server/server.js`)
- Express API → Job endpoints: mounts (evidence: `server/server.js`)
- Express API → Company endpoints: mounts (evidence: `server/server.js`)
- Express API → AI endpoints: mounts (evidence: `server/server.js`)
- Auth endpoints → Account workflows: dispatches (evidence: `server/routes/authRoutes.js`)
- Auth endpoints → JWT authorization: protects endpoints (evidence: `server/routes/authRoutes.js`)
- Company endpoints → Recruiter verification: dispatches verification
- AI endpoints → AI workflows: dispatches (evidence: `server/routes/aiRoutes.js`)
- AI workflows → AI service: uses (evidence: `server/controllers/aiController.js`)
- Account workflows → User records: reads and updates (evidence: `server/controllers/authController.js`)
- Account workflows → Email delivery: sends account email (evidence: `server/controllers/authController.js`)
- JWT authorization → User records: loads user (evidence: `server/middleware/auth.js`)
- JWT authorization → Company records: checks membership (evidence: `server/middleware/auth.js`)
- Portal user → AI career tools: uses career tools (evidence: `README.md`)
- Portal user → Student workspace: tracks applications (evidence: `README.md`)
- Portal user → Recruiter workspace: manages hiring (evidence: `README.md`)
- Job discovery → HTTP client: uses mock data today (evidence: `README.md`)
- Student workspace → HTTP client: backend integration pending (evidence: `README.md`)
- MongoDB → Job records: stores
- MongoDB → Applications: stores
- MongoDB → Company records: stores
- Express API → Realtime messaging: initializes (evidence: `server/server.js`)
