# abuzarmaroof/jobsearch architecture

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

- Interactive diagram: https://gitdiagram.com/abuzarmaroof/jobsearch
- Repository: https://github.com/abuzarmaroof/jobsearch

## Overview

This small FastAPI backend accepts a job-search query and returns formatted job listings. The workflow runs through the API endpoint into a LangChain agent, which uses Tavily for filtered job-page search and Groq to select and format results. The graph reflects the active source in main.py and agent.py; no README capabilities or additional subsystems are documented.

Main entry points: [`main.py`](https://github.com/abuzarmaroof/jobsearch/blob/main/main.py) (Search endpoint), [`agent.py`](https://github.com/abuzarmaroof/jobsearch/blob/main/agent.py) (Agent runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_fastapi["FastAPI app<br/>[main.py]"]
  node_endpoint["Search endpoint<br/>[main.py]"]
end

subgraph group_search["Job Search"]
  node_runner["Agent runner<br/>[agent.py]"]
  node_agent["LangChain agent<br/>[agent.py]"]
  node_tool["Job search tool<br/>[agent.py]"]
  node_tavily["Tavily search"]
  node_groq["Groq model"]
end

node_user(("Job seeker"))

node_user -->|"submits query"| node_endpoint
node_fastapi -->|"routes request"| node_endpoint
node_endpoint -->|"passes query"| node_runner
node_runner -->|"invokes"| node_agent
node_agent -->|"dispatches search"| node_tool
node_tool -->|"searches listings"| node_tavily
node_agent -->|"requests generation"| node_groq
node_runner -->|"returns formatted results"| node_endpoint
node_endpoint -->|"responds"| node_user

click node_fastapi "https://github.com/abuzarmaroof/jobsearch/blob/main/main.py"
click node_endpoint "https://github.com/abuzarmaroof/jobsearch/blob/main/main.py"
click node_runner "https://github.com/abuzarmaroof/jobsearch/blob/main/agent.py"
click node_agent "https://github.com/abuzarmaroof/jobsearch/blob/main/agent.py"
click node_tool "https://github.com/abuzarmaroof/jobsearch/blob/main/agent.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_fastapi,node_endpoint toneBlue
class node_runner,node_agent,node_tool,node_tavily,node_groq toneAmber
class node_user toneIndigo
```

## Components

### HTTP API

- [FastAPI app](https://github.com/abuzarmaroof/jobsearch/blob/main/main.py): `main.py`
- [Search endpoint](https://github.com/abuzarmaroof/jobsearch/blob/main/main.py): `main.py`

### Job Search

- [Agent runner](https://github.com/abuzarmaroof/jobsearch/blob/main/agent.py): `agent.py`
- [LangChain agent](https://github.com/abuzarmaroof/jobsearch/blob/main/agent.py): `agent.py`
- [Job search tool](https://github.com/abuzarmaroof/jobsearch/blob/main/agent.py): `agent.py`
- **Tavily search**
- **Groq model**

### Other components

- **Job seeker**

## Connections

- Job seeker → Search endpoint: submits query
- FastAPI app → Search endpoint: routes request
- Search endpoint → Agent runner: passes query
- Agent runner → LangChain agent: invokes
- LangChain agent → Job search tool: dispatches search
- Job search tool → Tavily search: searches listings
- LangChain agent → Groq model: requests generation
- Agent runner → Search endpoint: returns formatted results
- Search endpoint → Job seeker: responds
