# shanksch/jobsa architecture

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

- Interactive diagram: https://gitdiagram.com/shanksch/jobsa
- Repository: https://github.com/shanksch/jobsa

## Overview

JobSA combines a browser extension for ATS form automation, a dashboard for career and application management, and a FastAPI service for resume processing, retrieval-grounded answers, and job matching. The main workflow is resume upload and parsing, career data indexing, then extension form detection, AI answer generation, and candidate review before submission. Dashboard CRUD and Supabase authentication are documented as direct client-to-Supabase paths. Backend route wiring and key retrieval/generation calls are evidenced; some extension and resume-parser internals were not sampled, so their links are documented or left unasserted.

Main entry points: [`services/backend/app/api/routes/resumes.py`](https://github.com/shanksch/jobsa/blob/main/services/backend/app/api/routes/resumes.py) (Resume upload and import), [`apps/web-dashboard/src/lib/api.ts`](https://github.com/shanksch/jobsa/blob/main/apps/web-dashboard/src/lib/api.ts) (Dashboard data access), [`apps/web-dashboard/src/App.tsx`](https://github.com/shanksch/jobsa/blob/main/apps/web-dashboard/src/App.tsx) (Career dashboard), [`apps/extension/src/content/widget.ts`](https://github.com/shanksch/jobsa/blob/main/apps/extension/src/content/widget.ts) (ATS extension)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Candidate clients"]
  node_dashboard["Career dashboard<br/>[App.tsx]"]
  node_dashboard_data["Dashboard data access<br/>[api.ts]"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_extension["ATS extension<br/>[widget.ts]"]
  node_form_fill["Form detection and fill<br/>[fill.ts]"]
  node_extension_worker["Extension service worker<br/>[service-worker.ts]"]
  node_applications["Application tracking"]
  node_knowledge_ui["Career knowledge UI"]
  node_resumes_ui["Resume management UI<br/>[ResumesPage.tsx]"]
end

subgraph group_backend["Backend workflows"]
  node_api["FastAPI routes<br/>[main.py]"]
  node_resume_routes["Resume upload and import<br/>[resumes.py]"]
  node_resume_parser["Resume parsing<br/>[resume_parser.py]"]
  node_autofill_route["Autofill endpoint<br/>[autofill.py]"]
  node_match_route["Job match endpoint<br/>[match.py]"]
  node_rag["RAG answer and match engine<br/>[rag_engine.py]"]
end

subgraph group_knowledge["Career knowledge"]
  node_ingestion["Knowledge ingestion<br/>[ingestion.py]"]
  node_chunking["Text chunking<br/>[chunking.py]"]
  node_embedding["Text embeddings<br/>[embeddings.py]"]
  node_retrieval["Context retrieval<br/>[retrieval.py]"]
end

subgraph group_platform["Data and AI services"]
  node_file_storage["Resume file storage<br/>[storage.py]"]
  node_vector_store[("Supabase and pgvector")]
  node_llm_router["LLM routing<br/>[llm_router.py]"]
  node_llm{{"Gemini and Groq"}}
  node_auth["Supabase authentication<br/>[auth.py]"]
end

node_candidate(("Candidate"))

node_candidate -->|"manages profile"| node_dashboard
node_candidate -->|"uses on ATS"| node_extension
node_dashboard -.->|"loads career data"| node_dashboard_data
node_dashboard_data -->|"uses client"| node_supabase_client
node_dashboard_data -.->|"CRUD via RLS"| node_vector_store
node_dashboard -.->|"signs in"| node_auth
node_extension -->|"fills fields"| node_form_fill
node_extension -.->|"dispatches actions"| node_extension_worker
node_extension -.->|"requests answers"| node_autofill_route
node_dashboard -.->|"uploads resume"| node_resume_routes
node_api -->|"registers route"| node_resume_routes
node_api -->|"registers route"| node_autofill_route
node_api -->|"registers route"| node_match_route
node_resume_routes -->|"parses resume"| node_resume_parser
node_resume_routes -->|"stores file"| node_file_storage
node_resume_routes -->|"reindexes data"| node_ingestion
node_file_storage -.->|"stores resume files"| node_vector_store
node_ingestion -->|"chunks resume text"| node_chunking
node_ingestion -->|"embeds chunks"| node_embedding
node_ingestion -->|"writes chunks"| node_vector_store
node_autofill_route -->|"generates answers"| node_rag
node_match_route -->|"scores job match"| node_rag
node_rag -->|"retrieves context"| node_retrieval
node_retrieval -->|"embeds queries"| node_embedding
node_retrieval -.->|"searches chunks"| node_vector_store
node_rag -->|"requests generation"| node_llm_router
node_llm_router -->|"routes requests"| node_llm
node_autofill_route -->|"validates user"| node_auth
node_match_route -->|"validates user"| node_auth
node_resume_routes -->|"validates user"| node_auth
node_applications -.->|"manages applications"| node_dashboard_data
node_knowledge_ui -->|"edits career data"| node_dashboard_data
node_resumes_ui -.->|"manages resumes"| node_dashboard_data

click node_dashboard "https://github.com/shanksch/jobsa/blob/main/apps/web-dashboard/src/App.tsx"
click node_dashboard_data "https://github.com/shanksch/jobsa/blob/main/apps/web-dashboard/src/lib/api.ts"
click node_supabase_client "https://github.com/shanksch/jobsa/blob/main/apps/web-dashboard/src/lib/supabase.ts"
click node_extension "https://github.com/shanksch/jobsa/blob/main/apps/extension/src/content/widget.ts"
click node_form_fill "https://github.com/shanksch/jobsa/blob/main/apps/extension/src/content/fill.ts"
click node_extension_worker "https://github.com/shanksch/jobsa/blob/main/apps/extension/src/background/service-worker.ts"
click node_api "https://github.com/shanksch/jobsa/blob/main/services/backend/app/main.py"
click node_resume_routes "https://github.com/shanksch/jobsa/blob/main/services/backend/app/api/routes/resumes.py"
click node_resume_parser "https://github.com/shanksch/jobsa/blob/main/services/backend/app/services/resume_parser.py"
click node_file_storage "https://github.com/shanksch/jobsa/blob/main/services/backend/app/services/storage.py"
click node_ingestion "https://github.com/shanksch/jobsa/blob/main/services/backend/app/services/ingestion.py"
click node_chunking "https://github.com/shanksch/jobsa/blob/main/services/backend/app/services/chunking.py"
click node_embedding "https://github.com/shanksch/jobsa/blob/main/services/backend/app/services/embeddings.py"
click node_autofill_route "https://github.com/shanksch/jobsa/blob/main/services/backend/app/api/routes/autofill.py"
click node_match_route "https://github.com/shanksch/jobsa/blob/main/services/backend/app/api/routes/match.py"
click node_rag "https://github.com/shanksch/jobsa/blob/main/services/backend/app/services/rag_engine.py"
click node_retrieval "https://github.com/shanksch/jobsa/blob/main/services/backend/app/services/retrieval.py"
click node_llm_router "https://github.com/shanksch/jobsa/blob/main/services/backend/app/core/llm_router.py"
click node_auth "https://github.com/shanksch/jobsa/blob/main/services/backend/app/core/auth.py"
click node_applications "https://github.com/shanksch/jobsa/blob/main/apps/web-dashboard/src/pages/ApplicationsPage.tsx"
click node_knowledge_ui "https://github.com/shanksch/jobsa/blob/main/apps/web-dashboard/src/pages/KnowledgeBasePage.tsx"
click node_resumes_ui "https://github.com/shanksch/jobsa/blob/main/apps/web-dashboard/src/pages/ResumesPage.tsx"

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_dashboard,node_dashboard_data,node_supabase_client,node_extension,node_form_fill,node_extension_worker,node_applications,node_knowledge_ui,node_resumes_ui toneBlue
class node_api,node_resume_routes,node_resume_parser,node_autofill_route,node_match_route,node_rag toneAmber
class node_ingestion,node_chunking,node_embedding,node_retrieval toneMint
class node_file_storage,node_vector_store,node_llm_router,node_llm,node_auth toneRose
class node_candidate toneIndigo
```

## Components

### Candidate clients

- [Career dashboard](https://github.com/shanksch/jobsa/blob/main/apps/web-dashboard/src/App.tsx): `apps/web-dashboard/src/App.tsx`
- [Dashboard data access](https://github.com/shanksch/jobsa/blob/main/apps/web-dashboard/src/lib/api.ts): `apps/web-dashboard/src/lib/api.ts`
- [Supabase client](https://github.com/shanksch/jobsa/blob/main/apps/web-dashboard/src/lib/supabase.ts): `apps/web-dashboard/src/lib/supabase.ts`
- [ATS extension](https://github.com/shanksch/jobsa/blob/main/apps/extension/src/content/widget.ts): `apps/extension/src/content/widget.ts`
- [Form detection and fill](https://github.com/shanksch/jobsa/blob/main/apps/extension/src/content/fill.ts): `apps/extension/src/content/fill.ts`
- [Extension service worker](https://github.com/shanksch/jobsa/blob/main/apps/extension/src/background/service-worker.ts): `apps/extension/src/background/service-worker.ts`
- [Application tracking](https://github.com/shanksch/jobsa/blob/main/apps/web-dashboard/src/pages/ApplicationsPage.tsx): `apps/web-dashboard/src/pages/ApplicationsPage.tsx`
- [Career knowledge UI](https://github.com/shanksch/jobsa/blob/main/apps/web-dashboard/src/pages/KnowledgeBasePage.tsx): `apps/web-dashboard/src/pages/KnowledgeBasePage.tsx`
- [Resume management UI](https://github.com/shanksch/jobsa/blob/main/apps/web-dashboard/src/pages/ResumesPage.tsx): `apps/web-dashboard/src/pages/ResumesPage.tsx`

### Backend workflows

- [FastAPI routes](https://github.com/shanksch/jobsa/blob/main/services/backend/app/main.py): `services/backend/app/main.py`
- [Resume upload and import](https://github.com/shanksch/jobsa/blob/main/services/backend/app/api/routes/resumes.py): `services/backend/app/api/routes/resumes.py`
- [Resume parsing](https://github.com/shanksch/jobsa/blob/main/services/backend/app/services/resume_parser.py): `services/backend/app/services/resume_parser.py`
- [Autofill endpoint](https://github.com/shanksch/jobsa/blob/main/services/backend/app/api/routes/autofill.py): `services/backend/app/api/routes/autofill.py`
- [Job match endpoint](https://github.com/shanksch/jobsa/blob/main/services/backend/app/api/routes/match.py): `services/backend/app/api/routes/match.py`
- [RAG answer and match engine](https://github.com/shanksch/jobsa/blob/main/services/backend/app/services/rag_engine.py): `services/backend/app/services/rag_engine.py`

### Career knowledge

- [Knowledge ingestion](https://github.com/shanksch/jobsa/blob/main/services/backend/app/services/ingestion.py): `services/backend/app/services/ingestion.py`
- [Text chunking](https://github.com/shanksch/jobsa/blob/main/services/backend/app/services/chunking.py): `services/backend/app/services/chunking.py`
- [Text embeddings](https://github.com/shanksch/jobsa/blob/main/services/backend/app/services/embeddings.py): `services/backend/app/services/embeddings.py`
- [Context retrieval](https://github.com/shanksch/jobsa/blob/main/services/backend/app/services/retrieval.py): `services/backend/app/services/retrieval.py`

### Data and AI services

- [Resume file storage](https://github.com/shanksch/jobsa/blob/main/services/backend/app/services/storage.py): `services/backend/app/services/storage.py`
- **Supabase and pgvector**
- [LLM routing](https://github.com/shanksch/jobsa/blob/main/services/backend/app/core/llm_router.py): `services/backend/app/core/llm_router.py`
- **Gemini and Groq**
- [Supabase authentication](https://github.com/shanksch/jobsa/blob/main/services/backend/app/core/auth.py): `services/backend/app/core/auth.py`

### Other components

- **Candidate**

## Connections

- Candidate → Career dashboard: manages profile
- Candidate → ATS extension: uses on ATS
- Career dashboard → Dashboard data access: loads career data
- Dashboard data access → Supabase client: uses client (evidence: `apps/web-dashboard/src/lib/api.ts`)
- Dashboard data access → Supabase and pgvector: CRUD via RLS
- Career dashboard → Supabase authentication: signs in
- ATS extension → Form detection and fill: fills fields (evidence: `apps/extension/src/content/widget.ts`)
- ATS extension → Extension service worker: dispatches actions
- ATS extension → Autofill endpoint: requests answers
- Career dashboard → Resume upload and import: uploads resume
- FastAPI routes → Resume upload and import: registers route (evidence: `services/backend/app/main.py`)
- FastAPI routes → Autofill endpoint: registers route (evidence: `services/backend/app/main.py`)
- FastAPI routes → Job match endpoint: registers route (evidence: `services/backend/app/main.py`)
- Resume upload and import → Resume parsing: parses resume (evidence: `services/backend/app/api/routes/resumes.py`)
- Resume upload and import → Resume file storage: stores file (evidence: `services/backend/app/api/routes/resumes.py`)
- Resume upload and import → Knowledge ingestion: reindexes data (evidence: `services/backend/app/api/routes/resumes.py`)
- Resume file storage → Supabase and pgvector: stores resume files
- Knowledge ingestion → Text chunking: chunks resume text (evidence: `services/backend/app/services/ingestion.py`)
- Knowledge ingestion → Text embeddings: embeds chunks (evidence: `services/backend/app/services/ingestion.py`)
- Knowledge ingestion → Supabase and pgvector: writes chunks (evidence: `services/backend/app/services/ingestion.py`)
- Autofill endpoint → RAG answer and match engine: generates answers (evidence: `services/backend/app/api/routes/autofill.py`)
- Job match endpoint → RAG answer and match engine: scores job match (evidence: `services/backend/app/api/routes/match.py`)
- RAG answer and match engine → Context retrieval: retrieves context (evidence: `services/backend/app/services/rag_engine.py`)
- Context retrieval → Text embeddings: embeds queries (evidence: `services/backend/app/services/retrieval.py`)
- Context retrieval → Supabase and pgvector: searches chunks
- RAG answer and match engine → LLM routing: requests generation (evidence: `services/backend/app/services/rag_engine.py`)
- LLM routing → Gemini and Groq: routes requests (evidence: `services/backend/app/core/llm_router.py`)
- Autofill endpoint → Supabase authentication: validates user (evidence: `services/backend/app/api/routes/autofill.py`)
- Job match endpoint → Supabase authentication: validates user (evidence: `services/backend/app/api/routes/match.py`)
- Resume upload and import → Supabase authentication: validates user (evidence: `services/backend/app/api/routes/resumes.py`)
- Application tracking → Dashboard data access: manages applications
- Career knowledge UI → Dashboard data access: edits career data (evidence: `apps/web-dashboard/src/pages/KnowledgeBasePage.tsx`)
- Resume management UI → Dashboard data access: manages resumes
