The DevTrack Badge API provides public, shareable SVG badges that contributors can embed in their GitHub README to showcase their DevTrack statistics.
Endpoint: GET /api/badge/streak?user=<githubLogin>
Returns an SVG badge displaying the user's current commit streak.
Query Parameters:
user(required): GitHub username
Example:
GET /api/badge/streak?user=octocat
Response:
- Content-Type:
image/svg+xml;charset=utf-8 - SVG showing current streak (orange if active, indigo if none)
- Cached for 1 hour
Endpoint: GET /api/badge/commits?user=<githubLogin>
Returns an SVG badge displaying commits made this month.
Query Parameters:
user(required): GitHub username
Example:
GET /api/badge/commits?user=octocat
Response:
- Content-Type:
image/svg+xml;charset=utf-8 - SVG showing commits count for current month
- Cached for 1 hour
Add to your GitHub README:
<!-- Streak Badge -->

<!-- Commits Badge -->

<!-- Both Together -->
 - Public Access: No authentication required
- Real-time Data: Fetches live data from GitHub API
- Caching: Responses cached for 1 hour to reduce API load
- No Auth Required: Uses publicly available GitHub data
- Responsive: Dynamically sized based on content
- Accessible: Includes proper SVG labels and titles
- Streak (Active):
#f59e0b(Orange - active streak) - Streak (Inactive):
#6366f1(Indigo - no active streak) - Commits:
#6366f1(Indigo - DevTrack primary) - Error:
#ef4444(Red)
All badge endpoints return appropriate caching headers:
Content-Type: image/svg+xml;charset=utf-8
Cache-Control: max-age=3600, public
X-Content-Type-Options: nosniff
- Missing user parameter: Returns 400 Bad Request
- Invalid username: Returns 400 Bad Request
- User not found: Returns SVG badge with "N/A" value
- API errors: Returns SVG badge with "Error" value
- The DevTrack badge API itself has no rate limits
- However, it uses GitHub API internally, which may have rate limits
- GitHub API: 60 requests/hour (unauthenticated), 5000/hour (authenticated)
- Using
GITHUB_TOKENenvironment variable increases rate limits
- Badge generation is fast (typically <200ms)
- SVG is optimized for web delivery
- Caching significantly reduces load on GitHub API
- Badges are approximately 2-5KB in size
- Go to your public DevTrack profile:
https://devtrack.app/u/yourname - Scroll to "Get Your Badge" section
- Copy the markdown for your desired badge(s)
- Paste into your GitHub README
- Commit and push to your repository
Badges use a shields.io-style design implemented with SVG:
- Linear gradient background for depth
- White text with subtle shadow
- Rounded corners for modern appearance
- Responsive sizing based on content
- Streak badge: GitHub API commit search (last 90 days)
- Commits badge: GitHub API commit search (current month)
- Built with Next.js API routes
- Uses Supabase for user verification
- Dynamically generates SVG content
- Server-side caching with HTTP headers
To use a different domain:
Replace your-domain.com with your DevTrack deployment domain.
For issues or feature requests related to badges:
- Check the DevTrack documentation
- Create an issue on GitHub
- Contact the DevTrack team
[](https://devtrack.app/u/octocat)
[](https://devtrack.app/u/octocat)[

](https://devtrack.app/u/octocat)