Feed it architecture docs, diagrams, specs, and whiteboard photos.
It reads everything, maps the system, generates interactive diagrams,
builds a development plan, and flags what's missing.
PDF Β· DOCX Β· Draw.io Β· PPTX Β· XLSX Β· Markdown Β· Images Β· TXT
You inherit a project. There are 40 documents spread across Confluence, SharePoint, and email attachments. Some are architecture docs, some are diagrams, some are meeting notes with critical decisions buried in paragraph 17.
No one person knows the full picture. The architect left. The wiki is stale.
Anatomy reads all of it in minutes, understands the relationships, and hands you a complete system map β with gaps highlighted.
|
Drop any combination of document formats. PDFs, Word docs, PowerPoint decks, spreadsheets, draw.io diagrams, markdown, even whiteboard photos. Everything is parsed into a unified context. |
Map-Reduce pipeline extracts components, data flows, models, tech stack, NFRs, and gaps. Runs 3 batches in parallel with retry, resume, and real-time progress streaming. |
|
10 diagram types β from C4 System Context to ER diagrams to deployment views. Glassmorphism-styled nodes, auto-layout with dagre, zoom, pan, minimap. Export to PNG or SVG. |
Ask anything with full project context. "What are the security concerns?" "What happens if the queue goes down?" Responses stream in real-time. |
|
Phased development plan with tasks, deliverables, acceptance criteria, risk assessment, tech recommendations, and team structure suggestions. |
The killer feature. Finds what your docs don't say: "Auth mentioned but no auth strategy defined" "Database tech not specified for analytics store" |
| Requirement | Version |
|---|---|
| π Python | 3.12+ |
| π¦ Node.js | 18+ |
| π€ LLM API Key | Anthropic or OpenAI |
# Clone
git clone <repo-url> && cd Anatomy
# Backend
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # β Edit with your LLM API credentials
# Frontend
cd ../frontend
npm installCreate backend/.env from the example:
# LLM Provider: "anthropic" or "openai"
ANATOMY_LLM_PROVIDER=anthropic
ANATOMY_LLM_API_KEY=your-api-key-here
# ANATOMY_LLM_BASE_URL= # leave empty for default provider URL
ANATOMY_LLM_MODEL=claude-sonnet-4-20250514
ANATOMY_LLM_MODEL_DEEP=claude-sonnet-4-20250514Tip
For deeper analysis, set LLM_MODEL_DEEP to a more powerful model like claude-opus-4-20250514 or gpt-4o.
# Terminal 1 β API
cd backend && source venv/bin/activate
uvicorn app.main:app --reload --port 8000
# Terminal 2 β UI
cd frontend && npm run devβ Open http://localhost:5173
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β π Select βββββΆβ π€ Upload βββββΆβ π§ Analyze βββββΆβ πΊοΈ Explore β
β Project β β Documents β β (parallel) β β Diagrams β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββ¬ββββββββ
β
ββββββββΌββββββββ
β π¬ Chat / β
β π Plan β
ββββββββββββββββ
| Step | What Happens |
|---|---|
| 1. Pick a project | Select existing or create new. Projects persist across browser sessions via localStorage. |
| 2. Upload | Drag & drop files. Any combination of 8 formats. All parsed instantly. |
| 3. Analyze | Click "Analyze Documents". Watch real-time SSE progress as batches extract in parallel. |
| 4. Diagrams | Switch tabs. Pick from 10 diagram types. Pan, zoom, drag nodes. Export PNG/SVG. |
| 5. Chat | Open the sliding panel. Ask anything β AI has full document + analysis context. |
| 6. Plan | Generate a phased build plan with tasks, risks, and blocking gaps. |
Project Structure (click to expand)
Anatomy/
βββ backend/ Python 3.12+ / FastAPI
β βββ app/
β β βββ main.py App entry, CORS, route registration
β β βββ config.py Pydantic settings from .env
β β βββ api/ Route handlers
β β β βββ upload.py Project CRUD, file upload, delete
β β β βββ analyze.py Map-reduce analysis (SSE), progress
β β β βββ diagrams.py Diagram generation and retrieval
β β β βββ chat.py Streaming chat (SSE)
β β β βββ plan.py Build plan generation
β β βββ services/ Business logic
β β β βββ parser.py Multi-format doc parser (8 formats)
β β β βββ analyzer.py Parallel map-reduce + synthesis
β β β βββ diagram_gen.py AI diagram data generation
β β β βββ chat.py Context-aware streaming chat
β β β βββ planner.py Build plan generation
β β βββ models/
β β β βββ schemas.py Pydantic models (15 models)
β β β βββ project.py File-based JSON project store
β β βββ utils/
β β βββ prompts.py System prompt templates
β β βββ file_utils.py File I/O utilities
β βββ requirements.txt
β βββ .env.example
β
βββ frontend/ React 19 / TypeScript / Vite
β βββ src/
β βββ App.tsx Layout, project restore, routing
β βββ store/useStore.ts Zustand global state
β βββ hooks/useProject.ts API hooks (SSE + REST)
β βββ components/
β β βββ project/ Project picker
β β βββ layout/ Header, Sidebar + progress bar
β β βββ upload/ Drag-and-drop zone
β β βββ analysis/ Results dashboard
β β βββ diagrams/ React Flow canvas + custom nodes
β β βββ chat/ Streaming chat panel
β β βββ plan/ Build plan viewer
β βββ styles/theme.ts Node color system
β βββ types/index.ts TypeScript interfaces
β
βββ .gitignore
βββ README.md
The core innovation is a parallel map-reduce pipeline that handles document sets of any size:
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β π 36 uploaded documents β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
_group_documents()
(batches β€ 120K chars each)
β
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββ
β 15 batches Β· 3 running in parallel β
β β
β ββββββββ ββββββββ ββββββββ β
β β B1 β β β B2 β β β B3 β³ β ... β MAP: extract_batch()
β ββββ¬ββββ ββββ¬ββββ ββββ¬ββββ β (3Γ retry + backoff)
β β β β β
β πΎ πΎ πΎ β saved after EACH batch
β β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββ
β synthesize_extractions() β REDUCE: merge + dedup
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββ
β β
Unified AnalysisResult β
β components Β· flows Β· models Β· gaps Β· NFRs β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
Note
Resume support β if the browser disconnects or the server restarts mid-analysis, clicking "Analyze" again skips completed batches and picks up where it left off. Zero wasted API calls.
| # | Diagram | Description |
|---|---|---|
| 1 | System Context (C4-L1) | Bird's eye β system, actors, external systems |
| 2 | Container (C4-L2) | Applications, data stores, protocols |
| 3 | Component (C4-L3) | Internals of a single container |
| 4 | High-Level Design | Layers, services, infrastructure boundaries |
| 5 | Low-Level Design | Modules, classes, detailed interactions |
| 6 | Data Flow | End-to-end data movement through the system |
| 7 | ER Diagram | Entities, attributes, relationships |
| 8 | Sequence | Service interaction flows over time |
| 9 | Deployment | Infrastructure, cloud services, networking |
| 10 | Tech Stack | Visual technology radar |
| Layer | Technology | Why |
|---|---|---|
| π€ AI | Anthropic Claude / OpenAI | Large context windows, streaming support |
| β‘ Backend | FastAPI + Python 3.12 | Async, fast, great doc-parsing ecosystem |
| βοΈ Frontend | React 19 + TypeScript | Component model fits diagram rendering |
| πΊοΈ Diagrams | React Flow + dagre | Interactive node graphs with auto-layout |
| π¨ Styling | Tailwind CSS 4 | Utility-first, rapid visual iteration |
| π¬ Animation | Framer Motion | Smooth transitions between views |
| π¦ State | Zustand 5 | Lightweight, zero boilerplate |
| π‘ Streaming | Server-Sent Events | Real-time progress, no WebSocket overhead |
| πΎ Persistence | File-based JSON | Zero infrastructure β works fully offline |
| π Parsing | PyMuPDF, python-docx, python-pptx, openpyxl, lxml | Native parser per format |
Projects
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/projects?name=X |
Create a new project |
GET |
/api/projects |
List all projects |
GET |
/api/projects/:id |
Get project + analysis + plan |
DELETE |
/api/projects/:id |
Delete a project |
POST |
/api/projects/:id/upload |
Upload files (multipart) |
DELETE |
/api/projects/:id/documents/:docId |
Remove a document |
Analysis
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/analyze |
Run analysis (SSE stream) β {project_id} |
POST |
/api/analyze?fresh=true |
Fresh analysis (wipe previous) |
GET |
/api/projects/:id/analysis |
Get analysis results |
GET |
/api/projects/:id/analysis-progress |
Poll extraction progress |
Diagrams
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/diagrams/generate |
Generate diagram β {project_id, diagram_type} |
GET |
/api/projects/:id/diagrams/:type |
Get generated diagram |
Chat & Planning
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/chat |
Chat (SSE stream) β {project_id, message} |
GET |
/api/projects/:id/chat-history |
Get conversation history |
DELETE |
/api/projects/:id/chat-history |
Clear conversation |
POST |
/api/plan/generate |
Generate build plan β {project_id} |
GET |
/api/projects/:id/plan |
Get generated plan |
All environment variables use the ANATOMY_ prefix in backend/.env:
| Variable | Required | Default | Description |
|---|---|---|---|
LLM_PROVIDER |
anthropic |
LLM provider (anthropic or openai) |
|
LLM_API_KEY |
β | - | API key for your LLM provider |
LLM_BASE_URL |
- | Custom base URL (leave empty for default) | |
LLM_MODEL |
claude-sonnet-4-20250514 |
Model for extraction, diagrams, chat | |
LLM_MODEL_DEEP |
claude-sonnet-4-20250514 |
Model for synthesis and planning | |
MAX_FILE_SIZE_MB |
50 |
Max upload size per file |
Tip
Upload everything together β Cross-references between a PRD, draw.io diagram, and API spec produce much richer analysis than uploading them separately.
Tip
Start with System Context β Generate the C4 Level 1 diagram first for the big picture, then drill into Container and Component.
Tip
Check gaps first β Gap detection is the fastest way to surface undocumented decisions and assumptions.
Tip
Resume, don't restart β If analysis disconnects, just click Analyze again. Completed batches are skipped instantly. Zero wasted API calls.
| Decision | Rationale |
|---|---|
| SQLite for storage | Zero infrastructure. No database to provision. Works offline. |
| Map-reduce with parallel batching | Handles 50+ docs without hitting context limits. 3x faster. |
| SSE over WebSockets | Simpler protocol, works through proxies, no state to manage. |
| Zustand over Redux | Same capability, fraction of the boilerplate. |
| React Flow over D3 | First-class React. Built-in pan, zoom, minimap, export. |
| dagre for layout | Deterministic hierarchical layout. Great for architecture diagrams. |
Built with Anthropic Claude and a lot of architectural opinions.
If it can read your architecture, it can find what's missing.