# zhuyansen/new-term-radar architecture

> Architecture diagram of the GitHub repository zhuyansen/new-term-radar, 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/zhuyansen/new-term-radar
- Repository: https://github.com/zhuyansen/new-term-radar

## Overview

new-term-radar is a daily early-signal monitor for emerging AI names. Its CLI runs source, repository-breakout, sitemap, new-domain, and Search Console collectors; combines their leads, judges names, and produces Markdown/JSON reports. Optional keyword analysis derives generic search phrases and estimates demand, while a delayed Trends review measures signal hit rate and lead time. Configuration, shared term processing, snapshots, and SQLite support these workflows. The principal orchestration and signal calls are visible in the CLI excerpt; several subsystem links are documented in the README because their implementations were not sampled.

Main entry points: [`radar/__main__.py`](https://github.com/zhuyansen/new-term-radar/blob/main/radar/__main__.py) (Daily CLI), [`radar/aisa.py`](https://github.com/zhuyansen/new-term-radar/blob/main/radar/aisa.py) (AIsa client), [`radar/report.py`](https://github.com/zhuyansen/new-term-radar/blob/main/radar/report.py) (Report builder), [`radar/sources.py`](https://github.com/zhuyansen/new-term-radar/blob/main/radar/sources.py) (X & HF signals)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Orchestration &amp; output"]
  node_cli["Daily CLI<br/>[__main__.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_report["Report builder<br/>[report.py]"]
  node_notify["Mail delivery<br/>[notify.py]"]
  node_i18n["Report languages<br/>[i18n.py]"]
end

subgraph group_signals["Lead signals"]
  node_sources["X &amp; HF signals<br/>[sources.py]"]
  node_breakout["GitHub breakouts<br/>[breakout.py]"]
  node_sitemaps["Sitemap signals<br/>[sitemaps.py]"]
  node_newsites["New ranked sites<br/>[new_sites.py]"]
  node_gsc["Search Console<br/>[gsc.py]"]
end

subgraph group_analysis["Term analysis"]
  node_terms["Term processing<br/>[terms.py]"]
  node_judge["Name judge<br/>[judge.py]"]
  node_usecases["Keyword analysis<br/>[usecases.py]"]
end

subgraph group_state["State &amp; review"]
  node_store[("Lead database<br/>[store.py]")]
  node_snap["Signal snapshots<br/>[snap.py]"]
  node_review["Trends review<br/>[review.py]"]
end

subgraph group_integration["External integrations"]
  node_aisa["AIsa client<br/>[aisa.py]"]
  node_aisa_service{{"AIsa APIs"}}
  node_github{{"GitHub API"}}
  node_hf{{"Hugging Face"}}
  node_google{{"Google services"}}
end

node_user(("Operator"))
node_site_sources(("Configured sites"))

node_user -->|"runs"| node_cli
node_cli -->|"loads"| node_config
node_cli -->|"runs"| node_sources
node_cli -->|"runs"| node_breakout
node_cli -->|"runs"| node_sitemaps
node_cli -->|"runs"| node_newsites
node_cli -->|"runs"| node_gsc
node_cli -->|"builds report"| node_report
node_cli -->|"records leads"| node_store
node_cli -->|"analyzes names"| node_usecases
node_cli -->|"reviews due leads"| node_review
node_cli -->|"sends report"| node_notify
node_report -->|"uses scores"| node_judge
node_report -->|"formats text"| node_i18n
node_report -->|"reads settings"| node_config
node_sources -->|"fetches X posts"| node_aisa
node_sources -->|"reads trending"| node_hf
node_breakout -->|"finds breakout repos"| node_github
node_sitemaps -->|"reads sitemaps"| node_site_sources
node_newsites -->|"queries domains"| node_aisa
node_gsc -->|"reads queries"| node_google
node_newsites -->|"loads and saves"| node_snap
node_breakout -->|"uses snapshots"| node_snap
node_sitemaps -->|"extracts terms"| node_terms
node_sources -->|"extracts names"| node_terms
node_usecases -->|"requests analysis"| node_aisa
node_usecases -->|"settles Trends series"| node_review
node_judge -->|"scores terms"| node_aisa
node_review -->|"loads and saves verdicts"| node_store
node_review -->|"checks Trends"| node_aisa
node_aisa -->|"calls APIs"| node_aisa_service
node_cli -->|"reads recent leads"| node_store

click node_cli "https://github.com/zhuyansen/new-term-radar/blob/main/radar/__main__.py"
click node_config "https://github.com/zhuyansen/new-term-radar/blob/main/radar/config.py"
click node_report "https://github.com/zhuyansen/new-term-radar/blob/main/radar/report.py"
click node_notify "https://github.com/zhuyansen/new-term-radar/blob/main/radar/notify.py"
click node_sources "https://github.com/zhuyansen/new-term-radar/blob/main/radar/sources.py"
click node_breakout "https://github.com/zhuyansen/new-term-radar/blob/main/radar/breakout.py"
click node_sitemaps "https://github.com/zhuyansen/new-term-radar/blob/main/radar/sitemaps.py"
click node_newsites "https://github.com/zhuyansen/new-term-radar/blob/main/radar/new_sites.py"
click node_gsc "https://github.com/zhuyansen/new-term-radar/blob/main/radar/gsc.py"
click node_terms "https://github.com/zhuyansen/new-term-radar/blob/main/radar/terms.py"
click node_judge "https://github.com/zhuyansen/new-term-radar/blob/main/radar/judge.py"
click node_usecases "https://github.com/zhuyansen/new-term-radar/blob/main/radar/usecases.py"
click node_store "https://github.com/zhuyansen/new-term-radar/blob/main/radar/store.py"
click node_snap "https://github.com/zhuyansen/new-term-radar/blob/main/radar/snap.py"
click node_review "https://github.com/zhuyansen/new-term-radar/blob/main/radar/review.py"
click node_i18n "https://github.com/zhuyansen/new-term-radar/blob/main/radar/i18n.py"
click node_aisa "https://github.com/zhuyansen/new-term-radar/blob/main/radar/aisa.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_cli,node_config,node_report,node_notify,node_i18n toneBlue
class node_sources,node_breakout,node_sitemaps,node_newsites,node_gsc toneAmber
class node_terms,node_judge,node_usecases toneMint
class node_store,node_snap,node_review toneRose
class node_aisa,node_aisa_service,node_github,node_hf,node_google,node_user,node_site_sources toneIndigo
```

## Components

### Orchestration & output

- [Daily CLI](https://github.com/zhuyansen/new-term-radar/blob/main/radar/__main__.py): `radar/__main__.py`
- [Configuration](https://github.com/zhuyansen/new-term-radar/blob/main/radar/config.py): `radar/config.py`
- [Report builder](https://github.com/zhuyansen/new-term-radar/blob/main/radar/report.py): `radar/report.py`
- [Mail delivery](https://github.com/zhuyansen/new-term-radar/blob/main/radar/notify.py): `radar/notify.py`
- [Report languages](https://github.com/zhuyansen/new-term-radar/blob/main/radar/i18n.py): `radar/i18n.py`

### Lead signals

- [X & HF signals](https://github.com/zhuyansen/new-term-radar/blob/main/radar/sources.py): `radar/sources.py`
- [GitHub breakouts](https://github.com/zhuyansen/new-term-radar/blob/main/radar/breakout.py): `radar/breakout.py`
- [Sitemap signals](https://github.com/zhuyansen/new-term-radar/blob/main/radar/sitemaps.py): `radar/sitemaps.py`
- [New ranked sites](https://github.com/zhuyansen/new-term-radar/blob/main/radar/new_sites.py): `radar/new_sites.py`
- [Search Console](https://github.com/zhuyansen/new-term-radar/blob/main/radar/gsc.py): `radar/gsc.py`

### Term analysis

- [Term processing](https://github.com/zhuyansen/new-term-radar/blob/main/radar/terms.py): `radar/terms.py`
- [Name judge](https://github.com/zhuyansen/new-term-radar/blob/main/radar/judge.py): `radar/judge.py`
- [Keyword analysis](https://github.com/zhuyansen/new-term-radar/blob/main/radar/usecases.py): `radar/usecases.py`

### State & review

- [Lead database](https://github.com/zhuyansen/new-term-radar/blob/main/radar/store.py): `radar/store.py`
- [Signal snapshots](https://github.com/zhuyansen/new-term-radar/blob/main/radar/snap.py): `radar/snap.py`
- [Trends review](https://github.com/zhuyansen/new-term-radar/blob/main/radar/review.py): `radar/review.py`

### External integrations

- [AIsa client](https://github.com/zhuyansen/new-term-radar/blob/main/radar/aisa.py): `radar/aisa.py`
- **AIsa APIs**
- **GitHub API**
- **Hugging Face**
- **Google services**

### Other components

- **Operator**
- **Configured sites**

## Connections

- Operator → Daily CLI: runs (evidence: `README.md`)
- Daily CLI → Configuration: loads (evidence: `radar/__main__.py`)
- Daily CLI → X & HF signals: runs (evidence: `radar/__main__.py`)
- Daily CLI → GitHub breakouts: runs (evidence: `radar/__main__.py`)
- Daily CLI → Sitemap signals: runs (evidence: `radar/__main__.py`)
- Daily CLI → New ranked sites: runs (evidence: `radar/__main__.py`)
- Daily CLI → Search Console: runs (evidence: `radar/__main__.py`)
- Daily CLI → Report builder: builds report (evidence: `radar/__main__.py`)
- Daily CLI → Lead database: records leads (evidence: `radar/__main__.py`)
- Daily CLI → Keyword analysis: analyzes names (evidence: `radar/__main__.py`)
- Daily CLI → Trends review: reviews due leads (evidence: `radar/__main__.py`)
- Daily CLI → Mail delivery: sends report (evidence: `README.md`)
- Report builder → Name judge: uses scores (evidence: `radar/report.py`)
- Report builder → Report languages: formats text (evidence: `radar/report.py`)
- Report builder → Configuration: reads settings (evidence: `radar/report.py`)
- X & HF signals → AIsa client: fetches X posts (evidence: `radar/sources.py`)
- X & HF signals → Hugging Face: reads trending (evidence: `README.md`)
- GitHub breakouts → GitHub API: finds breakout repos (evidence: `README.md`)
- Sitemap signals → Configured sites: reads sitemaps (evidence: `README.md`)
- New ranked sites → AIsa client: queries domains (evidence: `radar/new_sites.py`)
- Search Console → Google services: reads queries (evidence: `README.md`)
- New ranked sites → Signal snapshots: loads and saves (evidence: `radar/new_sites.py`)
- GitHub breakouts → Signal snapshots: uses snapshots (evidence: `radar/breakout.py`)
- Sitemap signals → Term processing: extracts terms (evidence: `radar/sitemaps.py`)
- X & HF signals → Term processing: extracts names (evidence: `radar/sources.py`)
- Keyword analysis → AIsa client: requests analysis (evidence: `radar/usecases.py`)
- Keyword analysis → Trends review: settles Trends series (evidence: `radar/usecases.py`)
- Name judge → AIsa client: scores terms (evidence: `radar/judge.py`)
- Trends review → Lead database: loads and saves verdicts (evidence: `radar/review.py`)
- Trends review → AIsa client: checks Trends (evidence: `radar/review.py`)
- AIsa client → AIsa APIs: calls APIs (evidence: `radar/aisa.py`)
- Daily CLI → Lead database: reads recent leads (evidence: `radar/__main__.py`)
