# honeypie3301/gitdigest architecture

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

- Interactive diagram: https://gitdiagram.com/honeypie3301/gitdigest
- Repository: https://github.com/honeypie3301/gitdigest

## Overview

GitDigest turns a GitHub repository, local directory, or archive into a filtered, formatted digest and file tree for LLM use. The main browser workflow collects ingestion options, routes work through the ingestion service to a server or GitHub-backed path, and presents results for export. Separate runtime branches provide Python server ingestion and Windows desktop processing; desktop Java decompilation and stored presets are additional capabilities. Relationships are limited to excerpted calls, SOURCE INDEX references, and README statements; unsampled details are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/honeypie3301/gitdigest/blob/main/src/App.tsx) (App workflow), [`src/server/query_processor.py`](https://github.com/honeypie3301/gitdigest/blob/main/src/server/query_processor.py) (Query processor), [`src/services/ingest.ts`](https://github.com/honeypie3301/gitdigest/blob/main/src/services/ingest.ts) (Ingestion service), [`api/ingest.ts`](https://github.com/honeypie3301/gitdigest/blob/main/api/ingest.ts) (Ingest endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser experience"]
  node_app["App workflow<br/>[App.tsx]"]
  node_form["Ingestion form<br/>[GitForm.tsx]"]
  node_results["Digest results<br/>[ResultSection.tsx]"]
end

subgraph group_webingest["Web ingestion"]
  node_ingestsvc["Ingestion service<br/>[ingest.ts]"]
  node_githubapi["GitHub API client<br/>[githubApi.ts]"]
  node_apiingest["Ingest endpoint<br/>[ingest.ts]"]
  node_archive["Archive ingestion<br/>[archive.ts]"]
  node_worker["Worker server<br/>[server.ts]"]
  node_storage[("Artifact storage<br/>[storage.ts]")]
end

subgraph group_python["Python engine"]
  node_pyapi["Python API<br/>[ingest.py]"]
  node_processor["Query processor<br/>[query_processor.py]"]
  node_parser["Repository parser<br/>[query_parser.py]"]
  node_clone["Git clone<br/>[clone.py]"]
  node_engine["File ingestion<br/>[ingestion.py]"]
  node_formatter["Digest formatter"]
end

subgraph group_desktop["Desktop runtime"]
  node_desktop["Windows desktop<br/>[main.rs]"]
  node_local["Local engine<br/>[local.rs]"]
  node_desktopapi["Desktop API<br/>[api.rs]"]
end

subgraph group_shared["Supporting capabilities"]
  node_decompiler["Java decompiler<br/>[cfr.ts]"]
  node_presets["Ingestion presets"]
  node_presetstore["Preset storage"]
  node_exports["Digest exports<br/>[digestExport.ts]"]
  node_history["Ingestion history"]
end

node_user(("Repository user"))
node_github(("GitHub"))

node_user -->|"starts session"| node_app
node_app -->|"shows form"| node_form
node_form -.->|"submits options"| node_ingestsvc
node_app -->|"starts ingestion"| node_ingestsvc
node_ingestsvc -->|"uses API fallback"| node_githubapi
node_ingestsvc -.->|"posts request"| node_apiingest
node_apiingest -->|"fetches repository"| node_github
node_apiingest -->|"downloads and ingests"| node_archive
node_worker -->|"dispatches ingestion"| node_archive
node_worker -->|"stores artifacts"| node_storage
node_archive -.->|"decompiles classes"| node_decompiler
node_app -->|"renders result"| node_results
node_results -.->|"exports digest"| node_exports
node_app -.->|"shows presets"| node_presets
node_presets -->|"loads presets"| node_presetstore
node_app -->|"tracks history"| node_history
node_pyapi -.->|"delegates query"| node_processor
node_processor -->|"parses repository"| node_parser
node_processor -->|"clones repository"| node_clone
node_processor -->|"processes files"| node_engine
node_engine -->|"formats output"| node_formatter
node_desktop -->|"runs local inputs"| node_local
node_desktop -->|"dispatches API work"| node_desktopapi

click node_app "https://github.com/honeypie3301/gitdigest/blob/main/src/App.tsx"
click node_form "https://github.com/honeypie3301/gitdigest/blob/main/src/components/GitForm.tsx"
click node_results "https://github.com/honeypie3301/gitdigest/blob/main/src/components/ResultSection.tsx"
click node_ingestsvc "https://github.com/honeypie3301/gitdigest/blob/main/src/services/ingest.ts"
click node_githubapi "https://github.com/honeypie3301/gitdigest/blob/main/src/services/githubApi.ts"
click node_apiingest "https://github.com/honeypie3301/gitdigest/blob/main/api/ingest.ts"
click node_archive "https://github.com/honeypie3301/gitdigest/blob/main/worker/archive.ts"
click node_worker "https://github.com/honeypie3301/gitdigest/blob/main/worker/server.ts"
click node_storage "https://github.com/honeypie3301/gitdigest/blob/main/worker/storage.ts"
click node_pyapi "https://github.com/honeypie3301/gitdigest/blob/main/src/server/routers/ingest.py"
click node_processor "https://github.com/honeypie3301/gitdigest/blob/main/src/server/query_processor.py"
click node_parser "https://github.com/honeypie3301/gitdigest/blob/main/src/gitingest/query_parser.py"
click node_clone "https://github.com/honeypie3301/gitdigest/blob/main/src/gitingest/clone.py"
click node_engine "https://github.com/honeypie3301/gitdigest/blob/main/src/gitingest/ingestion.py"
click node_formatter "https://github.com/honeypie3301/gitdigest/blob/main/src/gitingest/output_formatter.py"
click node_desktop "https://github.com/honeypie3301/gitdigest/blob/main/desktop/rust/src/main.rs"
click node_local "https://github.com/honeypie3301/gitdigest/blob/main/desktop/rust/src/local.rs"
click node_desktopapi "https://github.com/honeypie3301/gitdigest/blob/main/desktop/rust/src/api.rs"
click node_decompiler "https://github.com/honeypie3301/gitdigest/blob/main/src/services/decompiler/cfr.ts"
click node_presets "https://github.com/honeypie3301/gitdigest/blob/main/src/components/IngestionPresets.tsx"
click node_presetstore "https://github.com/honeypie3301/gitdigest/blob/main/src/services/ingestionPresets.ts"
click node_exports "https://github.com/honeypie3301/gitdigest/blob/main/src/services/digestExport.ts"
click node_history "https://github.com/honeypie3301/gitdigest/blob/main/src/services/ingestionHistory.ts"

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_form,node_results,node_user toneBlue
class node_ingestsvc,node_githubapi,node_apiingest,node_archive,node_worker,node_storage toneAmber
class node_pyapi,node_processor,node_parser,node_clone,node_engine,node_formatter toneMint
class node_desktop,node_local,node_desktopapi toneRose
class node_decompiler,node_presets,node_presetstore,node_exports,node_history,node_github toneIndigo
```

## Components

### Browser experience

- [App workflow](https://github.com/honeypie3301/gitdigest/blob/main/src/App.tsx): `src/App.tsx`
- [Ingestion form](https://github.com/honeypie3301/gitdigest/blob/main/src/components/GitForm.tsx): `src/components/GitForm.tsx`
- [Digest results](https://github.com/honeypie3301/gitdigest/blob/main/src/components/ResultSection.tsx): `src/components/ResultSection.tsx`

### Web ingestion

- [Ingestion service](https://github.com/honeypie3301/gitdigest/blob/main/src/services/ingest.ts): `src/services/ingest.ts`
- [GitHub API client](https://github.com/honeypie3301/gitdigest/blob/main/src/services/githubApi.ts): `src/services/githubApi.ts`
- [Ingest endpoint](https://github.com/honeypie3301/gitdigest/blob/main/api/ingest.ts): `api/ingest.ts`
- [Archive ingestion](https://github.com/honeypie3301/gitdigest/blob/main/worker/archive.ts): `worker/archive.ts`
- [Worker server](https://github.com/honeypie3301/gitdigest/blob/main/worker/server.ts): `worker/server.ts`
- [Artifact storage](https://github.com/honeypie3301/gitdigest/blob/main/worker/storage.ts): `worker/storage.ts`

### Python engine

- [Python API](https://github.com/honeypie3301/gitdigest/blob/main/src/server/routers/ingest.py): `src/server/routers/ingest.py`
- [Query processor](https://github.com/honeypie3301/gitdigest/blob/main/src/server/query_processor.py): `src/server/query_processor.py`
- [Repository parser](https://github.com/honeypie3301/gitdigest/blob/main/src/gitingest/query_parser.py): `src/gitingest/query_parser.py`
- [Git clone](https://github.com/honeypie3301/gitdigest/blob/main/src/gitingest/clone.py): `src/gitingest/clone.py`
- [File ingestion](https://github.com/honeypie3301/gitdigest/blob/main/src/gitingest/ingestion.py): `src/gitingest/ingestion.py`
- [Digest formatter](https://github.com/honeypie3301/gitdigest/blob/main/src/gitingest/output_formatter.py): `src/gitingest/output_formatter.py`

### Desktop runtime

- [Windows desktop](https://github.com/honeypie3301/gitdigest/blob/main/desktop/rust/src/main.rs): `desktop/rust/src/main.rs`
- [Local engine](https://github.com/honeypie3301/gitdigest/blob/main/desktop/rust/src/local.rs): `desktop/rust/src/local.rs`
- [Desktop API](https://github.com/honeypie3301/gitdigest/blob/main/desktop/rust/src/api.rs): `desktop/rust/src/api.rs`

### Supporting capabilities

- [Java decompiler](https://github.com/honeypie3301/gitdigest/blob/main/src/services/decompiler/cfr.ts): `src/services/decompiler/cfr.ts`
- [Ingestion presets](https://github.com/honeypie3301/gitdigest/blob/main/src/components/IngestionPresets.tsx): `src/components/IngestionPresets.tsx`
- [Preset storage](https://github.com/honeypie3301/gitdigest/blob/main/src/services/ingestionPresets.ts): `src/services/ingestionPresets.ts`
- [Digest exports](https://github.com/honeypie3301/gitdigest/blob/main/src/services/digestExport.ts): `src/services/digestExport.ts`
- [Ingestion history](https://github.com/honeypie3301/gitdigest/blob/main/src/services/ingestionHistory.ts): `src/services/ingestionHistory.ts`

### Other components

- **Repository user**
- **GitHub**

## Connections

- Repository user → App workflow: starts session
- App workflow → Ingestion form: shows form (evidence: `src/App.tsx`)
- Ingestion form → Ingestion service: submits options
- App workflow → Ingestion service: starts ingestion (evidence: `src/App.tsx`)
- Ingestion service → GitHub API client: uses API fallback (evidence: `src/services/ingest.ts`)
- Ingestion service → Ingest endpoint: posts request (evidence: `api/ingest.ts`)
- Ingest endpoint → GitHub: fetches repository (evidence: `api/ingest.ts`)
- Ingest endpoint → Archive ingestion: downloads and ingests (evidence: `api/ingest.ts`)
- Worker server → Archive ingestion: dispatches ingestion (evidence: `worker/server.ts`)
- Worker server → Artifact storage: stores artifacts (evidence: `worker/server.ts`)
- Archive ingestion → Java decompiler: decompiles classes (evidence: `worker/archive.ts`)
- App workflow → Digest results: renders result (evidence: `src/App.tsx`)
- Digest results → Digest exports: exports digest
- App workflow → Ingestion presets: shows presets
- Ingestion presets → Preset storage: loads presets (evidence: `src/components/IngestionPresets.tsx`)
- App workflow → Ingestion history: tracks history (evidence: `src/App.tsx`)
- Python API → Query processor: delegates query
- Query processor → Repository parser: parses repository (evidence: `src/server/query_processor.py`)
- Query processor → Git clone: clones repository (evidence: `src/server/query_processor.py`)
- Query processor → File ingestion: processes files (evidence: `src/server/query_processor.py`)
- File ingestion → Digest formatter: formats output (evidence: `src/gitingest/ingestion.py`)
- Windows desktop → Local engine: runs local inputs (evidence: `desktop/rust/src/main.rs`)
- Windows desktop → Desktop API: dispatches API work (evidence: `desktop/rust/src/main.rs`)
