How heiswayi/archmap works
archmap is a Python CLI that turns a project’s source tree into a standalone interactive architecture-map HTML. The workflow scans eligible files, extracts language-aware metadata, classifies files into layers, resolves internal dependencies, builds a project model, and renders the report. The README documents report views whose implementation is in the HTML template; source excerpts do not show their internal wiring, so those capabilities are represented without guessed interactions.
Main entry points: analyzer.py Map Builder · cli.py Command Line · __init__.py Language Dispatch · renderer.py HTML Renderer
Components 14
CLI and Output
- Command Line
src/archmap/cli.py
Source Analysis
- Source Scanner
src/archmap/scanner.py - Map Builder
src/archmap/analyzer.py - Language Dispatch
src/archmap/languages/__init__.py - Analyzer Types
src/archmap/languages/base.py - Python AST Analysis
src/archmap/languages/python_analyzer.py - Generic Analysis
src/archmap/languages/generic.py
Architecture Model
- Layer Classification
src/archmap/layers.py - Dependency Resolution
src/archmap/analyzer.py - Project Map Model
src/archmap/model.py
Interactive Report
- HTML Renderer
src/archmap/renderer.py - Interactive Report Views
src/archmap/templates/template.html
Other components
- Project Developer
- Web Browser
Connections 16
- Project Developer → Command Line: runs
README.md - Command Line → Map Builder: builds map
src/archmap/cli.py - Map Builder → Source Scanner: scans files
src/archmap/analyzer.py - Map Builder → Language Dispatch: analyzes files
src/archmap/analyzer.py - Language Dispatch → Python AST Analysis: dispatches Python
src/archmap/languages/__init__.py - Language Dispatch → Generic Analysis: dispatches others
src/archmap/languages/__init__.py - Python AST Analysis → Analyzer Types: implements interface
src/archmap/languages/python_analyzer.py - Generic Analysis → Analyzer Types: implements interface
src/archmap/languages/generic.py - Map Builder → Layer Classification: classifies files
src/archmap/analyzer.py - Map Builder → Dependency Resolution: resolves imports
src/archmap/analyzer.py - Map Builder → Project Map Model: assembles map
src/archmap/analyzer.py - Command Line → HTML Renderer: writes report
src/archmap/cli.py - HTML Renderer → Project Map Model: serializes map
src/archmap/renderer.py - HTML Renderer → Interactive Report Views: fills template
src/archmap/renderer.py - Command Line → Web Browser: opens report
src/archmap/cli.py - Interactive Report Views → Web Browser: displays report
README.md