How chsnor/git_flowchart works
Git Flowchart turns a GitHub repository URL into an interactive source-relationship diagram: the user submits a repository, the server retrieves and analyzes its files, then the explorer presents the graph and lets the user inspect source. The README also documents node-link exploration and opening code. The sampled pipeline imports GitHub, parser, and generator modules, though several internal stages are only partially excerpted; those edges are grounded in the pipeline’s imports and calls. The request from the explorer to the API is shown as unverified because its request code was not excerpted.
Main entry points: FlowExplorer.tsx Flow explorer · pipeline.ts Analysis pipeline · page.tsx Home page · route.ts Analysis endpoint
Components 14
Explorer UI
- Home page
src/app/page.tsx - Flow explorer
src/components/FlowExplorer.tsx
Repository Analysis
- Analysis endpoint
src/app/api/analyze/route.ts - Analysis pipeline
src/lib/pipeline.ts - GitHub URL and API helpers
src/lib/github.ts - File and relation parser
src/lib/parser.ts - Flow element generator
src/lib/generator.ts
Graph and Code
- Interactive flow canvas
src/components/FlowCanvas.tsx - Source code drawer
src/components/SideDrawer.tsx - Code formatting and highlighting
src/lib/code-viewer.ts
Shared Utilities
- URL and sharing helpers
src/lib/ui-helper.ts - Analysis data types
src/types/index.ts
Other components
- Repository visitor
- GitHub API and raw content
Connections 16
- Repository visitor → Home page: opens
README.md - Home page → Flow explorer: renders
src/app/page.tsx - Repository visitor → Flow explorer: submits repository
README.md - Flow explorer → Analysis endpoint: requests analysis
- Analysis endpoint → Analysis pipeline: dispatches analysis
src/app/api/analyze/route.ts - Analysis pipeline → GitHub URL and API helpers: parses URL and builds API request
src/lib/pipeline.ts - Analysis pipeline → GitHub API and raw content: fetches repository tree
src/lib/pipeline.ts - Analysis pipeline → File and relation parser: filters and analyzes files
src/lib/pipeline.ts - Analysis pipeline → Flow element generator: builds graph elements
src/lib/pipeline.ts - Analysis pipeline → Analysis data types: uses analysis models
src/lib/pipeline.ts - Flow explorer → Interactive flow canvas: renders graph
src/components/FlowExplorer.tsx - Flow explorer → Source code drawer: opens source view
src/components/FlowExplorer.tsx - Flow explorer → URL and sharing helpers: decodes shared state
src/components/FlowExplorer.tsx - Flow explorer → GitHub URL and API helpers: builds source links
src/components/FlowExplorer.tsx - Flow explorer → GitHub API and raw content: fetches selected file
src/components/FlowExplorer.tsx - Source code drawer → Code formatting and highlighting: formats and highlights
src/components/SideDrawer.tsx