# ivanpavlovic-web/worksync-ai architecture

> Architecture diagram of the GitHub repository ivanpavlovic-web/worksync-ai, 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/ivanpavlovic-web/worksync-ai
- Repository: https://github.com/ivanpavlovic-web/worksync-ai

## Overview

WorkSync is a locally run job-search and candidate-application platform. Its main flow collects listings from job boards and ATS sources, enriches and stores them, then exposes searchable jobs for candidates to save and track; queued applications can be autofilled through ATS-specific adapters. Candidate profiles, CV parsing, matching, and generated career-blog content are supporting capabilities. The README documents SQL, cosine-similarity and keyword search; sampled code confirms the scraping, enrichment, persistence, and application-queue flows, but not all API-to-service wiring.

Main entry points: [`backend/app/database.py`](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/database.py) (Job database), [`backend/app/main.py`](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/main.py) (FastAPI app), [`backend/app/workers/tasks.py`](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/workers/tasks.py) (Scrape workers), [`backend/app/api/applications.py`](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/applications.py) (Application tracking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Job collection"]
  node_job_sources["Job sources"]
  node_scraper_registry["Scraper registry<br/>[registry.py]"]
  node_scrape_workers["Scrape workers<br/>[tasks.py]"]
  node_job_enrichment["Job enrichment<br/>[pipeline.py]"]
end

subgraph group_candidate["Candidate experience"]
  node_public_jobs["Public job API<br/>[public.py]"]
  node_search_api["Search API<br/>[search.py]"]
  node_matching["Job matching<br/>[matching.py]"]
  node_frontend["Web app"]
  node_api_client["API client<br/>[api.ts]"]
  node_auth_api["Authentication<br/>[auth.py]"]
  node_profile_api["Candidate profiles<br/>[profile.py]"]
  node_ai_api["AI features<br/>[ai.py]"]
  node_cv_parser["CV parser<br/>[cv_parser.py]"]
end

subgraph group_apply["Applications"]
  node_application_api["Application tracking<br/>[applications.py]"]
  node_apply_queue["Apply queue<br/>[queue.py]"]
  node_apply_worker["Apply worker<br/>[tasks.py]"]
  node_apply_adapters["ATS adapters"]
end

subgraph group_platform["Platform services"]
  node_job_store[("Job database<br/>[database.py]")]
  node_backend_api["FastAPI app<br/>[main.py]"]
  node_search_index[("Search index<br/>[meili.py]")]
  node_celery["Celery broker<br/>[celery_app.py]"]
end

subgraph group_content["Career content"]
  node_blog_api["Blog API<br/>[blog.py]"]
  node_blog_worker["Blog generation<br/>[blog_tasks.py]"]
end

node_candidate_user(("Candidate"))
node_application_sites(("Employer sites"))

node_job_sources -->|"provides scrapers"| node_scraper_registry
node_scrape_workers -->|"selects scrapers"| node_scraper_registry
node_scrape_workers -->|"fetches listings"| node_job_sources
node_scrape_workers -->|"enriches records"| node_job_enrichment
node_scrape_workers -->|"persists jobs"| node_job_store
node_backend_api -->|"mounts routes"| node_public_jobs
node_backend_api -->|"mounts routes"| node_search_api
node_backend_api -->|"mounts routes"| node_auth_api
node_backend_api -->|"mounts routes"| node_profile_api
node_backend_api -->|"mounts routes"| node_ai_api
node_backend_api -->|"mounts routes"| node_application_api
node_frontend -->|"uses client"| node_api_client
node_api_client -->|"calls API"| node_backend_api
node_candidate_user -->|"uses"| node_frontend
node_search_api -->|"queries jobs"| node_job_store
node_public_jobs -->|"reads jobs"| node_job_store
node_matching -->|"matches records"| node_job_store
node_scrape_workers -->|"syncs listings"| node_search_index
node_auth_api -->|"stores accounts"| node_job_store
node_profile_api -->|"reads and writes"| node_job_store
node_ai_api -->|"parses CV text"| node_cv_parser
node_application_api -->|"tracks applications"| node_job_store
node_application_api -->|"enqueues apply"| node_apply_queue
node_apply_worker -->|"pops tasks"| node_apply_queue
node_apply_worker -->|"loads job and vault"| node_job_store
node_apply_worker -->|"dispatches to"| node_apply_adapters
node_apply_adapters -.->|"fills applications"| node_application_sites
node_blog_worker -->|"reads listings"| node_job_store
node_blog_api -->|"reads posts"| node_job_store

click node_job_sources "https://github.com/ivanpavlovic-web/worksync-ai/tree/main/backend/app/scrapers"
click node_scraper_registry "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/scrapers/registry.py"
click node_scrape_workers "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/workers/tasks.py"
click node_job_enrichment "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/classifier/pipeline.py"
click node_job_store "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/database.py"
click node_backend_api "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/main.py"
click node_public_jobs "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/public.py"
click node_search_api "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/search.py"
click node_matching "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/services/matching.py"
click node_search_index "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/services/meili.py"
click node_frontend "https://github.com/ivanpavlovic-web/worksync-ai/tree/main/frontend/app"
click node_api_client "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/frontend/lib/api.ts"
click node_auth_api "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/auth.py"
click node_profile_api "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/profile.py"
click node_ai_api "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/ai.py"
click node_cv_parser "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/ai/cv_parser.py"
click node_application_api "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/applications.py"
click node_apply_queue "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/autopilot/queue.py"
click node_apply_worker "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/workers/tasks.py"
click node_apply_adapters "https://github.com/ivanpavlovic-web/worksync-ai/tree/main/backend/app/autopilot/adapters"
click node_blog_api "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/blog.py"
click node_blog_worker "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/workers/blog_tasks.py"
click node_celery "https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/workers/celery_app.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_job_sources,node_scraper_registry,node_scrape_workers,node_job_enrichment toneBlue
class node_public_jobs,node_search_api,node_matching,node_frontend,node_api_client,node_auth_api,node_profile_api,node_ai_api,node_cv_parser toneAmber
class node_application_api,node_apply_queue,node_apply_worker,node_apply_adapters toneMint
class node_job_store,node_backend_api,node_search_index,node_celery toneRose
class node_blog_api,node_blog_worker,node_candidate_user,node_application_sites toneIndigo
```

## Components

### Job collection

- [Job sources](https://github.com/ivanpavlovic-web/worksync-ai/tree/main/backend/app/scrapers): `backend/app/scrapers`
- [Scraper registry](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/scrapers/registry.py): `backend/app/scrapers/registry.py`
- [Scrape workers](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/workers/tasks.py): `backend/app/workers/tasks.py`
- [Job enrichment](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/classifier/pipeline.py): `backend/app/classifier/pipeline.py`

### Candidate experience

- [Public job API](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/public.py): `backend/app/api/public.py`
- [Search API](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/search.py): `backend/app/api/search.py`
- [Job matching](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/services/matching.py): `backend/app/services/matching.py`
- [Web app](https://github.com/ivanpavlovic-web/worksync-ai/tree/main/frontend/app): `frontend/app`
- [API client](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/frontend/lib/api.ts): `frontend/lib/api.ts`
- [Authentication](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/auth.py): `backend/app/api/auth.py`
- [Candidate profiles](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/profile.py): `backend/app/api/profile.py`
- [AI features](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/ai.py): `backend/app/api/ai.py`
- [CV parser](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/ai/cv_parser.py): `backend/app/ai/cv_parser.py`

### Applications

- [Application tracking](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/applications.py): `backend/app/api/applications.py`
- [Apply queue](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/autopilot/queue.py): `backend/app/autopilot/queue.py`
- [Apply worker](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/workers/tasks.py): `backend/app/workers/tasks.py`
- [ATS adapters](https://github.com/ivanpavlovic-web/worksync-ai/tree/main/backend/app/autopilot/adapters): `backend/app/autopilot/adapters`

### Platform services

- [Job database](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/database.py): `backend/app/database.py`
- [FastAPI app](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [Search index](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/services/meili.py): `backend/app/services/meili.py`
- [Celery broker](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/workers/celery_app.py): `backend/app/workers/celery_app.py`

### Career content

- [Blog API](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/api/blog.py): `backend/app/api/blog.py`
- [Blog generation](https://github.com/ivanpavlovic-web/worksync-ai/blob/main/backend/app/workers/blog_tasks.py): `backend/app/workers/blog_tasks.py`

### Other components

- **Candidate**
- **Employer sites**

## Connections

- Job sources → Scraper registry: provides scrapers
- Scrape workers → Scraper registry: selects scrapers
- Scrape workers → Job sources: fetches listings
- Scrape workers → Job enrichment: enriches records
- Scrape workers → Job database: persists jobs
- FastAPI app → Public job API: mounts routes
- FastAPI app → Search API: mounts routes
- FastAPI app → Authentication: mounts routes
- FastAPI app → Candidate profiles: mounts routes
- FastAPI app → AI features: mounts routes
- FastAPI app → Application tracking: mounts routes
- Web app → API client: uses client
- API client → FastAPI app: calls API
- Candidate → Web app: uses
- Search API → Job database: queries jobs
- Public job API → Job database: reads jobs
- Job matching → Job database: matches records
- Scrape workers → Search index: syncs listings
- Authentication → Job database: stores accounts
- Candidate profiles → Job database: reads and writes
- AI features → CV parser: parses CV text
- Application tracking → Job database: tracks applications
- Application tracking → Apply queue: enqueues apply
- Apply worker → Apply queue: pops tasks
- Apply worker → Job database: loads job and vault
- Apply worker → ATS adapters: dispatches to
- ATS adapters → Employer sites: fills applications
- Blog generation → Job database: reads listings
- Blog API → Job database: reads posts
