Paste a GitHub URL β get a Word-ready, evidence-cited handover document.
Local app with retrieval-augmented generation (RAG), a judge for factuality/citations, Mermaidβimage rendering, and one-click DOCX export.
-
One-click docs from a repo
Clone, analyze, and generate an ordered handover: Objective & Scope β Installation & Setup β Technologies Used β System Architecture β API Key. -
Evidence-grounded writing
Dual FAISS indexes (Text + Code) and section-aware retrieval keep claims tied to real repo content. -
Inline citations
Substantive statements citefile:lineβline(e.g.,[app/imports.py:12β28]). If evidence is missing, we insert [Information not available in repository]. -
Quality gate (βLLM-as-judgeβ)
A second model verifies factuality, citations, and missing-but-expected items; verdicts saved as JSON for audit. -
Word-friendly diagrams The app automatically creates a Mermaid system architecture diagram, and all Mermaid blocks are rendered to PNG so diagrams show up correctly in DOCX.
-
Local-first
Everything runs on your machine; only embeddings/LLM calls use your configured provider key.
flowchart LR
subgraph Ingestion_And_Indexing
GH[GitHub Repo] --> CL[Clone Repo]
CL --> PC[Parse and Chunk]
PC --> EMB[Create Embeddings]
end
EMB --> R[Retrieve Context]
subgraph Agent
R --> W[Write]
W --> J[Judge]
J -- pass --> S[Save]
J -- fail --> V[Revise]
V --> W
end
S --> E[End]
W --> D[Generate DOCX]
Requirements
- Python 3.10+ (3.11 recommended)
- Node.js 18+ (for the Electron UI)
- Git
- An embeddings/LLM API key (e.g.,
OPENAI_API_KEY)
git clone https://github.com/<your-org-or-user>/<your-repo>.git
cd <your-repo># Windows
python -m venv project_view
project_view\Scripts\activate
pip install -r requirements.txt
# macOS/Linux
python3 -m venv project_view
source project_view/bin/activate
pip install -r requirements.txtCreate app/.env:
OPENAI_API_KEY=YOUR_KEY_HERE
# Optional:
# OPENAI_BASE_URL=...
# GITHUB_TOKEN=... # to access private repos or raise rate limitscd ui
npm install
# Mermaid CLI to render diagrams to images for Word:
npm install --save-dev @mermaid-js/mermaid-cliEnsure the UI uses your venvβs Python:
# Windows (PowerShell)
$env:PYTHON="$PWD\..\project_view\Scripts\python.exe"; npm start
# Windows (cmd)
set PYTHON=%cd%\..\project_view\Scripts\python.exe
npm start
# macOS/Linux
PYTHON="$PWD/../project_view/bin/python" npm startPaste a GitHub URL, click Generate, watch logs, then Save the DOCX.
- Ingest β Clone the repo; collect README/docs and source code.
- Chunk
- Text via paragraph/heading splits
- Code via AST (functions/classes) β precise
file:linespans
- Index β Build two FAISS stores (Text and Code) with embeddings.
- Generate per section β Retrieve most relevant chunks β LLM writes grounded prose with inline citations.
- Judge β Second LLM checks factuality, citations, and missing items; JSON verdicts saved to
app/debug/. - Assemble β Electron merges Markdown, renders Mermaid to PNG, adds a cover page (repo title), imposes your section order, then converts HTML β DOCX.
Artifacts saved
app/docs/β final Markdown per sectionapp/docs_index/β FAISS stores (text_index/, code_index/)app/debug/β judge JSONs per section
<your-repo>/
ββ app/
β ββ main.py
β ββ imports.py
β ββ chunking.py
β ββ graph.py
β ββ save_to_vector_db.py
β ββ sections.yaml
β ββ .env # your API keys (not committed)
β ββ docs/ # generated sections (Markdown)
β ββ docs_index/ # FAISS stores (text_index/, code_index/)
β ββ debug/ # judge JSONs and run logs
ββ ui/
β ββ index.html
β ββ preload.js
β ββ main.js # spawns Python, MermaidβPNG, DOCX export
ββ requirements.txt
ββ package.json (in /ui)
ββ LICENSE
- Inline citations:
... reads env vars [app/imports.py:12β28]. - Missing evidence:
[Information not available in repository](no guessing). - Judge JSON (per section):
{ "factual": true, "cites_ok": true, "hallucinated": false, "missing_but_expected": ["Specific environment variables..."], "score": 0.9, "notes": "..." }
Use these for quality gates (CI) or quick manual edits.
-
ModuleNotFoundError: docx
Install into the same venv used by Electron:
project_view\Scripts\python.exe -m pip install python-docx -
UnicodeEncodeError on Windows
Ensure UTF-8: the UI already setsPYTHONUTF8=1/PYTHONIOENCODING=utf-8. -
Mermaid not rendered
Install@mermaid-js/mermaid-cliand ensure Chromium is available.
Desktop & Glue
Electron (Node + Chromium), html-to-docx, @mermaid-js/mermaid-cli
Python Pipeline
LangChain / LangGraph, FAISS, GitPython, Tiktoken, (optional) python-docx
Models
Your providerβs embeddings + LLM (configured in app/.env)
- Human-in-the-Loop review UI (approve/revise sections)
- Interactive Docs (RAG chat) over the indexed repo
- Multilingual output (bilingual DOCX/PDF)
- Delta docs (incremental re-runs on diffs)
- CI integration with quality gates (fail on low judge score)
- Richer sections (Testing, Data model, Security, Ops)
- Env-var detector to auto-build
.env.example - Offline/On-prem mode (local embeddings/LLM)
- More diagrams (sequence/ER diagrams)
- Naimi et al., Automating Software Documentation (2024) β diagram-centric (UML β LLM) documentation.
- Thota et al., AI-Driven Automated Software Documentation Generation (ICDSNS 2024) β model comparison for snippet-level codeβtext.
Our system differs by mining the entire repository with RAG + judge, packaging a Word-ready handover with rendered diagrams.
- Fork β create a feature branch β commit β open PR.
- Follow PEP 8 (Python) / standard JS style.
- Include/update docs and, if possible, a small test repo URL for validation.
This project is released under the MIT License. See LICENSE.
TL;DR: Paste a GitHub URL β get a structured, evidence-cited DOCX handover. Local, reproducible, and audit-friendly.
