# ankitsharma34/jobastra-ai architecture

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

- Interactive diagram: https://gitdiagram.com/ankitsharma34/jobastra-ai
- Repository: https://github.com/ankitsharma34/jobastra-ai

## Overview

JobAstra AI is a FastAPI service for AI-powered career-profile extraction, job-description extraction, job matching, and career-profile knowledge indexing. The main workflow enters through the API, which wires feature services to prompt builders and a shared provider-neutral LLM boundary; knowledge indexing separately builds and chunks documents for vector storage. The README also mentions job-fit analysis, personalized application generation, and agentic workflows, but the sampled tree does not identify their implementations. Relationships for unsampled routes and infrastructure follow the README or SOURCE INDEX references; uncertain integrations are omitted.

Main entry points: [`src/jobastra_ai/api/dependencies.py`](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/api/dependencies.py) (Service wiring), [`src/jobastra_ai/main.py`](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/main.py) (FastAPI app), [`src/jobastra_ai/llm/services.py`](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/llm/services.py) (LLM boundary), [`src/jobastra_ai/career/service.py`](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/career/service.py) (Profile extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API layer"]
  node_app["FastAPI app<br/>[main.py]"]
  node_career_route["Career routes<br/>[career.py]"]
  node_jobs_route["Job routes<br/>[jobs.py]"]
  node_matching_route["Matching routes<br/>[matching.py]"]
  node_knowledge_route["Knowledge routes<br/>[knowledge.py]"]
  node_health_route["Health route<br/>[health.py]"]
  node_dependencies["Service wiring<br/>[dependencies.py]"]
end

subgraph group_features["AI features"]
  node_career_service["Profile extraction<br/>[service.py]"]
  node_career_prompt["Career prompts<br/>[prompts.py]"]
  node_career_schema["Career profile schema<br/>[schemas.py]"]
  node_jobs_service["Job extraction<br/>[service.py]"]
  node_jobs_prompt["Job prompts<br/>[prompts.py]"]
  node_jobs_schema["Job schema<br/>[schemas.py]"]
  node_matching_service["Job matching<br/>[service.py]"]
  node_matching_prompt["Matching prompts<br/>[prompts.py]"]
  node_matching_schema["Match schema<br/>[schemas.py]"]
end

subgraph group_knowledge["Career knowledge"]
  node_knowledge_service["Knowledge indexing<br/>[service.py]"]
  node_knowledge_docs["Career documents<br/>[documents.py]"]
  node_chunking["Document chunking<br/>[chunking.py]"]
  node_vector_store[("Career vector store<br/>[store.py]")]
  node_embedding_models["Embedding models<br/>[models.py]"]
end

subgraph group_shared["Shared AI services"]
  node_llm_service["LLM boundary<br/>[services.py]"]
  node_llm_schemas["LLM messages<br/>[schemas.py]"]
  node_llm_models["Chat model setup<br/>[models.py]"]
  node_prompt_templates["Prompt templates<br/>[templates.py]"]
  node_prompt_registry["Prompt registry<br/>[registry.py]"]
end

node_client(("Platform client"))

node_client -.->|"calls API"| node_app
node_app -->|"registers"| node_career_route
node_app -->|"registers"| node_jobs_route
node_app -->|"registers"| node_matching_route
node_app -->|"registers"| node_knowledge_route
node_app -->|"registers"| node_health_route
node_career_route -->|"resolves services"| node_dependencies
node_jobs_route -->|"resolves services"| node_dependencies
node_matching_route -->|"resolves services"| node_dependencies
node_knowledge_route -->|"resolves services"| node_dependencies
node_dependencies -->|"constructs"| node_career_service
node_dependencies -->|"constructs"| node_jobs_service
node_dependencies -->|"constructs"| node_matching_service
node_dependencies -->|"constructs"| node_knowledge_service
node_dependencies -->|"constructs"| node_llm_service
node_career_route -->|"invokes"| node_career_service
node_jobs_route -->|"invokes"| node_jobs_service
node_matching_route -->|"invokes"| node_matching_service
node_knowledge_route -->|"invokes"| node_knowledge_service
node_career_service -->|"builds request"| node_career_prompt
node_career_service -->|"invokes structured"| node_llm_service
node_career_service -->|"validates output"| node_career_schema
node_jobs_service -->|"builds request"| node_jobs_prompt
node_jobs_service -->|"invokes structured"| node_llm_service
node_jobs_service -->|"validates output"| node_jobs_schema
node_matching_service -->|"builds request"| node_matching_prompt
node_matching_service -->|"invokes structured"| node_llm_service
node_matching_service -->|"validates output"| node_matching_schema
node_knowledge_service -->|"builds documents"| node_knowledge_docs
node_knowledge_service -->|"chunks documents"| node_chunking
node_knowledge_service -->|"updates index"| node_vector_store
node_vector_store -->|"uses embeddings"| node_embedding_models
node_llm_service -->|"gets chat model"| node_llm_models
node_llm_service -->|"accepts requests"| node_llm_schemas
node_career_prompt -->|"renders prompt"| node_prompt_templates
node_jobs_prompt -->|"renders prompt"| node_prompt_templates
node_matching_prompt -->|"renders prompt"| node_prompt_templates
node_prompt_templates -->|"creates requests"| node_llm_schemas
node_prompt_registry -->|"manages templates"| node_prompt_templates

click node_app "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/main.py"
click node_career_route "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/api/routes/career.py"
click node_jobs_route "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/api/routes/jobs.py"
click node_matching_route "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/api/routes/matching.py"
click node_knowledge_route "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/api/routes/knowledge.py"
click node_health_route "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/api/routes/health.py"
click node_dependencies "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/api/dependencies.py"
click node_career_service "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/career/service.py"
click node_career_prompt "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/career/prompts.py"
click node_career_schema "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/career/schemas.py"
click node_jobs_service "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/jobs/service.py"
click node_jobs_prompt "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/jobs/prompts.py"
click node_jobs_schema "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/jobs/schemas.py"
click node_matching_service "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/matching/service.py"
click node_matching_prompt "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/matching/prompts.py"
click node_matching_schema "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/matching/schemas.py"
click node_knowledge_service "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/knowledge/service.py"
click node_knowledge_docs "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/knowledge/documents.py"
click node_chunking "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/knowledge/chunking.py"
click node_vector_store "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/knowledge/store.py"
click node_embedding_models "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/embeddings/models.py"
click node_llm_service "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/llm/services.py"
click node_llm_schemas "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/llm/schemas.py"
click node_llm_models "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/llm/models.py"
click node_prompt_templates "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/prompts/templates.py"
click node_prompt_registry "https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/prompts/registry.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_app,node_career_route,node_jobs_route,node_matching_route,node_knowledge_route,node_health_route,node_dependencies,node_client toneBlue
class node_career_service,node_career_prompt,node_career_schema,node_jobs_service,node_jobs_prompt,node_jobs_schema,node_matching_service,node_matching_prompt,node_matching_schema toneAmber
class node_knowledge_service,node_knowledge_docs,node_chunking,node_vector_store,node_embedding_models toneMint
class node_llm_service,node_llm_schemas,node_llm_models,node_prompt_templates,node_prompt_registry toneRose
```

## Components

### API layer

- [FastAPI app](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/main.py): `src/jobastra_ai/main.py`
- [Career routes](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/api/routes/career.py): `src/jobastra_ai/api/routes/career.py`
- [Job routes](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/api/routes/jobs.py): `src/jobastra_ai/api/routes/jobs.py`
- [Matching routes](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/api/routes/matching.py): `src/jobastra_ai/api/routes/matching.py`
- [Knowledge routes](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/api/routes/knowledge.py): `src/jobastra_ai/api/routes/knowledge.py`
- [Health route](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/api/routes/health.py): `src/jobastra_ai/api/routes/health.py`
- [Service wiring](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/api/dependencies.py): `src/jobastra_ai/api/dependencies.py`

### AI features

- [Profile extraction](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/career/service.py): `src/jobastra_ai/career/service.py`
- [Career prompts](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/career/prompts.py): `src/jobastra_ai/career/prompts.py`
- [Career profile schema](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/career/schemas.py): `src/jobastra_ai/career/schemas.py`
- [Job extraction](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/jobs/service.py): `src/jobastra_ai/jobs/service.py`
- [Job prompts](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/jobs/prompts.py): `src/jobastra_ai/jobs/prompts.py`
- [Job schema](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/jobs/schemas.py): `src/jobastra_ai/jobs/schemas.py`
- [Job matching](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/matching/service.py): `src/jobastra_ai/matching/service.py`
- [Matching prompts](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/matching/prompts.py): `src/jobastra_ai/matching/prompts.py`
- [Match schema](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/matching/schemas.py): `src/jobastra_ai/matching/schemas.py`

### Career knowledge

- [Knowledge indexing](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/knowledge/service.py): `src/jobastra_ai/knowledge/service.py`
- [Career documents](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/knowledge/documents.py): `src/jobastra_ai/knowledge/documents.py`
- [Document chunking](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/knowledge/chunking.py): `src/jobastra_ai/knowledge/chunking.py`
- [Career vector store](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/knowledge/store.py): `src/jobastra_ai/knowledge/store.py`
- [Embedding models](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/embeddings/models.py): `src/jobastra_ai/embeddings/models.py`

### Shared AI services

- [LLM boundary](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/llm/services.py): `src/jobastra_ai/llm/services.py`
- [LLM messages](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/llm/schemas.py): `src/jobastra_ai/llm/schemas.py`
- [Chat model setup](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/llm/models.py): `src/jobastra_ai/llm/models.py`
- [Prompt templates](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/prompts/templates.py): `src/jobastra_ai/prompts/templates.py`
- [Prompt registry](https://github.com/ankitsharma34/jobastra-ai/blob/main/src/jobastra_ai/prompts/registry.py): `src/jobastra_ai/prompts/registry.py`

### Other components

- **Platform client**

## Connections

- Platform client → FastAPI app: calls API
- FastAPI app → Career routes: registers (evidence: `src/jobastra_ai/main.py`)
- FastAPI app → Job routes: registers (evidence: `src/jobastra_ai/main.py`)
- FastAPI app → Matching routes: registers (evidence: `src/jobastra_ai/main.py`)
- FastAPI app → Knowledge routes: registers (evidence: `src/jobastra_ai/main.py`)
- FastAPI app → Health route: registers (evidence: `src/jobastra_ai/main.py`)
- Career routes → Service wiring: resolves services (evidence: `src/jobastra_ai/api/routes/career.py`)
- Job routes → Service wiring: resolves services (evidence: `src/jobastra_ai/api/routes/jobs.py`)
- Matching routes → Service wiring: resolves services (evidence: `src/jobastra_ai/api/routes/matching.py`)
- Knowledge routes → Service wiring: resolves services (evidence: `src/jobastra_ai/api/routes/knowledge.py`)
- Service wiring → Profile extraction: constructs (evidence: `src/jobastra_ai/api/dependencies.py`)
- Service wiring → Job extraction: constructs (evidence: `src/jobastra_ai/api/dependencies.py`)
- Service wiring → Job matching: constructs (evidence: `src/jobastra_ai/api/dependencies.py`)
- Service wiring → Knowledge indexing: constructs (evidence: `src/jobastra_ai/api/dependencies.py`)
- Service wiring → LLM boundary: constructs (evidence: `src/jobastra_ai/api/dependencies.py`)
- Career routes → Profile extraction: invokes (evidence: `src/jobastra_ai/api/routes/career.py`)
- Job routes → Job extraction: invokes (evidence: `src/jobastra_ai/api/routes/jobs.py`)
- Matching routes → Job matching: invokes (evidence: `src/jobastra_ai/api/routes/matching.py`)
- Knowledge routes → Knowledge indexing: invokes (evidence: `src/jobastra_ai/api/routes/knowledge.py`)
- Profile extraction → Career prompts: builds request (evidence: `src/jobastra_ai/career/service.py`)
- Profile extraction → LLM boundary: invokes structured (evidence: `src/jobastra_ai/career/service.py`)
- Profile extraction → Career profile schema: validates output (evidence: `src/jobastra_ai/career/service.py`)
- Job extraction → Job prompts: builds request (evidence: `src/jobastra_ai/jobs/service.py`)
- Job extraction → LLM boundary: invokes structured (evidence: `src/jobastra_ai/jobs/service.py`)
- Job extraction → Job schema: validates output (evidence: `src/jobastra_ai/jobs/service.py`)
- Job matching → Matching prompts: builds request (evidence: `src/jobastra_ai/matching/service.py`)
- Job matching → LLM boundary: invokes structured (evidence: `src/jobastra_ai/matching/service.py`)
- Job matching → Match schema: validates output (evidence: `src/jobastra_ai/matching/service.py`)
- Knowledge indexing → Career documents: builds documents (evidence: `src/jobastra_ai/knowledge/service.py`)
- Knowledge indexing → Document chunking: chunks documents (evidence: `src/jobastra_ai/knowledge/service.py`)
- Knowledge indexing → Career vector store: updates index (evidence: `src/jobastra_ai/knowledge/service.py`)
- Career vector store → Embedding models: uses embeddings (evidence: `src/jobastra_ai/knowledge/store.py`)
- LLM boundary → Chat model setup: gets chat model (evidence: `src/jobastra_ai/llm/services.py`)
- LLM boundary → LLM messages: accepts requests (evidence: `src/jobastra_ai/llm/services.py`)
- Career prompts → Prompt templates: renders prompt (evidence: `src/jobastra_ai/career/prompts.py`)
- Job prompts → Prompt templates: renders prompt (evidence: `src/jobastra_ai/jobs/prompts.py`)
- Matching prompts → Prompt templates: renders prompt (evidence: `src/jobastra_ai/matching/prompts.py`)
- Prompt templates → LLM messages: creates requests (evidence: `src/jobastra_ai/prompts/templates.py`)
- Prompt registry → Prompt templates: manages templates (evidence: `src/jobastra_ai/prompts/registry.py`)
