GitHub REST API Integration & Docs
Technical overview of how GitHub Achievements Tracker integrates with the official GitHub REST API v3, handles rate limits, and protects user privacy.
1. GitHub API Endpoints Used
All requests send Accept: application/vnd.github+json and X-GitHub-Api-Version: 2022-11-28 directly from the user's browser.
GET /users/{username}
Loads public profile identity, avatar, bio, followers, and user ID for verified noreply co-author email generation.
Profile & Pair
GET /users/{username}/repos?type=owner&per_page=100
Analyzes owned public repositories, top star counts (Starstruck), and primary programming languages (Galaxy Brain Q&A links).
Starstruck
GET /search/issues?q=author:{username}+type:pr+is:merged
Reads the total count of merged public pull requests authored by the user to compute Pull Shark tiers.
Pull Shark
GET /search/issues?q=author:{username}+is:closed
Inspects recent closed issues and pull requests to detect items closed within 5 minutes of creation (Quickdraw).
Quickdraw
POST /graphql & data/profile-snapshot.json
When an optional PAT is provided, queries GitHub GraphQL for accepted Discussion answers (Galaxy Brain), unreviewed merged PRs (YOLO), co-authored commits (Pair Extraordinaire), and sponsorships (Public Sponsor), falling back gracefully to REST Search and static profile snapshots.
Auto-Detect
2. Privacy & Rate-Limit Model
- 100% Client-Side: No backend server, no telemetry, and no third-party proxy. Every API call goes directly from your browser to
https://api.github.com.
- Optional Personal Access Token: Public unauthenticated calls allow up to 60 requests/hour per IP (and 10 search requests/minute). Entering a Personal Access Token raises the rate limit to 5,000 requests/hour and stays solely in browser memory for the current tab.
- Live Rate-Limit Visibility: Remaining quota from
x-ratelimit-remaining and x-ratelimit-limit headers is surfaced directly in the dashboard header.
3. Modular Architecture
scripts/
โโโ ship-pr.mjs # One-command GitHub Flow CLI with Co-authored-by & secret guardrails
src/
โโโ css/styles.css # Responsive GitHub-inspired design system (Dark/Light)
โโโ js/
โโโ achievements.js # Catalog of active, highlight, and retired badges + tier math
โโโ github-api.js # Zero-dependency GitHub REST API v3 client
โโโ analyzer.js # Quickdraw 5-min detector, repo ranker, Q&A finder
โโโ card-generator.js # Shareable 1200x630 PNG/SVG profile card renderer
โโโ coauthor.js # Verified GitHub noreply Co-authored-by generator
โโโ comparator.js # Side-by-side GitHub profile comparison engine
โโโ exporter.js # Shields.io Profile README Markdown & JSON exporter
โโโ history.js # Local progress snapshot history & delta tracker (localStorage)
โโโ i18n.js # PT-BR and EN localization layer
โโโ pace-calculator.js # Pull Shark daily pace & target-date roadmap estimator
โโโ skin-tones.js # Quickdraw & Starstruck emoji skin-tone preference preview
โโโ toolkit-ui.js # Interactive toolkit panels controller
โโโ app.js # Main dashboard state & DOM renderer
4. Support & Open-Source Maintenance
Maintained by Lucas Vale Queiroz under the MIT License.
To report bugs, suggest features, or contribute pull requests, please visit the
GitHub Issues tracker.