How trygerz/git-visualizer works
GitVisualizer accepts a GitHub repository in its React UI, fetches and folds repository history through an Express API, then lays out and renders the commit DAG for interactive exploration. Users can search and filter commits, inspect contributor and file insights, open commit diffs, and request Gemini-generated reviews. The graph also supports branch coloring, folded-path expansion, and bilingual UI. Server-side cache and GitHub/Gemini integration are included; the excerpts do not establish every internal call, so unsupported links are omitted.
Main entry points: CommitGraph.tsx Interactive graph · server.ts API routes · GraphPanels.tsx Graph insights · App.tsx Application shell
Components 24
Repository UI
- Application shell
src/App.tsx - Repository input
src/components/RepoInput.tsx
Graph exploration
- Interactive graph
src/components/CommitGraph.tsx - Commit node
src/components/CommitNode.tsx - Folded paths
src/components/FoldedNode.tsx - Graph edges
src/components/ElkCustomEdge.tsx - Graph insights
src/components/GraphPanels.tsx - Contributor ranking
src/components/ContributorLeaderboard.tsx - Contributor panel
src/components/ContributorPanel.tsx - Commit search
src/components/SearchBar.tsx - Commit actions
src/components/NodeContextMenu.tsx - AI review panel
src/components/AiSummaryPanel.tsx - ELK layout
src/hooks/useElkLayout.ts - Graph bounds
src/hooks/useGraphBounds.ts - Graph filtering
src/hooks/useGraphFilter.ts - Commit analysis
src/lib/commitParser.ts - Branch colors
src/lib/getBranchColor.ts
Repository services
- API routes
server.ts - History processing
src/server/github.ts - Response cache
src/server/cache.ts - Summary generation
src/server/gemini.ts
External services
- GitHub API
- Gemini API
Other components
- Repository explorer
Connections 27
- Repository explorer → Repository input: enters repository
- Repository input → Application shell: submits search
src/App.tsx - Application shell → API routes: requests repository
src/App.tsx - API routes → History processing: fetches history
server.ts - History processing → GitHub API: reads repository
src/server/github.ts - API routes → Response cache: checks and stores
server.ts - API routes → Application shell: returns graph data
server.ts - Application shell → Interactive graph: renders repository
src/App.tsx - Interactive graph → ELK layout: computes layout
src/components/CommitGraph.tsx - Interactive graph → Graph filtering: filters visible graph
src/components/CommitGraph.tsx - Interactive graph → Graph bounds: computes bounds
src/components/CommitGraph.tsx - Interactive graph → Commit node: renders commits
src/components/CommitGraph.tsx - Interactive graph → Folded paths: renders folded paths
src/components/CommitGraph.tsx - Interactive graph → Graph edges: renders edges
src/components/CommitGraph.tsx - Interactive graph → Graph insights: renders panels
src/components/CommitGraph.tsx - Graph insights → Contributor ranking: renders ranking
src/components/GraphPanels.tsx - Graph insights → Contributor panel: renders contributors
src/components/GraphPanels.tsx - Graph insights → Commit search: renders search
src/components/GraphPanels.tsx - Interactive graph → Commit analysis: parses commit data
src/components/CommitGraph.tsx - Interactive graph → Branch colors: colors branches
src/components/CommitGraph.tsx - Interactive graph → Commit actions: opens actions
src/components/CommitGraph.tsx - Commit actions → AI review panel: requests summary view
src/components/NodeContextMenu.tsx - AI review panel → API routes: requests AI summary
- API routes → Summary generation: generates summary
server.ts - Summary generation → Gemini API: calls model
- Repository explorer → Interactive graph: explores history
- Interactive graph → API routes: requests commit diff
server.ts