# arnabpal2022/veritas architecture

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

- Interactive diagram: https://gitdiagram.com/arnabpal2022/veritas
- Repository: https://github.com/arnabpal2022/veritas

## Overview

Veritas is an AI-news digest generator with a Streamlit blog interface and a command-line entry point. Its main workflow searches for current AI news, summarizes each article, then uses those summaries to compose and save a Markdown report. The web app can trigger generation and browse dated report files; the CLI prints the generated report. The excerpts show the workflow wiring and report-file handling, but not the full UI implementation or external service internals.

Main entry points: [`app/workflow.py`](https://github.com/arnabpal2022/veritas/blob/master/app/workflow.py) (Workflow coordinator), [`app/agents/publisher.py`](https://github.com/arnabpal2022/veritas/blob/master/app/agents/publisher.py) (Report publisher), [`streamlit_app.py`](https://github.com/arnabpal2022/veritas/blob/master/streamlit_app.py) (Streamlit interface), [`app/agents/newsSearcher.py`](https://github.com/arnabpal2022/veritas/blob/master/app/agents/newsSearcher.py) (News search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_cli["CLI runner<br/>[main.py]"]
  node_web["Streamlit interface<br/>[streamlit_app.py]"]
end

subgraph group_pipeline["News workflow"]
  node_workflow["Workflow coordinator<br/>[workflow.py]"]
  node_search["News search<br/>[newsSearcher.py]"]
  node_summarize["Article summarizer<br/>[summarizer.py]"]
  node_publish["Report publisher<br/>[publisher.py]"]
  node_models["Article and state models<br/>[models.py]"]
end

subgraph group_generation["AI generation"]
  node_tavily["Tavily search API"]
  node_llm_config["LLM and API setup<br/>[llm.py]"]
  node_prompts["Report prompt<br/>[prompts.py]"]
end

subgraph group_reports["Report archive"]
  node_report_files["Dated Markdown reports"]
  node_archive["Report archive browser<br/>[streamlit_app.py]"]
  node_report_display["Report display<br/>[streamlit_app.py]"]
end

node_reader(("News reader"))

node_reader -->|"uses"| node_web
node_reader -->|"runs"| node_cli
node_web -->|"generates via"| node_workflow
node_cli -->|"invokes"| node_workflow
node_workflow -->|"dispatches"| node_search
node_workflow -->|"dispatches"| node_summarize
node_workflow -->|"dispatches"| node_publish
node_search -->|"searches with"| node_tavily
node_search -->|"creates articles"| node_models
node_summarize -->|"invokes"| node_llm_config
node_summarize -->|"summarizes articles"| node_models
node_publish -->|"invokes"| node_llm_config
node_publish -->|"uses prompt"| node_prompts
node_publish -->|"writes report"| node_report_files
node_workflow -->|"returns report for saving"| node_report_files
node_web -->|"browses dates"| node_archive
node_archive -->|"reads reports"| node_report_files
node_archive -->|"selects report"| node_report_display
node_report_display -->|"presents digest"| node_reader

click node_cli "https://github.com/arnabpal2022/veritas/blob/master/main.py"
click node_web "https://github.com/arnabpal2022/veritas/blob/master/streamlit_app.py"
click node_workflow "https://github.com/arnabpal2022/veritas/blob/master/app/workflow.py"
click node_search "https://github.com/arnabpal2022/veritas/blob/master/app/agents/newsSearcher.py"
click node_summarize "https://github.com/arnabpal2022/veritas/blob/master/app/agents/summarizer.py"
click node_publish "https://github.com/arnabpal2022/veritas/blob/master/app/agents/publisher.py"
click node_models "https://github.com/arnabpal2022/veritas/blob/master/app/models.py"
click node_llm_config "https://github.com/arnabpal2022/veritas/blob/master/app/llm.py"
click node_prompts "https://github.com/arnabpal2022/veritas/blob/master/app/prompts.py"
click node_archive "https://github.com/arnabpal2022/veritas/blob/master/streamlit_app.py"
click node_report_display "https://github.com/arnabpal2022/veritas/blob/master/streamlit_app.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_web toneBlue
class node_workflow,node_search,node_summarize,node_publish,node_models toneAmber
class node_tavily,node_llm_config,node_prompts toneMint
class node_report_files,node_archive,node_report_display toneRose
class node_reader toneIndigo
```

## Components

### User entry points

- [CLI runner](https://github.com/arnabpal2022/veritas/blob/master/main.py): `main.py`
- [Streamlit interface](https://github.com/arnabpal2022/veritas/blob/master/streamlit_app.py): `streamlit_app.py`

### News workflow

- [Workflow coordinator](https://github.com/arnabpal2022/veritas/blob/master/app/workflow.py): `app/workflow.py`
- [News search](https://github.com/arnabpal2022/veritas/blob/master/app/agents/newsSearcher.py): `app/agents/newsSearcher.py`
- [Article summarizer](https://github.com/arnabpal2022/veritas/blob/master/app/agents/summarizer.py): `app/agents/summarizer.py`
- [Report publisher](https://github.com/arnabpal2022/veritas/blob/master/app/agents/publisher.py): `app/agents/publisher.py`
- [Article and state models](https://github.com/arnabpal2022/veritas/blob/master/app/models.py): `app/models.py`

### AI generation

- **Tavily search API**
- [LLM and API setup](https://github.com/arnabpal2022/veritas/blob/master/app/llm.py): `app/llm.py`
- [Report prompt](https://github.com/arnabpal2022/veritas/blob/master/app/prompts.py): `app/prompts.py`

### Report archive

- **Dated Markdown reports**
- [Report archive browser](https://github.com/arnabpal2022/veritas/blob/master/streamlit_app.py): `streamlit_app.py`
- [Report display](https://github.com/arnabpal2022/veritas/blob/master/streamlit_app.py): `streamlit_app.py`

### Other components

- **News reader**

## Connections

- News reader → Streamlit interface: uses (evidence: `README.md`)
- News reader → CLI runner: runs (evidence: `README.md`)
- Streamlit interface → Workflow coordinator: generates via (evidence: `streamlit_app.py`)
- CLI runner → Workflow coordinator: invokes (evidence: `main.py`)
- Workflow coordinator → News search: dispatches (evidence: `app/workflow.py`)
- Workflow coordinator → Article summarizer: dispatches (evidence: `app/workflow.py`)
- Workflow coordinator → Report publisher: dispatches (evidence: `app/workflow.py`)
- News search → Tavily search API: searches with (evidence: `app/agents/newsSearcher.py`)
- News search → Article and state models: creates articles (evidence: `app/agents/newsSearcher.py`)
- Article summarizer → LLM and API setup: invokes (evidence: `app/agents/summarizer.py`)
- Article summarizer → Article and state models: summarizes articles (evidence: `app/agents/summarizer.py`)
- Report publisher → LLM and API setup: invokes (evidence: `app/agents/publisher.py`)
- Report publisher → Report prompt: uses prompt (evidence: `app/agents/publisher.py`)
- Report publisher → Dated Markdown reports: writes report (evidence: `app/agents/publisher.py`)
- Workflow coordinator → Dated Markdown reports: returns report for saving
- Streamlit interface → Report archive browser: browses dates (evidence: `README.md`)
- Report archive browser → Dated Markdown reports: reads reports (evidence: `streamlit_app.py`)
- Report archive browser → Report display: selects report (evidence: `streamlit_app.py`)
- Report display → News reader: presents digest (evidence: `README.md`)
