# royprem19/careerpath-ai architecture

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

- Interactive diagram: https://gitdiagram.com/royprem19/careerpath-ai
- Repository: https://github.com/royprem19/careerpath-ai

## Overview

CareerPath AI connects a candidate’s resume and skills to industry roles, quantified fit and gaps, career alternatives, and a learning roadmap; it also supports authentication, PDF reports, and institution-level analytics. The frontend guides users through upload, profile review, role selection, and results, calling a FastAPI backend. Supabase persistence is optional in several flows, with role fallbacks and local authentication state. The institution analytics implementation and several UI pages were not sampled, so their internal connections are omitted.

Main entry points: [`backend/main.py`](https://github.com/royprem19/careerpath-ai/blob/main/backend/main.py) (FastAPI server), [`frontend/src/App.jsx`](https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/App.jsx) (App router), [`backend/routers/resume.py`](https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/resume.py) (Resume endpoints), [`frontend/src/services/api.js`](https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/services/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Candidate experience"]
  node_app["App router<br/>[App.jsx]"]
  node_upload_page["Resume upload<br/>[UploadPage.jsx]"]
  node_profile_review["Profile review<br/>[ProfileReview.jsx]"]
  node_role_selection["Role selection<br/>[RoleSelection.jsx]"]
  node_dashboard["Career dashboard<br/>[Dashboard.jsx]"]
  node_institution_dashboard["Institution dashboard"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["Career API"]
  node_api_server["FastAPI server<br/>[main.py]"]
  node_resume_router["Resume endpoints<br/>[resume.py]"]
  node_roles_router["Role catalog<br/>[roles.py]"]
  node_analysis_router["Gap endpoint<br/>[analysis.py]"]
  node_recommendations_router["Recommendation endpoint<br/>[recommendations.py]"]
  node_roadmap_router["Roadmap endpoint<br/>[roadmap.py]"]
  node_report_router["PDF report endpoint<br/>[report.py]"]
  node_institution_router["Institution analytics<br/>[institution.py]"]
end

subgraph group_career["Career intelligence"]
  node_resume_parser["Resume parser<br/>[resume_parser.py]"]
  node_skill_extractor["Skill extraction<br/>[skill_extractor.py]"]
  node_skill_normalizer["Skill normalization"]
  node_gap_analyzer["Gap analysis<br/>[gap_analyzer.py]"]
  node_recommender["Role recommender<br/>[recommender.py]"]
  node_ml_engine["ML and market signals<br/>[ml_engine.py]"]
  node_roadmap_generator["Roadmap generator"]
  node_report_generator["Report generator"]
end

subgraph group_identity["Identity and data"]
  node_auth_router["Authentication endpoints<br/>[auth.py]"]
  node_auth_service["Authentication service<br/>[auth_service.py]"]
  node_supabase_client["Supabase client<br/>[database.py]"]
end

node_candidate(("Candidate"))
node_institution_user(("Institution user"))
node_supabase[("Supabase database")]

node_candidate -->|"uses"| node_app
node_app -->|"routes to"| node_upload_page
node_app -->|"routes to"| node_profile_review
node_app -->|"routes to"| node_role_selection
node_app -->|"routes to"| node_dashboard
node_upload_page -->|"calls"| node_api_client
node_role_selection -->|"calls"| node_api_client
node_dashboard -->|"calls"| node_api_client
node_api_client -->|"HTTP requests"| node_api_server
node_api_server -->|"registers"| node_auth_router
node_api_server -->|"registers"| node_resume_router
node_api_server -->|"registers"| node_roles_router
node_api_server -->|"registers"| node_analysis_router
node_api_server -->|"registers"| node_recommendations_router
node_api_server -->|"registers"| node_roadmap_router
node_api_server -->|"registers"| node_report_router
node_resume_router -->|"validates user"| node_auth_service
node_resume_router -->|"parses text"| node_resume_parser
node_resume_router -->|"extracts profile"| node_skill_extractor
node_resume_router -->|"normalizes skills"| node_skill_normalizer
node_analysis_router -->|"calculates gaps"| node_gap_analyzer
node_recommendations_router -->|"ranks roles"| node_recommender
node_recommender -->|"uses gap analysis"| node_gap_analyzer
node_recommender -->|"uses ML"| node_ml_engine
node_roadmap_router -->|"generates roadmap"| node_roadmap_generator
node_report_router -->|"creates PDF"| node_report_generator
node_auth_router -->|"handles identity"| node_auth_service
node_auth_service -->|"persists profiles"| node_supabase_client
node_supabase_client -->|"connects"| node_supabase
node_institution_user -.->|"uses"| node_institution_dashboard
node_institution_dashboard -.->|"requests analytics"| node_api_client
node_api_server -.->|"registers"| node_institution_router

click node_app "https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/App.jsx"
click node_upload_page "https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/pages/UploadPage.jsx"
click node_profile_review "https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/pages/ProfileReview.jsx"
click node_role_selection "https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/pages/RoleSelection.jsx"
click node_dashboard "https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/pages/Dashboard.jsx"
click node_institution_dashboard "https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/pages/InstitutionDashboard.jsx"
click node_api_client "https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/services/api.js"
click node_api_server "https://github.com/royprem19/careerpath-ai/blob/main/backend/main.py"
click node_resume_router "https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/resume.py"
click node_roles_router "https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/roles.py"
click node_analysis_router "https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/analysis.py"
click node_recommendations_router "https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/recommendations.py"
click node_roadmap_router "https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/roadmap.py"
click node_report_router "https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/report.py"
click node_institution_router "https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/institution.py"
click node_resume_parser "https://github.com/royprem19/careerpath-ai/blob/main/backend/services/resume_parser.py"
click node_skill_extractor "https://github.com/royprem19/careerpath-ai/blob/main/backend/services/skill_extractor.py"
click node_skill_normalizer "https://github.com/royprem19/careerpath-ai/blob/main/backend/services/skill_normalizer.py"
click node_gap_analyzer "https://github.com/royprem19/careerpath-ai/blob/main/backend/services/gap_analyzer.py"
click node_recommender "https://github.com/royprem19/careerpath-ai/blob/main/backend/services/recommender.py"
click node_ml_engine "https://github.com/royprem19/careerpath-ai/blob/main/backend/services/ml_engine.py"
click node_roadmap_generator "https://github.com/royprem19/careerpath-ai/blob/main/backend/services/roadmap_generator.py"
click node_report_generator "https://github.com/royprem19/careerpath-ai/blob/main/backend/services/report_generator.py"
click node_auth_router "https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/auth.py"
click node_auth_service "https://github.com/royprem19/careerpath-ai/blob/main/backend/services/auth_service.py"
click node_supabase_client "https://github.com/royprem19/careerpath-ai/blob/main/backend/database.py"

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_upload_page,node_profile_review,node_role_selection,node_dashboard,node_institution_dashboard,node_api_client,node_institution_user toneBlue
class node_api_server,node_resume_router,node_roles_router,node_analysis_router,node_recommendations_router,node_roadmap_router,node_report_router,node_institution_router,node_supabase toneAmber
class node_resume_parser,node_skill_extractor,node_skill_normalizer,node_gap_analyzer,node_recommender,node_ml_engine,node_roadmap_generator,node_report_generator toneMint
class node_auth_router,node_auth_service,node_supabase_client toneRose
class node_candidate toneIndigo
```

## Components

### Candidate experience

- [App router](https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Resume upload](https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/pages/UploadPage.jsx): `frontend/src/pages/UploadPage.jsx`
- [Profile review](https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/pages/ProfileReview.jsx): `frontend/src/pages/ProfileReview.jsx`
- [Role selection](https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/pages/RoleSelection.jsx): `frontend/src/pages/RoleSelection.jsx`
- [Career dashboard](https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Institution dashboard](https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/pages/InstitutionDashboard.jsx): `frontend/src/pages/InstitutionDashboard.jsx`
- [API client](https://github.com/royprem19/careerpath-ai/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Career API

- [FastAPI server](https://github.com/royprem19/careerpath-ai/blob/main/backend/main.py): `backend/main.py`
- [Resume endpoints](https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/resume.py): `backend/routers/resume.py`
- [Role catalog](https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/roles.py): `backend/routers/roles.py`
- [Gap endpoint](https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/analysis.py): `backend/routers/analysis.py`
- [Recommendation endpoint](https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/recommendations.py): `backend/routers/recommendations.py`
- [Roadmap endpoint](https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/roadmap.py): `backend/routers/roadmap.py`
- [PDF report endpoint](https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/report.py): `backend/routers/report.py`
- [Institution analytics](https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/institution.py): `backend/routers/institution.py`

### Career intelligence

- [Resume parser](https://github.com/royprem19/careerpath-ai/blob/main/backend/services/resume_parser.py): `backend/services/resume_parser.py`
- [Skill extraction](https://github.com/royprem19/careerpath-ai/blob/main/backend/services/skill_extractor.py): `backend/services/skill_extractor.py`
- [Skill normalization](https://github.com/royprem19/careerpath-ai/blob/main/backend/services/skill_normalizer.py): `backend/services/skill_normalizer.py`
- [Gap analysis](https://github.com/royprem19/careerpath-ai/blob/main/backend/services/gap_analyzer.py): `backend/services/gap_analyzer.py`
- [Role recommender](https://github.com/royprem19/careerpath-ai/blob/main/backend/services/recommender.py): `backend/services/recommender.py`
- [ML and market signals](https://github.com/royprem19/careerpath-ai/blob/main/backend/services/ml_engine.py): `backend/services/ml_engine.py`
- [Roadmap generator](https://github.com/royprem19/careerpath-ai/blob/main/backend/services/roadmap_generator.py): `backend/services/roadmap_generator.py`
- [Report generator](https://github.com/royprem19/careerpath-ai/blob/main/backend/services/report_generator.py): `backend/services/report_generator.py`

### Identity and data

- [Authentication endpoints](https://github.com/royprem19/careerpath-ai/blob/main/backend/routers/auth.py): `backend/routers/auth.py`
- [Authentication service](https://github.com/royprem19/careerpath-ai/blob/main/backend/services/auth_service.py): `backend/services/auth_service.py`
- [Supabase client](https://github.com/royprem19/careerpath-ai/blob/main/backend/database.py): `backend/database.py`

### Other components

- **Candidate**
- **Institution user**
- **Supabase database**

## Connections

- Candidate → App router: uses (evidence: `frontend/src/App.jsx`)
- App router → Resume upload: routes to (evidence: `frontend/src/App.jsx`)
- App router → Profile review: routes to (evidence: `frontend/src/App.jsx`)
- App router → Role selection: routes to (evidence: `frontend/src/App.jsx`)
- App router → Career dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Resume upload → API client: calls (evidence: `frontend/src/pages/UploadPage.jsx`)
- Role selection → API client: calls (evidence: `frontend/src/pages/RoleSelection.jsx`)
- Career dashboard → API client: calls (evidence: `frontend/src/pages/Dashboard.jsx`)
- API client → FastAPI server: HTTP requests (evidence: `frontend/src/services/api.js`)
- FastAPI server → Authentication endpoints: registers (evidence: `backend/main.py`)
- FastAPI server → Resume endpoints: registers (evidence: `backend/main.py`)
- FastAPI server → Role catalog: registers (evidence: `backend/main.py`)
- FastAPI server → Gap endpoint: registers (evidence: `backend/main.py`)
- FastAPI server → Recommendation endpoint: registers (evidence: `backend/main.py`)
- FastAPI server → Roadmap endpoint: registers (evidence: `backend/main.py`)
- FastAPI server → PDF report endpoint: registers (evidence: `backend/main.py`)
- Resume endpoints → Authentication service: validates user (evidence: `backend/routers/resume.py`)
- Resume endpoints → Resume parser: parses text (evidence: `backend/routers/resume.py`)
- Resume endpoints → Skill extraction: extracts profile (evidence: `backend/routers/resume.py`)
- Resume endpoints → Skill normalization: normalizes skills (evidence: `backend/routers/resume.py`)
- Gap endpoint → Gap analysis: calculates gaps (evidence: `backend/routers/analysis.py`)
- Recommendation endpoint → Role recommender: ranks roles (evidence: `backend/routers/recommendations.py`)
- Role recommender → Gap analysis: uses gap analysis (evidence: `backend/services/recommender.py`)
- Role recommender → ML and market signals: uses ML (evidence: `backend/services/recommender.py`)
- Roadmap endpoint → Roadmap generator: generates roadmap (evidence: `backend/routers/roadmap.py`)
- PDF report endpoint → Report generator: creates PDF (evidence: `backend/routers/report.py`)
- Authentication endpoints → Authentication service: handles identity (evidence: `backend/routers/auth.py`)
- Authentication service → Supabase client: persists profiles (evidence: `backend/services/auth_service.py`)
- Supabase client → Supabase database: connects (evidence: `backend/database.py`)
- Institution user → Institution dashboard: uses
- Institution dashboard → API client: requests analytics
- FastAPI server → Institution analytics: registers
