Commit DNA
Commit DNA transforms raw Git commit history into a powerful analytics dashboard that reveals coding patterns, productivity trends, refactoring behavior, bug tendencies, ownership distribution, and burnout indicators.
𧬠Commit DNA β Developer Coding Style Analyzer
Decode any developer's coding DNA from their Git history. Analyzes public GitHub repos to reveal coding patterns, work habits, and burnout risk β all computed live from real commit data.
π Table of Contents
π§ What is Commit DNA?
Every Git commit is a timestamped record: who wrote it, when, what they described, and which lines changed. Commit DNA reads an entire repo's history and generates a visual dashboard answering:
QuestionMetricWorks late at night? Night Ratio β % of commits between 10 PM β 5 AM
Works on weekends? Weekend Ratio β % of commits on Sat/Sun
Frequent bug fixes? Bug Rate β % of commits mentioning "fix", "bug", etc.
Invests in code quality? Refactor Rate β % of commits about cleanup/optimization
At risk of burnout? Burnout Score β weighted formula combining all above
Think of it as a health checkup for coding habits β no hardcoded data, everything is computed live from actual Git history.
π How It Works (Step by Step)
User enters GitHub URL β Validate β Clone repo β Extract git log β Parse commits β Calculate metrics β Burnout score β Display dashboard β Cleanup
1οΈβ£ Validation
Frontend checks: valid URL? Points to github.com? Has user/repo path?
2οΈβ£ Clone
Backend clones the repo into a temp folder with a unique UUID (supports concurrent users).
3οΈβ£ Extract Git Log
Runs: git log --numstat --pretty=format:"commit_separator|AuthorName|Date|Message"
Produces raw data like:
commit_separator|John Doe|Mon Mar 1 23:30:00 2026|fix: resolve login bug
5 2 src/auth.js
4οΈβ£ Parse
Each commit becomes a structured object with author, date, message, additions, deletions.
5οΈβ£ Calculate
Every commit is checked:
Night? β Hour between 22:00β04:59
Weekend? β Saturday or Sunday
Bug fix? β Message contains:
fix,bug,patch,hotfix,resolveRefactor? β Message contains:
refactor,cleanup,optimize,clean,restructure,perf
6οΈβ£ Score & Display
Ratios calculated β Burnout formula applied β Charts rendered β Temp repo deleted.
π All Metrics Explained
π Night Ratio
Night Ratio = Commits between 10 PM β 5 AM Γ· Total Commits
| 0β10% β Normal | 10β25% β οΈ Moderate | 25%+ π΄ Frequently coding past midnight |
π Weekend Ratio
Weekend Ratio = Saturday + Sunday Commits Γ· Total Commits
| 0β10% β Healthy boundary | 10β25% β οΈ Some weekend work | 25%+ π΄ Regular weekend coding |
π Bug Rate
Bug Rate = Bug-fix Commits Γ· Total Commits
Keywords: fix Β· bug Β· patch Β· hotfix Β· resolve
| 0β5% β Low | 5β15% β οΈ Normal | 15%+ π΄ May need better testing |
π§ Refactor Rate
Refactor Rate = Refactor Commits Γ· Total Commits
Keywords: refactor Β· cleanup Β· optimize Β· clean Β· restructure Β· perf
| 0β2% β οΈ Low investment | 2β10% β Healthy | 10%+ β οΈ Architecture may be unstable |
π Commit Spike
Commit Spike = (Max Commits in One Day Γ· Average per Day) β 1
Value of 0 = steady pace. Value of 4 = busiest day had 5Γ more commits than average.
π₯ The Burnout Formula
Burnout Score = 0.4 Γ Night Ratio
+ 0.3 Γ Weekend Ratio
+ 0.2 Γ Commit Spike (capped at 1.0)
+ 0.1 Γ Bug Rate
Why These Weights?
FactorWeightReasoningNight Ratio40%#1 indicator of overwork; correlates with fatigue and reduced code qualityWeekend Ratio30%Erodes recovery time; second strongest burnout signalCommit Spike20%Burst-then-rest patterns suggest deadline pressureBug Rate10%Can be a symptom of fatigue, but has many other causes
Status Thresholds
ScoreStatusMeaning0.00 β 0.24π’ HealthySustainable patterns, normal hours0.25 β 0.49π‘ MediumSome concerning signals, worth monitoring0.50 β 1.00π΄ OverloadedMultiple burnout indicators elevated
Worked Example
Night Ratio = 0.30, Weekend Ratio = 0.20, Spike = 0.80, Bug Rate = 0.12
Score = (0.4 Γ 0.30) + (0.3 Γ 0.20) + (0.2 Γ 0.80) + (0.1 Γ 0.12)
= 0.12 + 0.06 + 0.16 + 0.012
= 0.352 β π‘ Medium
π― Example Walkthrough
Input: https://github.com/expressjs/express (~3,800 commits)
Output:
{
"developerName": "TJ Holowaychuk",
"totalCommits": 3847,
"nightRatio": 22.5,
"weekendRatio": 15.3,
"bugRate": 8.7,
"refactorRate": 5.2,
"burnoutScore": 0.48,
"burnoutStatus": "Medium"
}Dashboard shows: Profile card β Bar chart (night vs day) β Doughnut (bugs vs refactors) β Gauge (burnout score)
π Tech Stack & Architecture
LayerTechnologiesFrontendHTML5, CSS3 (dark theme), Vanilla JS, Chart.jsBackendNode.js, Express.js, simple-git, day.js
βββββββββββββ FRONTEND βββββββββββββ
β index.html β dashboard.html β
β css/style.css js/api.js β
β js/charts.js js/dashboard.js β
ββββββββββββ¬ββββββββββββββββββββββββ
β POST /analyze
βΌ
βββββββββββββ BACKEND (Express) ββββ
β gitService β parserService β
β metricsService β burnoutService β
β β JSON response with metrics β
ββββββββββββββββββββββββββββββββββββ
π How to Run
# Install & start
cd backend && npm install && npm run dev
# Open commit-dna-lkc9.vercel.appPrerequisites: Node.js v16+, Git installed.
πΊ Future Roadmap
PhaseFeatureStatus1Public repo analysis + dashboard + burnout scoring β Done
Private repos (GitHub OAuth), multi-dev comparison π Planned
Team analytics, Slack alerts, AI recommendations π‘ Idea