A dynamically rendered SVG card of your contributions to a specific open-source repo — embeddable in any GitHub README. No more hardcoded numbers: the card re-fetches live data from the GitHub API and GitHub's image cache keeps it fast.
- PRs merged / PRs open (authored by you in that repo)
- Issues closed (assigned to you)
- Total commits
- Lines added (from GitHub's contributor stats — covers a repo's top 100 contributors; "—" outside that)
- "Contributing since" (your first PR there)
- Top areas — a segmented bar of the labels on your merged PRs
Once deployed, add one line to your profile README (or a GSoC proposal, or anywhere markdown renders):
Dark theme: append &theme=dark.
One card listing several repos — the URL is the configuration: list exactly the repos you want shown, in the order you want them (up to 5):
Each row shows PRs merged, issues closed, commits, and when you started contributing there. To change which repos appear, just edit the list in your README — no redeploy, no config file.
Everyone runs their own free instance — your cards, your rate limits, no dependency on anyone else's server.
- Click the button above (or push this folder to a GitHub repo and import it at vercel.com).
- Go to vercel.com → Add New Project → import the repo → Deploy (no configuration needed;
api/card.jsis auto-detected as a serverless function). - Recommended: in Vercel → Project → Settings → Environment Variables, add
GITHUB_TOKEN= a fine-grained personal access token with public repo read-only access. Without it you share the unauthenticated GitHub rate limit (10 searches/min per IP), which is fine for testing but not for real traffic.
Responses are CDN-cached for 6 hours (s-maxage=21600), so even a popular card costs almost no API calls.
# live data (optionally: export GITHUB_TOKEN=...)
node scripts/preview.js --user smita1078 --repo checkstyle/checkstyle -o card.svg
# multi-repo card
node scripts/preview.js --user smita1078 --repos checkstyle/checkstyle,checkstyle/contribution -o multi.svg
# offline, from fixture data
node scripts/preview.js --fixture fixtures/sample.json --theme dark -o card-dark.svg
node scripts/preview.js --fixture fixtures/multi.json -o multi.svgZero dependencies — plain Node 18+.
| Stat | Source |
|---|---|
| PRs merged / open | Search API: repo:R author:U is:pr is:merged / is:open |
| Issues solved | max of three signals: issues assigned to you and closed; unique issues referenced by your merged PRs ("Issue #N:" titles, fixes/closes/resolves #N); issues you authored that are now closed |
| Commits | GET /repos/R/commits?author=U&per_page=1 → Link header's last-page number |
| Lines added | GET /repos/R/stats/contributors (lazily computed by GitHub; first hit may briefly return nothing — a warm cache fixes this) |
| Since | earliest PR via sort=created&order=asc |
| Top areas | labels aggregated over your 100 most recent merged PRs |
GitHub READMEs only allow images (served through GitHub's camo proxy) — no iframes or scripts — which is why the card is a server-rendered static SVG.
MIT