# prabin-chamling-rai/careersync architecture

> Architecture diagram of the GitHub repository prabin-chamling-rai/careersync, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prabin-chamling-rai/careersync
- Repository: https://github.com/prabin-chamling-rai/careersync

## Overview

This is a job marketplace with applicant, employer, and administrator experiences: users discover companies and jobs, create CVs, apply, and manage applications; employers manage companies and job posts and review applications; administrators review company submissions. Chat is a real-time feature, while account verification and interview scheduling support the broader workflow. The sampled source confirms server route registration, database access, and socket message handling; route-to-controller wiring and most page/API interactions are not shown, so those links are left out.

Main entry points: [`api/app.js`](https://github.com/prabin-chamling-rai/careersync/blob/master/api/app.js) (API server), [`frontend/app.vue`](https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/app.vue) (Nuxt application), [`frontend/pages/index.vue`](https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/index.vue) (Company discovery), [`frontend/pages/employer/applications.vue`](https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/employer/applications.vue) (Employer workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_webapp["Nuxt application<br/>[app.vue]"]
  node_home["Company discovery<br/>[index.vue]"]
  node_jobpages["Job browsing<br/>[job.vue]"]
  node_cvpage["CV builder<br/>[cv.vue]"]
  node_applicationpages["Application views"]
  node_employerpages["Employer workspace<br/>[applications.vue]"]
  node_adminpages["Admin workspace<br/>[dashboard.vue]"]
  node_chatpages["Chat screens<br/>[chats.vue]"]
end

subgraph group_identity["Accounts and profiles"]
  node_session["Session state<br/>[user.js]"]
  node_authguard["Route access<br/>[auth.global.ts]"]
  node_authapi["Account endpoints<br/>[authRoute.js]"]
  node_authlogic["Account operations<br/>[authController.js]"]
  node_cvapi["CV endpoints<br/>[cvRoute.js]"]
  node_cvlogic["CV and PDF<br/>[cvController.js]"]
end

subgraph group_marketplace["Jobs and companies"]
  node_companyapi["Company endpoints<br/>[companyRoute.js]"]
  node_companylogic["Company management"]
  node_workapi["Job endpoints<br/>[workRoute.js]"]
  node_worklogic["Job management<br/>[workController.js]"]
end

subgraph group_engagement["Applications and chat"]
  node_applicationapi["Application endpoints"]
  node_applicationlogic["Application management"]
  node_chatapi["Chat endpoints<br/>[chatRoute.js]"]
  node_chatlogic["Chat operations<br/>[chatController.js]"]
end

node_applicant(("Job seeker"))
node_employer(("Employer"))
node_admin(("Administrator"))
node_server["API server<br/>[app.js]"]
node_dbconnect["DB connection<br/>[database.js]"]
node_database[("Job database")]
node_email["Email service<br/>[email.js]"]
node_socket(("Socket clients"))

node_applicant -->|"uses"| node_webapp
node_employer -->|"uses"| node_webapp
node_admin -->|"uses"| node_webapp
node_webapp -->|"checks access"| node_authguard
node_webapp -->|"renders"| node_home
node_webapp -->|"renders"| node_jobpages
node_webapp -->|"renders"| node_cvpage
node_webapp -->|"renders"| node_applicationpages
node_webapp -->|"renders"| node_employerpages
node_webapp -->|"renders"| node_adminpages
node_webapp -->|"renders"| node_chatpages
node_authguard -->|"checks session"| node_session
node_home -->|"fetches companies"| node_server
node_employerpages -->|"updates schedule"| node_server
node_server -->|"mounts"| node_authapi
node_server -->|"mounts"| node_companyapi
node_server -->|"mounts"| node_workapi
node_server -->|"mounts"| node_cvapi
node_server -->|"mounts"| node_applicationapi
node_server -->|"mounts"| node_chatapi
node_server -->|"connects"| node_dbconnect
node_dbconnect -->|"opens connection"| node_database
node_server -->|"reads and writes"| node_database
node_server -->|"dispatches chat"| node_socket
node_authlogic -->|"sends verification"| node_email
node_companylogic -->|"sends decisions"| node_email

click node_webapp "https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/app.vue"
click node_home "https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/index.vue"
click node_jobpages "https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/job.vue"
click node_cvpage "https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/cv.vue"
click node_applicationpages "https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/my-applications.vue"
click node_employerpages "https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/employer/applications.vue"
click node_adminpages "https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/admin/dashboard.vue"
click node_chatpages "https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/chats.vue"
click node_session "https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/stores/user.js"
click node_authguard "https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/middleware/auth.global.ts"
click node_authapi "https://github.com/prabin-chamling-rai/careersync/blob/master/api/routes/authRoute.js"
click node_authlogic "https://github.com/prabin-chamling-rai/careersync/blob/master/api/controllers/authController.js"
click node_companyapi "https://github.com/prabin-chamling-rai/careersync/blob/master/api/routes/companyRoute.js"
click node_companylogic "https://github.com/prabin-chamling-rai/careersync/blob/master/api/controllers/companyController.js"
click node_workapi "https://github.com/prabin-chamling-rai/careersync/blob/master/api/routes/workRoute.js"
click node_worklogic "https://github.com/prabin-chamling-rai/careersync/blob/master/api/controllers/workController.js"
click node_cvapi "https://github.com/prabin-chamling-rai/careersync/blob/master/api/routes/cvRoute.js"
click node_cvlogic "https://github.com/prabin-chamling-rai/careersync/blob/master/api/controllers/cvController.js"
click node_applicationapi "https://github.com/prabin-chamling-rai/careersync/blob/master/api/routes/applicationRoute.js"
click node_applicationlogic "https://github.com/prabin-chamling-rai/careersync/blob/master/api/controllers/applicationController.js"
click node_chatapi "https://github.com/prabin-chamling-rai/careersync/blob/master/api/routes/chatRoute.js"
click node_chatlogic "https://github.com/prabin-chamling-rai/careersync/blob/master/api/controllers/chatController.js"
click node_server "https://github.com/prabin-chamling-rai/careersync/blob/master/api/app.js"
click node_dbconnect "https://github.com/prabin-chamling-rai/careersync/blob/master/api/database.js"
click node_email "https://github.com/prabin-chamling-rai/careersync/blob/master/api/utils/email.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_home,node_jobpages,node_cvpage,node_applicationpages,node_employerpages,node_adminpages,node_chatpages,node_socket toneBlue
class node_session,node_authguard,node_authapi,node_authlogic,node_cvapi,node_cvlogic,node_database toneAmber
class node_companyapi,node_companylogic,node_workapi,node_worklogic,node_server toneMint
class node_applicationapi,node_applicationlogic,node_chatapi,node_chatlogic toneRose
class node_applicant,node_employer,node_admin toneIndigo
class node_dbconnect,node_email toneTeal
```

## Components

### Web experience

- [Nuxt application](https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/app.vue): `frontend/app.vue`
- [Company discovery](https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/index.vue): `frontend/pages/index.vue`
- [Job browsing](https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/job.vue): `frontend/pages/job.vue`
- [CV builder](https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/cv.vue): `frontend/pages/cv.vue`
- [Application views](https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/my-applications.vue): `frontend/pages/my-applications.vue`
- [Employer workspace](https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/employer/applications.vue): `frontend/pages/employer/applications.vue`
- [Admin workspace](https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/admin/dashboard.vue): `frontend/pages/admin/dashboard.vue`
- [Chat screens](https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/pages/chats.vue): `frontend/pages/chats.vue`

### Accounts and profiles

- [Session state](https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/stores/user.js): `frontend/stores/user.js`
- [Route access](https://github.com/prabin-chamling-rai/careersync/blob/master/frontend/middleware/auth.global.ts): `frontend/middleware/auth.global.ts`
- [Account endpoints](https://github.com/prabin-chamling-rai/careersync/blob/master/api/routes/authRoute.js): `api/routes/authRoute.js`
- [Account operations](https://github.com/prabin-chamling-rai/careersync/blob/master/api/controllers/authController.js): `api/controllers/authController.js`
- [CV endpoints](https://github.com/prabin-chamling-rai/careersync/blob/master/api/routes/cvRoute.js): `api/routes/cvRoute.js`
- [CV and PDF](https://github.com/prabin-chamling-rai/careersync/blob/master/api/controllers/cvController.js): `api/controllers/cvController.js`

### Jobs and companies

- [Company endpoints](https://github.com/prabin-chamling-rai/careersync/blob/master/api/routes/companyRoute.js): `api/routes/companyRoute.js`
- [Company management](https://github.com/prabin-chamling-rai/careersync/blob/master/api/controllers/companyController.js): `api/controllers/companyController.js`
- [Job endpoints](https://github.com/prabin-chamling-rai/careersync/blob/master/api/routes/workRoute.js): `api/routes/workRoute.js`
- [Job management](https://github.com/prabin-chamling-rai/careersync/blob/master/api/controllers/workController.js): `api/controllers/workController.js`

### Applications and chat

- [Application endpoints](https://github.com/prabin-chamling-rai/careersync/blob/master/api/routes/applicationRoute.js): `api/routes/applicationRoute.js`
- [Application management](https://github.com/prabin-chamling-rai/careersync/blob/master/api/controllers/applicationController.js): `api/controllers/applicationController.js`
- [Chat endpoints](https://github.com/prabin-chamling-rai/careersync/blob/master/api/routes/chatRoute.js): `api/routes/chatRoute.js`
- [Chat operations](https://github.com/prabin-chamling-rai/careersync/blob/master/api/controllers/chatController.js): `api/controllers/chatController.js`

### Other components

- **Job seeker**
- **Employer**
- **Administrator**
- [API server](https://github.com/prabin-chamling-rai/careersync/blob/master/api/app.js): `api/app.js`
- [DB connection](https://github.com/prabin-chamling-rai/careersync/blob/master/api/database.js): `api/database.js`
- **Job database**
- [Email service](https://github.com/prabin-chamling-rai/careersync/blob/master/api/utils/email.js): `api/utils/email.js`
- **Socket clients**

## Connections

- Job seeker → Nuxt application: uses
- Employer → Nuxt application: uses
- Administrator → Nuxt application: uses
- Nuxt application → Route access: checks access
- Nuxt application → Company discovery: renders
- Nuxt application → Job browsing: renders
- Nuxt application → CV builder: renders
- Nuxt application → Application views: renders
- Nuxt application → Employer workspace: renders
- Nuxt application → Admin workspace: renders
- Nuxt application → Chat screens: renders
- Route access → Session state: checks session
- Company discovery → API server: fetches companies
- Employer workspace → API server: updates schedule
- API server → Account endpoints: mounts
- API server → Company endpoints: mounts
- API server → Job endpoints: mounts
- API server → CV endpoints: mounts
- API server → Application endpoints: mounts
- API server → Chat endpoints: mounts
- API server → DB connection: connects
- DB connection → Job database: opens connection
- API server → Job database: reads and writes
- API server → Socket clients: dispatches chat
- Account operations → Email service: sends verification
- Company management → Email service: sends decisions
