# bothomaje/clockedin architecture

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

- Interactive diagram: https://gitdiagram.com/bothomaje/clockedin
- Repository: https://github.com/bothomaje/clockedin

## Overview

clockedin is an Angular job-search workspace: users build a career profile, save opportunities, track applications, and prepare tailored documents for review. Its runtime also includes a separate job-ingestion worker and opportunity-discovery features. The README documents the broader workflow and AI capabilities; source evidence is sampled, so unverified subsystem links are omitted or marked dashed rather than inferred from naming alone.

Main entry points: [`src/app/domains/documents/data/ai/ai.service.ts`](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/ai.service.ts) (AI orchestration), [`src/app/app.routes.ts`](https://github.com/bothomaje/clockedin/blob/main/src/app/app.routes.ts) (App routing), [`src/app/domains/documents/feature/document-wizard-page/document-wizard-page.ts`](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/feature/document-wizard-page/document-wizard-page.ts) (Document wizard), [`src/app/domains/jobs/feature/jobs-list-page/jobs-list-page.ts`](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/jobs/feature/jobs-list-page/jobs-list-page.ts) (Job management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_routes["App routing<br/>[app.routes.ts]"]
  node_firebase["Firebase services<br/>[firebase.ts]"]
end

subgraph group_career["Identity and profile"]
  node_auth["Account access<br/>[auth.service.ts]"]
  node_profile["Career profile<br/>[profile.facade.ts]"]
  node_profile_store[("Profile repository")]
end

subgraph group_tracking["Jobs and applications"]
  node_job_ui["Job management<br/>[jobs-list-page.ts]"]
  node_job_store[("Job repository<br/>[job.repository.ts]")]
  node_applications["Application workspace"]
end

subgraph group_documents["AI documents"]
  node_documents_ui["Document wizard"]
  node_ai_service["AI orchestration<br/>[ai.service.ts]"]
  node_evidence["Evidence selection"]
  node_ai_provider["Provider contract<br/>[ai-provider.ts]"]
  node_gemini["Gemini provider"]
  node_webllm["Browser AI<br/>[webllm.provider.ts]"]
  node_transformers["Local analysis"]
  node_embedding["Embedding model<br/>[embedding-model.ts]"]
  node_cv_validation["CV validation<br/>[cv-validator.ts]"]
  node_pdf["PDF rendering<br/>[pdf-service.ts]"]
  node_generated_docs[("Saved document versions")]
end

subgraph group_discovery["Opportunity discovery"]
  node_explore["Opportunity exploration<br/>[explore-page.ts]"]
  node_ingestion["Job ingestion"]
  node_worker_firestore["Firestore client<br/>[client.ts]"]
end

node_user(("Job seeker"))
node_source{{"Job source"}}
node_firestore[("Cloud Firestore")]
node_gemini_service{{"Google Gemini"}}

node_user -->|"uses workspace"| node_routes
node_routes -->|"routes to account"| node_auth
node_routes -->|"routes to jobs"| node_job_ui
node_routes -->|"routes to applications"| node_applications
node_routes -->|"routes to explore"| node_explore
node_routes -->|"routes to documents"| node_documents_ui
node_user -->|"maintains profile"| node_profile
node_profile -.->|"persists profile"| node_profile_store
node_user -->|"saves opportunities"| node_job_ui
node_job_ui -.->|"stores job records"| node_job_store
node_user -->|"tracks applications"| node_applications
node_applications -->|"opens document builder"| node_documents_ui
node_user -->|"reviews and edits"| node_documents_ui
node_documents_ui -.->|"requests generation"| node_ai_service
node_ai_service -->|"selects profile evidence"| node_evidence
node_ai_service -->|"uses provider contract"| node_ai_provider
node_ai_service -->|"dispatches generation"| node_gemini
node_ai_service -->|"dispatches generation"| node_webllm
node_ai_service -->|"dispatches analysis"| node_transformers
node_transformers -->|"uses embeddings"| node_embedding
node_gemini -.->|"calls cloud model"| node_gemini_service
node_ai_service -->|"validates generated CV"| node_cv_validation
node_documents_ui -.->|"renders PDF"| node_pdf
node_documents_ui -.->|"stores versions"| node_generated_docs
node_user -->|"explores opportunities"| node_explore
node_source -->|"provides job listings"| node_ingestion
node_ingestion -.->|"writes accepted jobs"| node_worker_firestore
node_worker_firestore -->|"reads and writes"| node_firestore
node_explore -.->|"loads recommendations"| node_firestore
node_firebase -.->|"connects application"| node_firestore

click node_routes "https://github.com/bothomaje/clockedin/blob/main/src/app/app.routes.ts"
click node_firebase "https://github.com/bothomaje/clockedin/blob/main/src/app/core/firebase/firebase.ts"
click node_auth "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/identity/data/auth.service.ts"
click node_profile "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/profile/data/profile.facade.ts"
click node_profile_store "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/profile/data/repositories/profile.repository.ts"
click node_job_ui "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/jobs/feature/jobs-list-page/jobs-list-page.ts"
click node_job_store "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/jobs/data/repositories/job.repository.ts"
click node_applications "https://github.com/bothomaje/clockedin/blob/main/src/app/shells/workspace/feature/application-detail-page/application-detail-page.ts"
click node_documents_ui "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/feature/document-wizard-page/document-wizard-page.ts"
click node_ai_service "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/ai.service.ts"
click node_evidence "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/tasks/evidence-selection.task.ts"
click node_ai_provider "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/ai-provider.ts"
click node_gemini "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/providers/firebase-gemini.provider.ts"
click node_webllm "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/providers/webllm.provider.ts"
click node_transformers "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/providers/transformers.provider.ts"
click node_embedding "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/local/embedding-model.ts"
click node_cv_validation "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/validation/cv-validator.ts"
click node_pdf "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/pdf-service.ts"
click node_generated_docs "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/repositories/document.repository.ts"
click node_explore "https://github.com/bothomaje/clockedin/blob/main/src/app/domains/recommendations/feature/explore-page/explore-page.ts"
click node_ingestion "https://github.com/bothomaje/clockedin/blob/main/workers/job-ingestion/src/ingestion/ingestion.service.ts"
click node_worker_firestore "https://github.com/bothomaje/clockedin/blob/main/workers/job-ingestion/src/firestore/client.ts"

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_routes,node_firebase toneBlue
class node_auth,node_profile,node_profile_store,node_firestore toneAmber
class node_job_ui,node_job_store,node_applications toneMint
class node_documents_ui,node_ai_service,node_evidence,node_ai_provider,node_gemini,node_webllm,node_transformers,node_embedding,node_cv_validation,node_pdf,node_generated_docs toneRose
class node_explore,node_ingestion,node_worker_firestore,node_user,node_source,node_gemini_service toneIndigo
```

## Components

### Application shell

- [App routing](https://github.com/bothomaje/clockedin/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Firebase services](https://github.com/bothomaje/clockedin/blob/main/src/app/core/firebase/firebase.ts): `src/app/core/firebase/firebase.ts`

### Identity and profile

- [Account access](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/identity/data/auth.service.ts): `src/app/domains/identity/data/auth.service.ts`
- [Career profile](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/profile/data/profile.facade.ts): `src/app/domains/profile/data/profile.facade.ts`
- [Profile repository](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/profile/data/repositories/profile.repository.ts): `src/app/domains/profile/data/repositories/profile.repository.ts`

### Jobs and applications

- [Job management](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/jobs/feature/jobs-list-page/jobs-list-page.ts): `src/app/domains/jobs/feature/jobs-list-page/jobs-list-page.ts`
- [Job repository](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/jobs/data/repositories/job.repository.ts): `src/app/domains/jobs/data/repositories/job.repository.ts`
- [Application workspace](https://github.com/bothomaje/clockedin/blob/main/src/app/shells/workspace/feature/application-detail-page/application-detail-page.ts): `src/app/shells/workspace/feature/application-detail-page/application-detail-page.ts`

### AI documents

- [Document wizard](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/feature/document-wizard-page/document-wizard-page.ts): `src/app/domains/documents/feature/document-wizard-page/document-wizard-page.ts`
- [AI orchestration](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/ai.service.ts): `src/app/domains/documents/data/ai/ai.service.ts`
- [Evidence selection](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/tasks/evidence-selection.task.ts): `src/app/domains/documents/data/ai/tasks/evidence-selection.task.ts`
- [Provider contract](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/ai-provider.ts): `src/app/domains/documents/data/ai/ai-provider.ts`
- [Gemini provider](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/providers/firebase-gemini.provider.ts): `src/app/domains/documents/data/ai/providers/firebase-gemini.provider.ts`
- [Browser AI](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/providers/webllm.provider.ts): `src/app/domains/documents/data/ai/providers/webllm.provider.ts`
- [Local analysis](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/providers/transformers.provider.ts): `src/app/domains/documents/data/ai/providers/transformers.provider.ts`
- [Embedding model](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/ai/local/embedding-model.ts): `src/app/domains/documents/data/ai/local/embedding-model.ts`
- [CV validation](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/validation/cv-validator.ts): `src/app/domains/documents/data/validation/cv-validator.ts`
- [PDF rendering](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/pdf-service.ts): `src/app/domains/documents/data/pdf-service.ts`
- [Saved document versions](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/documents/data/repositories/document.repository.ts): `src/app/domains/documents/data/repositories/document.repository.ts`

### Opportunity discovery

- [Opportunity exploration](https://github.com/bothomaje/clockedin/blob/main/src/app/domains/recommendations/feature/explore-page/explore-page.ts): `src/app/domains/recommendations/feature/explore-page/explore-page.ts`
- [Job ingestion](https://github.com/bothomaje/clockedin/blob/main/workers/job-ingestion/src/ingestion/ingestion.service.ts): `workers/job-ingestion/src/ingestion/ingestion.service.ts`
- [Firestore client](https://github.com/bothomaje/clockedin/blob/main/workers/job-ingestion/src/firestore/client.ts): `workers/job-ingestion/src/firestore/client.ts`

### Other components

- **Job seeker**
- **Job source**
- **Cloud Firestore**
- **Google Gemini**

## Connections

- Job seeker → App routing: uses workspace
- App routing → Account access: routes to account (evidence: `src/app/app.routes.ts`)
- App routing → Job management: routes to jobs (evidence: `src/app/app.routes.ts`)
- App routing → Application workspace: routes to applications (evidence: `src/app/app.routes.ts`)
- App routing → Opportunity exploration: routes to explore (evidence: `src/app/app.routes.ts`)
- App routing → Document wizard: routes to documents
- Job seeker → Career profile: maintains profile
- Career profile → Profile repository: persists profile
- Job seeker → Job management: saves opportunities
- Job management → Job repository: stores job records
- Job seeker → Application workspace: tracks applications
- Application workspace → Document wizard: opens document builder
- Job seeker → Document wizard: reviews and edits
- Document wizard → AI orchestration: requests generation
- AI orchestration → Evidence selection: selects profile evidence (evidence: `src/app/domains/documents/data/ai/ai.service.ts`)
- AI orchestration → Provider contract: uses provider contract (evidence: `src/app/domains/documents/data/ai/ai.service.ts`)
- AI orchestration → Gemini provider: dispatches generation (evidence: `src/app/domains/documents/data/ai/ai.service.ts`)
- AI orchestration → Browser AI: dispatches generation (evidence: `src/app/domains/documents/data/ai/ai.service.ts`)
- AI orchestration → Local analysis: dispatches analysis (evidence: `src/app/domains/documents/data/ai/ai.service.ts`)
- Local analysis → Embedding model: uses embeddings (evidence: `src/app/domains/documents/data/ai/providers/transformers.provider.ts`)
- Gemini provider → Google Gemini: calls cloud model
- AI orchestration → CV validation: validates generated CV (evidence: `src/app/domains/documents/data/ai/ai.service.ts`)
- Document wizard → PDF rendering: renders PDF
- Document wizard → Saved document versions: stores versions
- Job seeker → Opportunity exploration: explores opportunities
- Job source → Job ingestion: provides job listings (evidence: `workers/job-ingestion/src/ingestion/ingestion.service.ts`)
- Job ingestion → Firestore client: writes accepted jobs
- Firestore client → Cloud Firestore: reads and writes (evidence: `workers/job-ingestion/src/firestore/client.ts`)
- Opportunity exploration → Cloud Firestore: loads recommendations
- Firebase services → Cloud Firestore: connects application
