# marcle-bert26-ui/jobtracker-ai architecture

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

- Interactive diagram: https://gitdiagram.com/marcle-bert26-ui/jobtracker-ai
- Repository: https://github.com/marcle-bert26-ui/jobtracker-ai

## Overview

JobTracker AI centralizes job applications and supports a principal workflow of recording and tracking an application, then reviewing its status and follow-ups. Email synchronization can detect recruiting events and attach them to applications; users can correct or merge records, manage documents and profile data, and review reminders and statistics. The Next.js interface uses a centralized API configuration to reach a FastAPI backend backed by local SQLite. The README documents these capabilities; some route and service relationships below rely on SOURCE INDEX references rather than inspected implementation excerpts.

Main entry points: [`backend/main.py`](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/main.py) (FastAPI application), [`frontend/lib/api.ts`](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/lib/api.ts) (API client), [`backend/database.py`](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/database.py) (SQLite database), [`backend/routes/emails.py`](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/routes/emails.py) (Email routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User interface"]
  node_dashboard["Applications dashboard<br/>[page.tsx]"]
  node_kanban["Kanban board<br/>[KanbanBoard.tsx]"]
  node_application_detail["Application detail<br/>[page.tsx]"]
  node_email_ui["Email journal<br/>[page.tsx]"]
  node_duplicates_ui["Duplicate review<br/>[page.tsx]"]
  node_profile_ui["Profile editor<br/>[page.tsx]"]
  node_spontaneous_ui["Spontaneous applications<br/>[page.tsx]"]
  node_reminders_ui["Reminders view<br/>[page.tsx]"]
  node_stats_ui["Statistics view<br/>[page.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_api["API and records"]
  node_fastapi["FastAPI application<br/>[main.py]"]
  node_application_routes["Application routes<br/>[applications.py]"]
  node_history_routes["History routes<br/>[history.py]"]
  node_matching["Application matching<br/>[matching.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_database[("SQLite database<br/>[database.py]")]
end

subgraph group_email["Email intelligence"]
  node_email_routes["Email routes<br/>[emails.py]"]
  node_email_sync["Email synchronization<br/>[email_sync.py]"]
  node_classifier["AI email classifier<br/>[ai_classifier.py]"]
  node_corrections["Extraction corrections<br/>[corrections.py]"]
  node_graph_auth["Microsoft Graph auth<br/>[graph_auth.py]"]
end

subgraph group_documents["Documents and profile"]
  node_document_routes["Document routes<br/>[documents.py]"]
  node_profile_routes["Profile routes<br/>[profile.py]"]
  node_document_generator["Document generation"]
  node_pdf_generator["PDF generation<br/>[pdf_generator.py]"]
  node_cv_extraction["CV extraction<br/>[cv_extraction.py]"]
end

subgraph group_insights["Follow-up and insights"]
  node_reminder_routes["Reminder routes<br/>[reminders.py]"]
  node_stats_service["Statistics service<br/>[stats.py]"]
  node_reminder_service["Reminder logic<br/>[reminders.py]"]
end

node_user(("Job seeker"))
node_microsoft_graph{{"Microsoft Graph"}}
node_ollama{{"Ollama / local AI"}}

node_user -->|"manages applications"| node_dashboard
node_dashboard -->|"requests data"| node_api_client
node_dashboard -->|"renders board"| node_kanban
node_user -->|"opens application"| node_application_detail
node_application_detail -->|"requests data"| node_api_client
node_user -->|"reviews email"| node_email_ui
node_email_ui -->|"requests data"| node_api_client
node_user -->|"reviews duplicates"| node_duplicates_ui
node_duplicates_ui -->|"requests data"| node_api_client
node_user -->|"manages profile"| node_profile_ui
node_profile_ui -->|"requests data"| node_api_client
node_user -->|"starts outreach"| node_spontaneous_ui
node_spontaneous_ui -->|"requests data"| node_api_client
node_user -->|"reviews reminders"| node_reminders_ui
node_reminders_ui -->|"requests data"| node_api_client
node_user -->|"reviews statistics"| node_stats_ui
node_stats_ui -->|"requests data"| node_api_client
node_api_client -->|"calls API"| node_fastapi
node_fastapi -->|"registers routes"| node_application_routes
node_fastapi -->|"registers routes"| node_document_routes
node_fastapi -->|"registers routes"| node_email_routes
node_fastapi -->|"registers routes"| node_profile_routes
node_fastapi -->|"registers routes"| node_reminder_routes
node_fastapi -->|"registers routes"| node_history_routes
node_fastapi -->|"initializes schema"| node_database
node_models -->|"uses base"| node_database
node_application_routes -->|"uses matching"| node_matching
node_application_routes -->|"uses statistics"| node_stats_service
node_email_routes -->|"starts synchronization"| node_email_sync
node_email_routes -->|"uses classifier"| node_classifier
node_email_routes -->|"uses corrections"| node_corrections
node_email_sync -->|"gets tokens"| node_graph_auth
node_email_sync -->|"classifies messages"| node_classifier
node_email_sync -->|"uses examples"| node_corrections
node_email_sync -->|"matches applications"| node_matching
node_graph_auth -.->|"authorizes access"| node_microsoft_graph
node_classifier -.->|"uses local AI"| node_ollama
node_document_routes -->|"generates documents"| node_document_generator
node_document_routes -->|"generates PDFs"| node_pdf_generator
node_document_routes -->|"uses matching"| node_matching
node_profile_routes -->|"extracts CV data"| node_cv_extraction
node_reminder_routes -->|"uses reminder logic"| node_reminder_service
node_application_routes -->|"reads and writes"| node_database
node_email_routes -->|"reads and writes"| node_database
node_document_routes -->|"reads and writes"| node_database
node_profile_routes -->|"reads and writes"| node_database
node_reminder_routes -->|"reads and writes"| node_database
node_history_routes -->|"reads and writes"| node_database

click node_dashboard "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/page.tsx"
click node_kanban "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/components/KanbanBoard.tsx"
click node_application_detail "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/applications/%5Bid%5D/page.tsx"
click node_email_ui "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/emails/page.tsx"
click node_duplicates_ui "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/duplicates/page.tsx"
click node_profile_ui "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/profile/page.tsx"
click node_spontaneous_ui "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/spontaneous/page.tsx"
click node_reminders_ui "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/reminders/page.tsx"
click node_stats_ui "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/stats/page.tsx"
click node_api_client "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/lib/api.ts"
click node_fastapi "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/main.py"
click node_application_routes "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/routes/applications.py"
click node_document_routes "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/routes/documents.py"
click node_email_routes "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/routes/emails.py"
click node_profile_routes "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/routes/profile.py"
click node_reminder_routes "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/routes/reminders.py"
click node_history_routes "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/routes/history.py"
click node_matching "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/matching.py"
click node_stats_service "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/stats.py"
click node_email_sync "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/email_sync.py"
click node_classifier "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/ai_classifier.py"
click node_corrections "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/corrections.py"
click node_graph_auth "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/graph_auth.py"
click node_document_generator "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/document_generator.py"
click node_pdf_generator "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/pdf_generator.py"
click node_cv_extraction "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/cv_extraction.py"
click node_reminder_service "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/reminders.py"
click node_models "https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/models.py"
click node_database "https://github.com/marcle-bert26-ui/jobtracker-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_dashboard,node_kanban,node_application_detail,node_email_ui,node_duplicates_ui,node_profile_ui,node_spontaneous_ui,node_reminders_ui,node_stats_ui,node_api_client toneBlue
class node_fastapi,node_application_routes,node_history_routes,node_matching,node_models,node_database toneAmber
class node_email_routes,node_email_sync,node_classifier,node_corrections,node_graph_auth toneMint
class node_document_routes,node_profile_routes,node_document_generator,node_pdf_generator,node_cv_extraction toneRose
class node_reminder_routes,node_stats_service,node_reminder_service,node_user,node_microsoft_graph,node_ollama toneIndigo
```

## Components

### User interface

- [Applications dashboard](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/page.tsx): `frontend/app/page.tsx`
- [Kanban board](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/components/KanbanBoard.tsx): `frontend/app/components/KanbanBoard.tsx`
- [Application detail](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/applications/%5Bid%5D/page.tsx): `frontend/app/applications/[id]/page.tsx`
- [Email journal](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/emails/page.tsx): `frontend/app/emails/page.tsx`
- [Duplicate review](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/duplicates/page.tsx): `frontend/app/duplicates/page.tsx`
- [Profile editor](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/profile/page.tsx): `frontend/app/profile/page.tsx`
- [Spontaneous applications](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/spontaneous/page.tsx): `frontend/app/spontaneous/page.tsx`
- [Reminders view](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/reminders/page.tsx): `frontend/app/reminders/page.tsx`
- [Statistics view](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/app/stats/page.tsx): `frontend/app/stats/page.tsx`
- [API client](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/frontend/lib/api.ts): `frontend/lib/api.ts`

### API and records

- [FastAPI application](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/main.py): `backend/main.py`
- [Application routes](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/routes/applications.py): `backend/routes/applications.py`
- [History routes](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/routes/history.py): `backend/routes/history.py`
- [Application matching](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/matching.py): `backend/services/matching.py`
- [Domain models](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/models.py): `backend/models.py`
- [SQLite database](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/database.py): `backend/database.py`

### Email intelligence

- [Email routes](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/routes/emails.py): `backend/routes/emails.py`
- [Email synchronization](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/email_sync.py): `backend/services/email_sync.py`
- [AI email classifier](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/ai_classifier.py): `backend/services/ai_classifier.py`
- [Extraction corrections](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/corrections.py): `backend/services/corrections.py`
- [Microsoft Graph auth](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/graph_auth.py): `backend/graph_auth.py`

### Documents and profile

- [Document routes](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/routes/documents.py): `backend/routes/documents.py`
- [Profile routes](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/routes/profile.py): `backend/routes/profile.py`
- [Document generation](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/document_generator.py): `backend/services/document_generator.py`
- [PDF generation](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/pdf_generator.py): `backend/services/pdf_generator.py`
- [CV extraction](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/cv_extraction.py): `backend/services/cv_extraction.py`

### Follow-up and insights

- [Reminder routes](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/routes/reminders.py): `backend/routes/reminders.py`
- [Statistics service](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/stats.py): `backend/services/stats.py`
- [Reminder logic](https://github.com/marcle-bert26-ui/jobtracker-ai/blob/main/backend/services/reminders.py): `backend/services/reminders.py`

### Other components

- **Job seeker**
- **Microsoft Graph**
- **Ollama / local AI**

## Connections

- Job seeker → Applications dashboard: manages applications (evidence: `README.md`)
- Applications dashboard → API client: requests data (evidence: `frontend/app/page.tsx`)
- Applications dashboard → Kanban board: renders board (evidence: `frontend/app/page.tsx`)
- Job seeker → Application detail: opens application
- Application detail → API client: requests data (evidence: `frontend/app/applications/[id]/page.tsx`)
- Job seeker → Email journal: reviews email (evidence: `README.md`)
- Email journal → API client: requests data (evidence: `frontend/app/emails/page.tsx`)
- Job seeker → Duplicate review: reviews duplicates (evidence: `README.md`)
- Duplicate review → API client: requests data (evidence: `frontend/app/duplicates/page.tsx`)
- Job seeker → Profile editor: manages profile (evidence: `README.md`)
- Profile editor → API client: requests data (evidence: `frontend/app/profile/page.tsx`)
- Job seeker → Spontaneous applications: starts outreach (evidence: `README.md`)
- Spontaneous applications → API client: requests data (evidence: `frontend/app/spontaneous/page.tsx`)
- Job seeker → Reminders view: reviews reminders (evidence: `README.md`)
- Reminders view → API client: requests data (evidence: `frontend/app/reminders/page.tsx`)
- Job seeker → Statistics view: reviews statistics (evidence: `README.md`)
- Statistics view → API client: requests data (evidence: `frontend/app/stats/page.tsx`)
- API client → FastAPI application: calls API (evidence: `README.md`)
- FastAPI application → Application routes: registers routes (evidence: `backend/main.py`)
- FastAPI application → Document routes: registers routes (evidence: `backend/main.py`)
- FastAPI application → Email routes: registers routes (evidence: `backend/main.py`)
- FastAPI application → Profile routes: registers routes (evidence: `backend/main.py`)
- FastAPI application → Reminder routes: registers routes (evidence: `backend/main.py`)
- FastAPI application → History routes: registers routes (evidence: `backend/main.py`)
- FastAPI application → SQLite database: initializes schema (evidence: `backend/main.py`)
- Domain models → SQLite database: uses base (evidence: `backend/models.py`)
- Application routes → Application matching: uses matching (evidence: `backend/routes/applications.py`)
- Application routes → Statistics service: uses statistics (evidence: `backend/routes/applications.py`)
- Email routes → Email synchronization: starts synchronization (evidence: `backend/routes/emails.py`)
- Email routes → AI email classifier: uses classifier (evidence: `backend/routes/emails.py`)
- Email routes → Extraction corrections: uses corrections (evidence: `backend/routes/emails.py`)
- Email synchronization → Microsoft Graph auth: gets tokens (evidence: `backend/services/email_sync.py`)
- Email synchronization → AI email classifier: classifies messages (evidence: `backend/services/email_sync.py`)
- Email synchronization → Extraction corrections: uses examples (evidence: `backend/services/email_sync.py`)
- Email synchronization → Application matching: matches applications (evidence: `backend/services/email_sync.py`)
- Microsoft Graph auth → Microsoft Graph: authorizes access (evidence: `backend/graph_auth.py`)
- AI email classifier → Ollama / local AI: uses local AI (evidence: `README.md`)
- Document routes → Document generation: generates documents (evidence: `backend/routes/documents.py`)
- Document routes → PDF generation: generates PDFs (evidence: `backend/routes/documents.py`)
- Document routes → Application matching: uses matching (evidence: `backend/routes/documents.py`)
- Profile routes → CV extraction: extracts CV data (evidence: `backend/routes/profile.py`)
- Reminder routes → Reminder logic: uses reminder logic (evidence: `backend/routes/reminders.py`)
- Application routes → SQLite database: reads and writes (evidence: `backend/routes/applications.py`)
- Email routes → SQLite database: reads and writes (evidence: `backend/routes/emails.py`)
- Document routes → SQLite database: reads and writes (evidence: `backend/routes/documents.py`)
- Profile routes → SQLite database: reads and writes (evidence: `backend/routes/profile.py`)
- Reminder routes → SQLite database: reads and writes (evidence: `backend/routes/reminders.py`)
- History routes → SQLite database: reads and writes (evidence: `backend/routes/history.py`)
