# elakiya2904/cafy-agent architecture

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

- Interactive diagram: https://gitdiagram.com/elakiya2904/cafy-agent
- Repository: https://github.com/elakiya2904/cafy-agent

## Overview

Cafy Agent is a UK job-search and application-management product. The main journey is to find vacancies, compare them with a parsed resume, tailor a grounded version, then track applications and recruiter communications. Separate capabilities add company/job research, career analysis, analytics, exports, and application-form autofill. The graph combines documented product behavior with the supplied source index and excerpts; unsampled service internals are represented by their exact paths, and uncertain connections are omitted.

Main entry points: [`backend/main.py`](https://github.com/elakiya2904/cafy-agent/blob/main/backend/main.py) (API runtime), [`backend/resume_service.py`](https://github.com/elakiya2904/cafy-agent/blob/main/backend/resume_service.py) (Resume parsing), [`backend/scrapers/scraper_manager.py`](https://github.com/elakiya2904/cafy-agent/blob/main/backend/scrapers/scraper_manager.py) (Scraper manager), [`backend/email_agent/service.py`](https://github.com/elakiya2904/cafy-agent/blob/main/backend/email_agent/service.py) (Email agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Job discovery"]
  node_job_feed["Job feed and filters<br/>[main.py]"]
  node_scrape_manager["Scraper manager<br/>[scraper_manager.py]"]
  node_job_normalizer["Job normalizer<br/>[job_normalizer.py]"]
  node_ats_sources["Employer ATS sources"]
  node_sponsor_check["Sponsor check<br/>[sponsor_service.py]"]
end

subgraph group_resume["Resume and matching"]
  node_resume_parse["Resume parsing<br/>[resume_service.py]"]
  node_profile_strength["Profile strength"]
  node_matching["Job matching"]
  node_tailoring["Resume tailoring"]
  node_resume_editor["Resume editor<br/>[ResumeEditor.jsx]"]
end

subgraph group_apply_track["Applications and email"]
  node_application_flow["Application assistant<br/>[service.py]"]
  node_extension["Form autofill extension<br/>[content.js]"]
  node_email_agent["Email agent<br/>[service.py]"]
  node_mail_calendar["Mail and calendar providers<br/>[providers.py]"]
end

subgraph group_insights["Research and insights"]
  node_job_intelligence["Job intelligence<br/>[service.py]"]
  node_career_analysis["Career analysis"]
  node_analytics["Personal analytics"]
end

subgraph group_platform["Accounts and platform"]
  node_app["Web application<br/>[App.jsx]"]
  node_api["API runtime<br/>[main.py]"]
  node_job_store[("Job and app data<br/>[database.py]")]
  node_export["My Files export<br/>[export_service.py]"]
  node_auth["Authentication<br/>[auth_service.py]"]
  node_llm["Groq language models"]
end

node_candidate(("Candidate"))

node_candidate -->|"uses"| node_app
node_app -.->|"requests"| node_api
node_api -->|"serves"| node_job_feed
node_api -->|"triggers"| node_scrape_manager
node_scrape_manager -->|"scrapes"| node_ats_sources
node_scrape_manager -->|"normalizes"| node_job_normalizer
node_api -->|"reads and writes"| node_job_store
node_candidate -->|"uploads resume"| node_resume_parse
node_api -->|"parses"| node_resume_parse
node_resume_parse -->|"scores profile"| node_profile_strength
node_resume_parse -->|"provides profile"| node_matching
node_candidate -->|"compares resume"| node_matching
node_candidate -->|"requests tailoring"| node_tailoring
node_api -->|"generates versions"| node_tailoring
node_tailoring -->|"requests rewrites"| node_llm
node_candidate -->|"edits resume"| node_resume_editor
node_app -->|"renders"| node_resume_editor
node_candidate -->|"reviews application"| node_application_flow
node_api -.->|"routes application flow"| node_application_flow
node_candidate -->|"reviews autofill"| node_extension
node_application_flow -.->|"tracks applications"| node_job_store
node_candidate -->|"approves drafts"| node_email_agent
node_email_agent -->|"uses providers"| node_mail_calendar
node_email_agent -.->|"updates statuses"| node_job_store
node_candidate -->|"requests research"| node_job_intelligence
node_api -.->|"serves intelligence"| node_job_intelligence
node_job_intelligence -.->|"requests analysis"| node_llm
node_candidate -->|"asks questions"| node_career_analysis
node_candidate -->|"views insights"| node_analytics
node_candidate -->|"exports files"| node_export
node_candidate -->|"signs in"| node_auth
node_api -->|"authenticates"| node_auth
node_api -.->|"checks sponsorship"| node_sponsor_check

click node_app "https://github.com/elakiya2904/cafy-agent/blob/main/frontend/src/App.jsx"
click node_api "https://github.com/elakiya2904/cafy-agent/blob/main/backend/main.py"
click node_job_feed "https://github.com/elakiya2904/cafy-agent/blob/main/backend/main.py"
click node_scrape_manager "https://github.com/elakiya2904/cafy-agent/blob/main/backend/scrapers/scraper_manager.py"
click node_job_normalizer "https://github.com/elakiya2904/cafy-agent/blob/main/backend/scrapers/job_normalizer.py"
click node_job_store "https://github.com/elakiya2904/cafy-agent/blob/main/backend/database.py"
click node_sponsor_check "https://github.com/elakiya2904/cafy-agent/blob/main/backend/sponsor_service.py"
click node_resume_parse "https://github.com/elakiya2904/cafy-agent/blob/main/backend/resume_service.py"
click node_profile_strength "https://github.com/elakiya2904/cafy-agent/blob/main/backend/profile_strength_service.py"
click node_matching "https://github.com/elakiya2904/cafy-agent/blob/main/backend/requirement_matching.py"
click node_tailoring "https://github.com/elakiya2904/cafy-agent/blob/main/backend/resume_generation_service.py"
click node_resume_editor "https://github.com/elakiya2904/cafy-agent/blob/main/frontend/src/ResumeEditor.jsx"
click node_application_flow "https://github.com/elakiya2904/cafy-agent/blob/main/backend/job_applications/service.py"
click node_extension "https://github.com/elakiya2904/cafy-agent/blob/main/frontend/extension/content.js"
click node_email_agent "https://github.com/elakiya2904/cafy-agent/blob/main/backend/email_agent/service.py"
click node_mail_calendar "https://github.com/elakiya2904/cafy-agent/blob/main/backend/email_agent/providers.py"
click node_job_intelligence "https://github.com/elakiya2904/cafy-agent/blob/main/backend/job_intelligence/service.py"
click node_career_analysis "https://github.com/elakiya2904/cafy-agent/blob/main/backend/career_intelligence_service.py"
click node_analytics "https://github.com/elakiya2904/cafy-agent/blob/main/backend/personal_analytics.py"
click node_export "https://github.com/elakiya2904/cafy-agent/blob/main/backend/export_service.py"
click node_auth "https://github.com/elakiya2904/cafy-agent/blob/main/backend/auth_service.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_feed,node_scrape_manager,node_job_normalizer,node_ats_sources,node_sponsor_check toneBlue
class node_resume_parse,node_profile_strength,node_matching,node_tailoring,node_resume_editor toneAmber
class node_application_flow,node_extension,node_email_agent,node_mail_calendar toneMint
class node_job_intelligence,node_career_analysis,node_analytics toneRose
class node_app,node_api,node_job_store,node_export,node_auth,node_llm,node_candidate toneIndigo
```

## Components

### Job discovery

- [Job feed and filters](https://github.com/elakiya2904/cafy-agent/blob/main/backend/main.py): `backend/main.py`
- [Scraper manager](https://github.com/elakiya2904/cafy-agent/blob/main/backend/scrapers/scraper_manager.py): `backend/scrapers/scraper_manager.py`
- [Job normalizer](https://github.com/elakiya2904/cafy-agent/blob/main/backend/scrapers/job_normalizer.py): `backend/scrapers/job_normalizer.py`
- **Employer ATS sources**
- [Sponsor check](https://github.com/elakiya2904/cafy-agent/blob/main/backend/sponsor_service.py): `backend/sponsor_service.py`

### Resume and matching

- [Resume parsing](https://github.com/elakiya2904/cafy-agent/blob/main/backend/resume_service.py): `backend/resume_service.py`
- [Profile strength](https://github.com/elakiya2904/cafy-agent/blob/main/backend/profile_strength_service.py): `backend/profile_strength_service.py`
- [Job matching](https://github.com/elakiya2904/cafy-agent/blob/main/backend/requirement_matching.py): `backend/requirement_matching.py`
- [Resume tailoring](https://github.com/elakiya2904/cafy-agent/blob/main/backend/resume_generation_service.py): `backend/resume_generation_service.py`
- [Resume editor](https://github.com/elakiya2904/cafy-agent/blob/main/frontend/src/ResumeEditor.jsx): `frontend/src/ResumeEditor.jsx`

### Applications and email

- [Application assistant](https://github.com/elakiya2904/cafy-agent/blob/main/backend/job_applications/service.py): `backend/job_applications/service.py`
- [Form autofill extension](https://github.com/elakiya2904/cafy-agent/blob/main/frontend/extension/content.js): `frontend/extension/content.js`
- [Email agent](https://github.com/elakiya2904/cafy-agent/blob/main/backend/email_agent/service.py): `backend/email_agent/service.py`
- [Mail and calendar providers](https://github.com/elakiya2904/cafy-agent/blob/main/backend/email_agent/providers.py): `backend/email_agent/providers.py`

### Research and insights

- [Job intelligence](https://github.com/elakiya2904/cafy-agent/blob/main/backend/job_intelligence/service.py): `backend/job_intelligence/service.py`
- [Career analysis](https://github.com/elakiya2904/cafy-agent/blob/main/backend/career_intelligence_service.py): `backend/career_intelligence_service.py`
- [Personal analytics](https://github.com/elakiya2904/cafy-agent/blob/main/backend/personal_analytics.py): `backend/personal_analytics.py`

### Accounts and platform

- [Web application](https://github.com/elakiya2904/cafy-agent/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API runtime](https://github.com/elakiya2904/cafy-agent/blob/main/backend/main.py): `backend/main.py`
- [Job and app data](https://github.com/elakiya2904/cafy-agent/blob/main/backend/database.py): `backend/database.py`
- [My Files export](https://github.com/elakiya2904/cafy-agent/blob/main/backend/export_service.py): `backend/export_service.py`
- [Authentication](https://github.com/elakiya2904/cafy-agent/blob/main/backend/auth_service.py): `backend/auth_service.py`
- **Groq language models**

### Other components

- **Candidate**

## Connections

- Candidate → Web application: uses (evidence: `README.md`)
- Web application → API runtime: requests
- API runtime → Job feed and filters: serves (evidence: `backend/main.py`)
- API runtime → Scraper manager: triggers (evidence: `backend/main.py`)
- Scraper manager → Employer ATS sources: scrapes (evidence: `backend/scrapers/scraper_manager.py`)
- Scraper manager → Job normalizer: normalizes (evidence: `backend/scrapers/scraper_manager.py`)
- API runtime → Job and app data: reads and writes (evidence: `backend/main.py`)
- Candidate → Resume parsing: uploads resume (evidence: `README.md`)
- API runtime → Resume parsing: parses (evidence: `backend/main.py`)
- Resume parsing → Profile strength: scores profile (evidence: `backend/profile_strength_service.py`)
- Resume parsing → Job matching: provides profile (evidence: `backend/requirement_matching.py`)
- Candidate → Job matching: compares resume (evidence: `README.md`)
- Candidate → Resume tailoring: requests tailoring (evidence: `README.md`)
- API runtime → Resume tailoring: generates versions (evidence: `backend/main.py`)
- Resume tailoring → Groq language models: requests rewrites (evidence: `backend/resume_generation_service.py`)
- Candidate → Resume editor: edits resume (evidence: `README.md`)
- Web application → Resume editor: renders (evidence: `frontend/src/App.jsx`)
- Candidate → Application assistant: reviews application (evidence: `README.md`)
- API runtime → Application assistant: routes application flow (evidence: `backend/main.py`)
- Candidate → Form autofill extension: reviews autofill (evidence: `README.md`)
- Application assistant → Job and app data: tracks applications
- Candidate → Email agent: approves drafts (evidence: `README.md`)
- Email agent → Mail and calendar providers: uses providers (evidence: `backend/email_agent/service.py`)
- Email agent → Job and app data: updates statuses
- Candidate → Job intelligence: requests research (evidence: `README.md`)
- API runtime → Job intelligence: serves intelligence (evidence: `backend/main.py`)
- Job intelligence → Groq language models: requests analysis
- Candidate → Career analysis: asks questions (evidence: `README.md`)
- Candidate → Personal analytics: views insights (evidence: `README.md`)
- Candidate → My Files export: exports files (evidence: `README.md`)
- Candidate → Authentication: signs in (evidence: `README.md`)
- API runtime → Authentication: authenticates (evidence: `backend/main.py`)
- API runtime → Sponsor check: checks sponsorship (evidence: `backend/main.py`)
