# dwisha-01/careergps-ai architecture

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

- Interactive diagram: https://gitdiagram.com/dwisha-01/careergps-ai
- Repository: https://github.com/dwisha-01/careergps-ai

## Overview

CareerGPS AI is a career-guidance web app. Users register, maintain a skills profile, and request role- or resume-based AI assessments; the app saves roadmaps and progress, shows assessment history, and can rewrite resume bullets. The graph follows the documented React-to-Express flow and sampled calls; some page details and unsampled subsystem wiring are not inferred.

Main entry points: [`backend/controllers/analysisController.js`](https://github.com/dwisha-01/careergps-ai/blob/main/backend/controllers/analysisController.js) (Analysis controller), [`backend/server.js`](https://github.com/dwisha-01/careergps-ai/blob/main/backend/server.js) (Express server), [`frontend/src/App.jsx`](https://github.com/dwisha-01/careergps-ai/blob/main/frontend/src/App.jsx) (React routes), [`frontend/src/pages/Dashboard.jsx`](https://github.com/dwisha-01/careergps-ai/blob/main/frontend/src/pages/Dashboard.jsx) (Career dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web app"]
  node_app["React routes<br/>[App.jsx]"]
  node_dashboard["Career dashboard<br/>[Dashboard.jsx]"]
  node_analysispage["Analysis view<br/>[Analysis.jsx]"]
  node_authclient["Auth API client<br/>[authService.js]"]
  node_analysisclient["Analysis API client<br/>[analysisService.js]"]
end

subgraph group_api["API and identity"]
  node_server["Express server<br/>[server.js]"]
  node_authroutes["Auth routes<br/>[authRoutes.js]"]
  node_analysisroutes["Analysis routes<br/>[analysisRoutes.js]"]
  node_authcontroller["Auth controller<br/>[authController.js]"]
  node_authmiddleware["JWT protection<br/>[authMiddleware.js]"]
end

subgraph group_career["Career intelligence"]
  node_analysiscontroller["Analysis controller"]
end

subgraph group_data["Persistence"]
  node_userrecords[("User records<br/>[user.js]")]
  node_analysisrecords[("Assessment records<br/>[analysis.js]")]
  node_dbconfig["Mongo connection<br/>[db.js]"]
end

node_user(("Career seeker"))
node_gemini{{"Gemini AI"}}
node_pdfparser{{"PDF parser"}}
node_mongodb[("MongoDB")]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_analysispage
node_dashboard -->|"requests profile"| node_authclient
node_dashboard -->|"requests assessments"| node_analysisclient
node_authclient -->|"calls auth API"| node_server
node_analysisclient -->|"calls analysis API"| node_server
node_server -->|"mounts auth"| node_authroutes
node_server -->|"mounts analysis"| node_analysisroutes
node_server -->|"connects database"| node_dbconfig
node_authroutes -->|"protects profile routes"| node_authmiddleware
node_authroutes -->|"dispatches auth"| node_authcontroller
node_analysisroutes -->|"protects analysis routes"| node_authmiddleware
node_analysisroutes -->|"dispatches analysis"| node_analysiscontroller
node_authcontroller -->|"reads and writes"| node_userrecords
node_analysiscontroller -->|"reads profile"| node_userrecords
node_analysiscontroller -->|"reads and writes"| node_analysisrecords
node_analysiscontroller -->|"generates guidance"| node_gemini
node_analysiscontroller -->|"parses uploaded PDF"| node_pdfparser
node_dbconfig -->|"connects"| node_mongodb
node_userrecords -->|"persists users"| node_mongodb
node_analysisrecords -->|"persists assessments"| node_mongodb

click node_app "https://github.com/dwisha-01/careergps-ai/blob/main/frontend/src/App.jsx"
click node_dashboard "https://github.com/dwisha-01/careergps-ai/blob/main/frontend/src/pages/Dashboard.jsx"
click node_analysispage "https://github.com/dwisha-01/careergps-ai/blob/main/frontend/src/pages/Analysis.jsx"
click node_authclient "https://github.com/dwisha-01/careergps-ai/blob/main/frontend/src/services/authService.js"
click node_analysisclient "https://github.com/dwisha-01/careergps-ai/blob/main/frontend/src/services/analysisService.js"
click node_server "https://github.com/dwisha-01/careergps-ai/blob/main/backend/server.js"
click node_authroutes "https://github.com/dwisha-01/careergps-ai/blob/main/backend/routes/authRoutes.js"
click node_analysisroutes "https://github.com/dwisha-01/careergps-ai/blob/main/backend/routes/analysisRoutes.js"
click node_authcontroller "https://github.com/dwisha-01/careergps-ai/blob/main/backend/controllers/authController.js"
click node_authmiddleware "https://github.com/dwisha-01/careergps-ai/blob/main/backend/middleware/authMiddleware.js"
click node_analysiscontroller "https://github.com/dwisha-01/careergps-ai/blob/main/backend/controllers/analysisController.js"
click node_userrecords "https://github.com/dwisha-01/careergps-ai/blob/main/backend/models/user.js"
click node_analysisrecords "https://github.com/dwisha-01/careergps-ai/blob/main/backend/models/analysis.js"
click node_dbconfig "https://github.com/dwisha-01/careergps-ai/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_dashboard,node_analysispage,node_authclient,node_analysisclient toneBlue
class node_server,node_authroutes,node_analysisroutes,node_authcontroller,node_authmiddleware,node_mongodb toneAmber
class node_analysiscontroller toneMint
class node_userrecords,node_analysisrecords,node_dbconfig toneRose
class node_user,node_gemini,node_pdfparser toneIndigo
```

## Components

### Web app

- [React routes](https://github.com/dwisha-01/careergps-ai/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Career dashboard](https://github.com/dwisha-01/careergps-ai/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Analysis view](https://github.com/dwisha-01/careergps-ai/blob/main/frontend/src/pages/Analysis.jsx): `frontend/src/pages/Analysis.jsx`
- [Auth API client](https://github.com/dwisha-01/careergps-ai/blob/main/frontend/src/services/authService.js): `frontend/src/services/authService.js`
- [Analysis API client](https://github.com/dwisha-01/careergps-ai/blob/main/frontend/src/services/analysisService.js): `frontend/src/services/analysisService.js`

### API and identity

- [Express server](https://github.com/dwisha-01/careergps-ai/blob/main/backend/server.js): `backend/server.js`
- [Auth routes](https://github.com/dwisha-01/careergps-ai/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Analysis routes](https://github.com/dwisha-01/careergps-ai/blob/main/backend/routes/analysisRoutes.js): `backend/routes/analysisRoutes.js`
- [Auth controller](https://github.com/dwisha-01/careergps-ai/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [JWT protection](https://github.com/dwisha-01/careergps-ai/blob/main/backend/middleware/authMiddleware.js): `backend/middleware/authMiddleware.js`

### Career intelligence

- [Analysis controller](https://github.com/dwisha-01/careergps-ai/blob/main/backend/controllers/analysisController.js): `backend/controllers/analysisController.js`

### Persistence

- [User records](https://github.com/dwisha-01/careergps-ai/blob/main/backend/models/user.js): `backend/models/user.js`
- [Assessment records](https://github.com/dwisha-01/careergps-ai/blob/main/backend/models/analysis.js): `backend/models/analysis.js`
- [Mongo connection](https://github.com/dwisha-01/careergps-ai/blob/main/backend/config/db.js): `backend/config/db.js`

### Other components

- **Career seeker**
- **Gemini AI**
- **PDF parser**
- **MongoDB**

## Connections

- Career seeker → React routes: uses
- React routes → Career dashboard: routes to
- React routes → Analysis view: routes to
- Career dashboard → Auth API client: requests profile
- Career dashboard → Analysis API client: requests assessments
- Auth API client → Express server: calls auth API
- Analysis API client → Express server: calls analysis API
- Express server → Auth routes: mounts auth
- Express server → Analysis routes: mounts analysis
- Express server → Mongo connection: connects database
- Auth routes → JWT protection: protects profile routes
- Auth routes → Auth controller: dispatches auth
- Analysis routes → JWT protection: protects analysis routes
- Analysis routes → Analysis controller: dispatches analysis
- Auth controller → User records: reads and writes
- Analysis controller → User records: reads profile
- Analysis controller → Assessment records: reads and writes
- Analysis controller → Gemini AI: generates guidance
- Analysis controller → PDF parser: parses uploaded PDF
- Mongo connection → MongoDB: connects
- User records → MongoDB: persists users
- Assessment records → MongoDB: persists assessments
