How kartikekhurana/git-history-intelligence works
Git History Intelligence accepts a public GitHub repository and reports history-based hotspots, file coupling, ownership concentration, and pull-request risk. The main flow is dashboard request → API validation, limiting, and cache lookup → repository sync and commit-history parsing → analysis → displayed results. The dashboard also offers an interactive coupling map and a PR-risk form. README architecture and sampled imports support the main backend links; some dashboard wiring and analyzer implementations were not sampled, so uncertain links are omitted.
Main entry points: api.py API routes · page.tsx Dashboard · Card.tsx Shared card · repo.py Repository sync
Components 23
Dashboard
- Dashboard
dashboard/app/page.tsx - API client
dashboard/lib/api.ts - Hotspots view
dashboard/components/HotspotsCard.tsx - Coupling view
dashboard/components/CouplingCard.tsx - Coupling map
dashboard/components/CouplingGraph.tsx - Graph layout
dashboard/lib/GraphLayout.ts - Ownership view
dashboard/components/BusFactorCard.tsx - PR risk form
dashboard/components/PrRiskCard.tsx - Shared card
dashboard/components/Card.tsx
API and protection
- API routes
engine/api.py - Rate limiter
engine/tmp_ratelimit.py - Result cache
engine/cache.py
History ingestion
- Repository sync
engine/repo.py - Commit parser
engine/parser.py - Noise filter
engine/filter.py - Commit model
engine/models.py
Analysis
- Hotspot analysis
engine/analyzers/hotspots.py - File coupling
engine/analyzers/coupling.py - Graph builder
engine/analyzers/graph.py - Ownership analysis
engine/analyzers/bus_factor.py - PR risk analysis
engine/analyzers/pr_risk.py
Other components
- Engineer
- GitHub
Connections 30
- Engineer → Dashboard: submits repository
README.md - Dashboard → API client: requests data
- API client → API routes: calls API
README.md - API routes → Rate limiter: enforces limits
engine/api.py - API routes → Result cache: checks and stores
engine/api.py - API routes → Repository sync: loads history
engine/api.py - Repository sync → GitHub: clones or fetches
engine/repo.py - Repository sync → Commit parser: parses log
engine/repo.py - Repository sync → Noise filter: filters files
engine/repo.py - Commit parser → Commit model: creates commits
engine/parser.py - API routes → Hotspot analysis: computes hotspots
engine/api.py - API routes → File coupling: computes coupling
engine/api.py - API routes → Graph builder: builds graph
engine/api.py - API routes → Ownership analysis: computes ownership
engine/api.py - API routes → PR risk analysis: assesses changes
engine/api.py - PR risk analysis → Hotspot analysis: uses hotspot scores
engine/analyzers/pr_risk.py - PR risk analysis → File coupling: uses coupling data
engine/analyzers/pr_risk.py - PR risk analysis → Ownership analysis: uses area mapping
engine/analyzers/pr_risk.py - Dashboard → Hotspots view: shows results
- Dashboard → Coupling view: shows results
- Dashboard → Coupling map: renders graph
- Coupling map → Graph layout: positions nodes
dashboard/components/CouplingGraph.tsx - Dashboard → Ownership view: shows results
- Dashboard → PR risk form: offers risk check
- PR risk form → API client: submits changed files
dashboard/components/PrRiskCard.tsx - Hotspots view → Shared card: renders in
dashboard/components/HotspotsCard.tsx - Coupling view → Shared card: renders in
dashboard/components/CouplingCard.tsx - Coupling map → Shared card: renders in
dashboard/components/CouplingGraph.tsx - Ownership view → Shared card: renders in
dashboard/components/BusFactorCard.tsx - PR risk form → Shared card: renders in
dashboard/components/PrRiskCard.tsx