# shreeya-pareek/opportunity-radar architecture

> Architecture diagram of the GitHub repository shreeya-pareek/opportunity-radar, 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/shreeya-pareek/opportunity-radar
- Repository: https://github.com/shreeya-pareek/opportunity-radar

## Overview

Opportunity Radar collects listings from JSON files and configured Greenhouse boards, normalizes them, and stores them in SQLite with duplicate-aware updates. Users can search through the CLI or browse and filter through a web UI backed by the API; both read the same store. The README documents these capabilities, while the excerpts show the main calls among CLI, adapters, model, store, API, and browser code. Some UI and Greenhouse details are documented rather than fully shown in source excerpts.

Main entry points: [`src/opportunity_radar/cli.py`](https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/cli.py) (Radar CLI), [`src/opportunity_radar/store.py`](https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/store.py) (Store and search), [`src/opportunity_radar/sources.py`](https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/sources.py) (JSON source adapter), [`src/opportunity_radar/api.py`](https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/api.py) (HTTP API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Collection"]
  node_cli["Radar CLI<br/>[cli.py]"]
  node_config["Board configuration"]
  node_config_loader["Employer config loader<br/>[sources.py]"]
  node_json_adapter["JSON source adapter<br/>[sources.py]"]
  node_greenhouse_adapter["Greenhouse adapter<br/>[sources.py]"]
end

subgraph group_domain["Opportunity Data"]
  node_opportunity["Opportunity model<br/>[models.py]"]
end

subgraph group_storage["Persistence and Search"]
  node_store["Store and search<br/>[store.py]"]
  node_sqlite[("SQLite database")]
end

subgraph group_discovery["Discovery Interfaces"]
  node_api["HTTP API<br/>[api.py]"]
  node_web_page["Web interface<br/>[index.html]"]
  node_web_client["Browser search client<br/>[app.js]"]
end

node_person(("Opportunity seeker"))
node_publisher["JSON publisher feed"]
node_greenhouse["Greenhouse boards"]
node_browser(("Browser user"))

node_cli -->|"loads config"| node_config_loader
node_config_loader -->|"reads boards"| node_config
node_cli -->|"fetches listings"| node_json_adapter
node_json_adapter -->|"reads JSON"| node_publisher
node_cli -->|"fetches boards"| node_greenhouse_adapter
node_greenhouse_adapter -->|"requests listings"| node_greenhouse
node_json_adapter -->|"normalizes records"| node_opportunity
node_greenhouse_adapter -->|"normalizes records"| node_opportunity
node_cli -->|"upserts and searches"| node_store
node_store -->|"stores fields"| node_opportunity
node_store -->|"reads and writes"| node_sqlite
node_browser -->|"opens interface"| node_web_page
node_web_page -->|"loads client"| node_web_client
node_web_client -->|"requests listings"| node_api
node_api -->|"searches and retrieves"| node_store
node_api -->|"serves homepage"| node_web_page
node_person -->|"runs commands"| node_cli

click node_cli "https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/cli.py"
click node_config "https://github.com/shreeya-pareek/opportunity-radar/blob/main/data/greenhouse_employers.json"
click node_config_loader "https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/sources.py"
click node_json_adapter "https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/sources.py"
click node_greenhouse_adapter "https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/sources.py"
click node_opportunity "https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/models.py"
click node_store "https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/store.py"
click node_api "https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/api.py"
click node_web_page "https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/static/index.html"
click node_web_client "https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/static/js/app.js"

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_cli,node_config,node_config_loader,node_json_adapter,node_greenhouse_adapter,node_browser toneBlue
class node_opportunity toneAmber
class node_store,node_sqlite toneMint
class node_api,node_web_page,node_web_client toneRose
class node_person,node_publisher,node_greenhouse toneIndigo
```

## Components

### Collection

- [Radar CLI](https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/cli.py): `src/opportunity_radar/cli.py`
- [Board configuration](https://github.com/shreeya-pareek/opportunity-radar/blob/main/data/greenhouse_employers.json): `data/greenhouse_employers.json`
- [Employer config loader](https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/sources.py): `src/opportunity_radar/sources.py`
- [JSON source adapter](https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/sources.py): `src/opportunity_radar/sources.py`
- [Greenhouse adapter](https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/sources.py): `src/opportunity_radar/sources.py`

### Opportunity Data

- [Opportunity model](https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/models.py): `src/opportunity_radar/models.py`

### Persistence and Search

- [Store and search](https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/store.py): `src/opportunity_radar/store.py`
- **SQLite database**

### Discovery Interfaces

- [HTTP API](https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/api.py): `src/opportunity_radar/api.py`
- [Web interface](https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/static/index.html): `src/opportunity_radar/static/index.html`
- [Browser search client](https://github.com/shreeya-pareek/opportunity-radar/blob/main/src/opportunity_radar/static/js/app.js): `src/opportunity_radar/static/js/app.js`

### Other components

- **Opportunity seeker**
- **JSON publisher feed**
- **Greenhouse boards**
- **Browser user**

## Connections

- Radar CLI → Employer config loader: loads config (evidence: `src/opportunity_radar/cli.py`)
- Employer config loader → Board configuration: reads boards (evidence: `README.md`)
- Radar CLI → JSON source adapter: fetches listings (evidence: `src/opportunity_radar/cli.py`)
- JSON source adapter → JSON publisher feed: reads JSON (evidence: `README.md`)
- Radar CLI → Greenhouse adapter: fetches boards (evidence: `src/opportunity_radar/cli.py`)
- Greenhouse adapter → Greenhouse boards: requests listings (evidence: `README.md`)
- JSON source adapter → Opportunity model: normalizes records (evidence: `src/opportunity_radar/sources.py`)
- Greenhouse adapter → Opportunity model: normalizes records (evidence: `src/opportunity_radar/sources.py`)
- Radar CLI → Store and search: upserts and searches (evidence: `src/opportunity_radar/cli.py`)
- Store and search → Opportunity model: stores fields (evidence: `src/opportunity_radar/store.py`)
- Store and search → SQLite database: reads and writes (evidence: `README.md`)
- Browser user → Web interface: opens interface (evidence: `README.md`)
- Web interface → Browser search client: loads client (evidence: `README.md`)
- Browser search client → HTTP API: requests listings (evidence: `src/opportunity_radar/static/js/app.js`)
- HTTP API → Store and search: searches and retrieves (evidence: `src/opportunity_radar/api.py`)
- HTTP API → Web interface: serves homepage (evidence: `src/opportunity_radar/api.py`)
- Opportunity seeker → Radar CLI: runs commands (evidence: `README.md`)
