# mr-ahad-khan/careerpath architecture

> Architecture diagram of the GitHub repository mr-ahad-khan/careerpath, 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/mr-ahad-khan/careerpath
- Repository: https://github.com/mr-ahad-khan/careerpath

## Overview

CareerPath is a web and mobile career-planning product: users enter skills and constraints, generate and compare five-year paths, then track milestones, learning, and mentor connections. The web app also supports resume analysis and admin analytics. Its client can simulate and persist data offline, while the Express API provides authenticated cloud-backed features. The map combines sampled source relationships with capabilities documented in the README; unsampled UI and offline details are represented at their existing directory paths.

Main entry points: [`backend/server.js`](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/server.js) (Express API), [`frontend/src/App.jsx`](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/App.jsx) (App routing), [`frontend/src/lib/api.js`](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/lib/api.js) (API and fallback client), [`backend/models`](https://github.com/mr-ahad-khan/careerpath/tree/main/backend/models) (Domain models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web and Mobile Client"]
  node_app["App routing<br/>[App.jsx]"]
  node_authui["Client authentication<br/>[auth.jsx]"]
  node_api["API and fallback client<br/>[api.js]"]
  node_mobile["Native mobile shell"]
end

subgraph group_career["Career Planning"]
  node_intake["Skill intake<br/>[WizardPage.jsx]"]
  node_simui["Simulation and comparison<br/>[SimulationPage.jsx]"]
  node_dashboard["Career dashboard<br/>[DashboardPage.jsx]"]
  node_engine["Trajectory engine<br/>[simulation.js]"]
  node_careerdata["Career and market data<br/>[data.js]"]
  node_offlineengine["Offline simulation<br/>[simulation.js]"]
  node_resumeui["Resume reality-check"]
  node_resumereader["Resume parsing<br/>[resumeReader.js]"]
  node_resumeengine["Resume matching<br/>[resume.js]"]
end

subgraph group_growth["Growth and Community"]
  node_milestones["Milestone roadmap<br/>[MilestonesPage.jsx]"]
  node_mentors["Mentor directory<br/>[MentorsPage.jsx]"]
  node_journalapi["Learning journal API<br/>[journal.js]"]
  node_connections["Mentor connections and chat<br/>[connections.js]"]
  node_adminui["Admin analytics<br/>[AdminPage.jsx]"]
end

subgraph group_backend["API and Services"]
  node_server["Express API<br/>[server.js]"]
  node_authroute["Account routes<br/>[auth.js]"]
  node_authmw["JWT authorization<br/>[auth.js]"]
  node_simroute["Simulation routes<br/>[simulations.js]"]
  node_resumeroute["Resume routes<br/>[resume.js]"]
  node_mentorroute["Mentor routes<br/>[mentors.js]"]
  node_milestoneroute["Milestone routes<br/>[milestones.js]"]
  node_profileroute["Profile routes<br/>[profiles.js]"]
  node_adminroute["Admin routes<br/>[admin.js]"]
end

subgraph group_storage["Persistence"]
  node_offlinecache["Offline data<br/>[offlineData.js]"]
  node_offlinestore[("Offline store<br/>[offlineStore.js]")]
  node_models[("Domain models")]
  node_mongodb[("MongoDB connection<br/>[mongodb.js]")]
end

node_user(("CareerPath user"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_intake
node_app -->|"routes to"| node_simui
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_milestones
node_app -->|"routes to"| node_mentors
node_app -->|"routes to"| node_resumeui
node_app -->|"routes to"| node_adminui
node_intake -.->|"submits profile"| node_api
node_simui -.->|"requests paths"| node_api
node_api -.->|"calls REST API"| node_server
node_api -->|"falls back to"| node_offlinestore
node_api -->|"uses fallback data"| node_offlinecache
node_offlinestore -->|"uses"| node_offlineengine
node_offlinestore -->|"reads data"| node_offlinecache
node_intake -.->|"simulates offline"| node_offlineengine
node_engine -->|"reads definitions"| node_careerdata
node_server -->|"mounts routes"| node_simroute
node_simroute -->|"generates paths"| node_engine
node_server -->|"mounts routes"| node_authroute
node_server -->|"mounts routes"| node_profileroute
node_server -->|"mounts routes"| node_mentorroute
node_server -->|"mounts routes"| node_connections
node_server -->|"mounts routes"| node_milestoneroute
node_server -->|"mounts routes"| node_journalapi
node_server -->|"mounts routes"| node_resumeroute
node_server -->|"mounts routes"| node_adminroute
node_server -->|"connects database"| node_mongodb
node_server -->|"seeds records"| node_models
node_authui -->|"authenticates through"| node_api
node_authroute -->|"signs tokens"| node_authmw
node_authmw -->|"loads user"| node_models
node_simroute -->|"persists simulations"| node_models
node_resumeroute -->|"analyzes resume"| node_resumeengine
node_resumeui -.->|"parses upload"| node_resumereader
node_resumeui -.->|"checks resume"| node_api
node_server -->|"serves roadmap"| node_milestoneroute
node_milestoneroute -->|"stores milestones"| node_models
node_journalapi -->|"stores entries"| node_models
node_connections -->|"stores requests"| node_models
node_mentors -.->|"browses mentors"| node_api
node_adminui -.->|"requests analytics"| node_api
node_mobile -.->|"hosts client"| node_app

click node_app "https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/lib/auth.jsx"
click node_api "https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/lib/api.js"
click node_intake "https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/pages/WizardPage.jsx"
click node_simui "https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/pages/SimulationPage.jsx"
click node_dashboard "https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/pages/DashboardPage.jsx"
click node_engine "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/engine/simulation.js"
click node_careerdata "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/engine/data.js"
click node_offlineengine "https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/lib/offline/simulation.js"
click node_offlinecache "https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/lib/offline/offlineData.js"
click node_offlinestore "https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/lib/offline/offlineStore.js"
click node_resumeui "https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/pages/ResumeCheckPage.jsx"
click node_resumereader "https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/lib/resumeReader.js"
click node_resumeengine "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/engine/resume.js"
click node_milestones "https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/pages/MilestonesPage.jsx"
click node_mentors "https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/pages/MentorsPage.jsx"
click node_journalapi "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/journal.js"
click node_connections "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/connections.js"
click node_adminui "https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/pages/AdminPage.jsx"
click node_server "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/server.js"
click node_authroute "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/auth.js"
click node_authmw "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/middleware/auth.js"
click node_simroute "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/simulations.js"
click node_resumeroute "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/resume.js"
click node_mentorroute "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/mentors.js"
click node_milestoneroute "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/milestones.js"
click node_profileroute "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/profiles.js"
click node_adminroute "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/admin.js"
click node_models "https://github.com/mr-ahad-khan/careerpath/tree/main/backend/models"
click node_mongodb "https://github.com/mr-ahad-khan/careerpath/blob/main/backend/db/mongodb.js"
click node_mobile "https://github.com/mr-ahad-khan/careerpath/tree/main/careerpath-mobile"

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_authui,node_api,node_mobile,node_user toneBlue
class node_intake,node_simui,node_dashboard,node_engine,node_careerdata,node_offlineengine,node_resumeui,node_resumereader,node_resumeengine toneAmber
class node_milestones,node_mentors,node_journalapi,node_connections,node_adminui toneMint
class node_server,node_authroute,node_authmw,node_simroute,node_resumeroute,node_mentorroute,node_milestoneroute,node_profileroute,node_adminroute toneRose
class node_offlinecache,node_offlinestore,node_models,node_mongodb toneIndigo
```

## Components

### Web and Mobile Client

- [App routing](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Client authentication](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/lib/auth.jsx): `frontend/src/lib/auth.jsx`
- [API and fallback client](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/lib/api.js): `frontend/src/lib/api.js`
- [Native mobile shell](https://github.com/mr-ahad-khan/careerpath/tree/main/careerpath-mobile): `careerpath-mobile`

### Career Planning

- [Skill intake](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/pages/WizardPage.jsx): `frontend/src/pages/WizardPage.jsx`
- [Simulation and comparison](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/pages/SimulationPage.jsx): `frontend/src/pages/SimulationPage.jsx`
- [Career dashboard](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/pages/DashboardPage.jsx): `frontend/src/pages/DashboardPage.jsx`
- [Trajectory engine](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/engine/simulation.js): `backend/engine/simulation.js`
- [Career and market data](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/engine/data.js): `backend/engine/data.js`
- [Offline simulation](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/lib/offline/simulation.js): `frontend/src/lib/offline/simulation.js`
- [Resume reality-check](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/pages/ResumeCheckPage.jsx): `frontend/src/pages/ResumeCheckPage.jsx`
- [Resume parsing](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/lib/resumeReader.js): `frontend/src/lib/resumeReader.js`
- [Resume matching](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/engine/resume.js): `backend/engine/resume.js`

### Growth and Community

- [Milestone roadmap](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/pages/MilestonesPage.jsx): `frontend/src/pages/MilestonesPage.jsx`
- [Mentor directory](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/pages/MentorsPage.jsx): `frontend/src/pages/MentorsPage.jsx`
- [Learning journal API](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/journal.js): `backend/routes/journal.js`
- [Mentor connections and chat](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/connections.js): `backend/routes/connections.js`
- [Admin analytics](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/pages/AdminPage.jsx): `frontend/src/pages/AdminPage.jsx`

### API and Services

- [Express API](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/server.js): `backend/server.js`
- [Account routes](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/auth.js): `backend/routes/auth.js`
- [JWT authorization](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/middleware/auth.js): `backend/middleware/auth.js`
- [Simulation routes](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/simulations.js): `backend/routes/simulations.js`
- [Resume routes](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/resume.js): `backend/routes/resume.js`
- [Mentor routes](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/mentors.js): `backend/routes/mentors.js`
- [Milestone routes](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/milestones.js): `backend/routes/milestones.js`
- [Profile routes](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/profiles.js): `backend/routes/profiles.js`
- [Admin routes](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/routes/admin.js): `backend/routes/admin.js`

### Persistence

- [Offline data](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/lib/offline/offlineData.js): `frontend/src/lib/offline/offlineData.js`
- [Offline store](https://github.com/mr-ahad-khan/careerpath/blob/main/frontend/src/lib/offline/offlineStore.js): `frontend/src/lib/offline/offlineStore.js`
- [Domain models](https://github.com/mr-ahad-khan/careerpath/tree/main/backend/models): `backend/models`
- [MongoDB connection](https://github.com/mr-ahad-khan/careerpath/blob/main/backend/db/mongodb.js): `backend/db/mongodb.js`

### Other components

- **CareerPath user**

## Connections

- CareerPath user → App routing: uses (evidence: `frontend/src/App.jsx`)
- App routing → Skill intake: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Simulation and comparison: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Career dashboard: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Milestone roadmap: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Mentor directory: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Resume reality-check: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Admin analytics: routes to (evidence: `frontend/src/App.jsx`)
- Skill intake → API and fallback client: submits profile
- Simulation and comparison → API and fallback client: requests paths
- API and fallback client → Express API: calls REST API (evidence: `README.md`)
- API and fallback client → Offline store: falls back to (evidence: `frontend/src/lib/api.js`)
- API and fallback client → Offline data: uses fallback data (evidence: `frontend/src/lib/api.js`)
- Offline store → Offline simulation: uses (evidence: `frontend/src/lib/offline/offlineStore.js`)
- Offline store → Offline data: reads data (evidence: `frontend/src/lib/offline/offlineStore.js`)
- Skill intake → Offline simulation: simulates offline (evidence: `README.md`)
- Trajectory engine → Career and market data: reads definitions (evidence: `backend/engine/simulation.js`)
- Express API → Simulation routes: mounts routes (evidence: `backend/server.js`)
- Simulation routes → Trajectory engine: generates paths (evidence: `backend/routes/simulations.js`)
- Express API → Account routes: mounts routes (evidence: `backend/server.js`)
- Express API → Profile routes: mounts routes (evidence: `backend/server.js`)
- Express API → Mentor routes: mounts routes (evidence: `backend/server.js`)
- Express API → Mentor connections and chat: mounts routes (evidence: `backend/server.js`)
- Express API → Milestone routes: mounts routes (evidence: `backend/server.js`)
- Express API → Learning journal API: mounts routes (evidence: `backend/server.js`)
- Express API → Resume routes: mounts routes (evidence: `backend/server.js`)
- Express API → Admin routes: mounts routes (evidence: `backend/server.js`)
- Express API → MongoDB connection: connects database (evidence: `backend/server.js`)
- Express API → Domain models: seeds records (evidence: `backend/server.js`)
- Client authentication → API and fallback client: authenticates through (evidence: `frontend/src/lib/auth.jsx`)
- Account routes → JWT authorization: signs tokens (evidence: `backend/routes/auth.js`)
- JWT authorization → Domain models: loads user (evidence: `backend/middleware/auth.js`)
- Simulation routes → Domain models: persists simulations (evidence: `backend/routes/simulations.js`)
- Resume routes → Resume matching: analyzes resume (evidence: `backend/routes/resume.js`)
- Resume reality-check → Resume parsing: parses upload (evidence: `README.md`)
- Resume reality-check → API and fallback client: checks resume
- Express API → Milestone routes: serves roadmap (evidence: `backend/server.js`)
- Milestone routes → Domain models: stores milestones (evidence: `backend/routes/milestones.js`)
- Learning journal API → Domain models: stores entries (evidence: `backend/routes/journal.js`)
- Mentor connections and chat → Domain models: stores requests (evidence: `backend/routes/connections.js`)
- Mentor directory → API and fallback client: browses mentors
- Admin analytics → API and fallback client: requests analytics
- Native mobile shell → App routing: hosts client (evidence: `README.md`)
