A high-performance .NET 9 Web API that generates beautiful, customizable SVG cards displaying GitHub user and repository statistics — perfect for embedding in your README.
Try it out at github-readme-stats.tuhidulhossain.com — enter any GitHub username, pick a theme, and get your embed code instantly.
Streak Stats Card — Current streak, longest streak, and total contributions with animated SVGUser Stats Card — Stars, commits, PRs, issues, reviews, and rank with a visual ringTop Languages Card — Most used programming languages with multiple layout optionsRepository Pin Card — Showcase pinned repositories with stars, forks, and language infoGist Card — Display gist statistics60+ Themes — GitHub, editor, framework, and custom color themesFully Customizable — Colors, borders, layouts, animations, and moreHigh Performance — Redis caching, rate limiting, token rotation, and resilience patternsAdd any of these to your GitHub README:
![ GitHub Streak] ( https://github-readme-stats.tuhidulhossain.com/api/streak?username=YOUR_USERNAME ) ![ GitHub Stats] ( https://github-readme-stats.tuhidulhossain.com/api/stats?username=YOUR_USERNAME&show_icons=true ) ![ Top Languages] ( https://github-readme-stats.tuhidulhossain.com/api/top-langs?username=YOUR_USERNAME ) ![ Repo Card] ( https://github-readme-stats.tuhidulhossain.com/api/pin?username=YOUR_USERNAME&repo=REPO_NAME ) ![ Gist Card] ( https://github-readme-stats.tuhidulhossain.com/api/gist?id=GIST_ID ) Endpoint Description /api/stats?username={user}User statistics card /api/streak?username={user}Streak statistics card /api/top-langs?username={user}Top languages card /api/pin?username={user}&repo={repo}Repository pin card /api/gist?id={gist_id}Gist card /healthHealth check
These parameters work across all card types:
Parameter Description Default themeCard theme (see Themes ) defaulthide_borderHide the card border falseborder_radiusCard corner radius 4.5title_colorTitle color (hex without #) theme default text_colorBody text color theme default icon_colorIcon color theme default bg_colorBackground color theme default border_colorBorder color theme default cache_secondsCache duration in seconds 1800localeLocale for card text en
Parameter Description Default usernameGitHub username (required) - themeCard theme defaulthide_borderHide card border falseborder_radiusCard corner radius 4.5card_widthManual card width override 495card_heightManual card height override 150hide_total_contributionsHide total contributions section falsehide_current_streakHide current streak section falsehide_longest_streakHide longest streak section falsestarting_yearStart calculating streak from this year 2005fire_colorColor of the fire icon (HEX) ff6b6bcurr_streak_num_colorColor of the current streak number - side_nums_colorColor of the side numbers (total/longest) - curr_streak_label_colorColor of the "Current Streak" label - side_labels_colorColor of the side labels - dates_colorColor of the date range text - cache_secondsCustom cache TTL in seconds 1800disable_animationsDisable animations false
Parameter Description Default usernameGitHub username (required) - hideComma-separated list of stats to hide (stars, commits, prs, issues, contribs) - showComma-separated list of extra stats to show (reviews, prs_merged, discussions_started, discussions_answered) - hide_rankHide the ranking circle falseshow_iconsShow icons next to stat labels falseinclude_all_commitsCount total commits instead of just last year (Used for rank calculation) falsecommits_yearCount commits for a specific year - number_formatFormat for numbers (short, long) shorttext_boldWhether to use bold text trueexclude_repoComma-separated list of repositories to exclude - line_heightSpace between rows 25card_widthManual card width override 450themeCard theme defaulthide_borderHide card border falseborder_radiusCard corner radius 4.5cache_secondsCustom cache TTL in seconds 1800disable_animationsDisable animations false
Top Languages Card Options Parameter Description Default usernameGitHub username (required) - hideComma-separated list of languages to hide - layoutCard layout (normal, compact, donut, donut-vertical, pie) normallangs_countNumber of languages to show (max 20) 5exclude_repoComma-separated list of repositories to exclude - size_weightWeight for code size in ranking 1count_weightWeight for repo count in ranking 0include_forksInclude languages from forked repositories falsehide_progressHide progress bar/stats in compact layout falsestats_formatFormat for stats (percentages, bytes) percentageshide_titleHide the card title falsecustom_titleCustom card title - hide_borderHide the card border falseborder_radiusCard corner radius 4.5card_widthManual card width override - card_heightManual card height override - themeCard theme defaultcache_secondsCustom cache TTL in seconds 1800disable_animationsDisable animations false
Parameter Description Default usernameGitHub username (required) - repoRepository name (required) - themeCard theme default_repocardshow_ownerShow the repository owner's username falsedescription_lines_countMaximum number of lines for the description 3hide_borderHide the card border falseborder_radiusCard corner radius 4.5cache_secondsCustom cache TTL in seconds 1800
Parameter Description Default idGist ID (required) - themeCard theme default_repocardshow_ownerShow the gist owner's username falsehide_borderHide the card border falseborder_radiusCard corner radius 4.5cache_secondsCustom cache TTL in seconds 1800
Parameter Description Default ring_colorRing color theme default fire_colorFire icon color theme default stroke_colorStroke/divider color theme default curr_streak_num_colorCurrent streak number color theme default side_nums_colorSide numbers color theme default curr_streak_label_colorCurrent streak label color theme default side_labels_colorSide labels color theme default dates_colorDate text color theme default date_formatDate format string M j[, Y]card_widthCard width in pixels auto card_heightCard height in pixels auto hide_total_contributionsHide total contributions section falsehide_current_streakHide current streak section falsehide_longest_streakHide longest streak section falsestarting_yearStart counting from a specific year account creation disable_animationsDisable all animations false
Top Languages Card Parameters Parameter Description Default layoutLayout: normal, compact, donut, donut-vertical, pie normallangs_countNumber of languages to show 5hideComma-separated languages to hide - exclude_repoComma-separated repos to exclude - size_weightWeight for language size 1count_weightWeight for language count 0hide_progressHide progress bars falsehide_titleHide the card title falsecustom_titleCustom card title - card_widthCard width in pixels auto stats_formatFormat: percentages or bytes percentagesdisable_animationsDisable all animations false
Repository Pin Card Parameters Parameter Description Default show_ownerShow the repo owner's name falsedescription_lines_countNumber of description lines auto
Parameter Description Default hide_titleHide the gist title falseshow_ownerShow the gist owner false
Use the theme parameter to customize your card appearance:
![ GitHub Streak] ( https://github-readme-stats.tuhidulhossain.com/api/streak?username=encryptedtouhid&theme=tokyonight ) Theme Preview github_lightgithub_darktokyonightdraculanordradicalsunset_darkocean_deepcyberaurora
GitHub Themes Theme Description github_lightGitHub light mode github_light_defaultGitHub light with gray titles github_light_high_contrastGitHub light high contrast github_light_colorblindGitHub light colorblind-friendly github_light_tritanopiaGitHub light tritanopia-friendly github_darkGitHub dark mode github_dark_defaultGitHub dark with white titles github_dark_high_contrastGitHub dark high contrast github_dark_dimmedGitHub dimmed dark github_dark_colorblindGitHub dark colorblind-friendly github_dark_tritanopiaGitHub dark tritanopia-friendly
Popular Themes Theme Description defaultLight theme with blue accent darkPure dark theme radicalPink/purple gradient tokyonightTokyo Night color scheme draculaDracula purple theme nordNord arctic colors gruvboxRetro groove colors onedarkAtom One Dark theme catppuccin_mochaCatppuccin Mocha catppuccin_latteCatppuccin Latte rose_pineRose Pine theme
Editor Themes Theme Description monokaiMonokai editor theme cobaltCobalt blue theme cobalt2Cobalt2 theme nightowlNight Owl editor theme material-palenightMaterial Palenight darculaJetBrains Darcula one_dark_proOne Dark Pro ayu-mirageAyu Mirage theme noctis_minimusNoctis Minimus synthwave80s synthwave style
Framework & Brand Themes Theme Description vueVue.js green theme vue-darkDark Vue.js theme reactReact brand colors swiftSwift orange theme algoliaAlgolia brand colors discord_old_blurpleDiscord old blurple buefyBuefy framework colors
Color Palette Themes Theme Description solarized-darkSolarized dark palette solarized-lightSolarized light palette gruvbox_lightLight gruvbox variant shades-of-purplePurple shades theme midnight-purpleMidnight purple theme blue-greenBlue-green gradient blue_navyNavy blue theme calmCalm pastel colors calm_pinkCalm pink pastel roseRose pink theme
Streak Card Exclusive Themes Modern themes designed specifically for the streak card:
Theme Description sunsetWarm sunset gradient sunset_darkDark sunset variant oceanOcean blue theme ocean_deepDeep ocean theme forestForest green theme forest_darkDark forest variant purple_wavePurple wave gradient purple_galaxyGalaxy purple theme cyberCyberpunk neon fireFire red/orange theme mintFresh mint green coralCoral pink theme auroraPurple/teal aurora goldenGolden luxury theme golden_darkDark gold variant rose_goldRose gold elegant electricElectric blue theme lavenderSoft lavender arcticArctic ice blue
All Other Themes Theme Description default_repocardLight theme for repo cards merkoGreen forest theme highcontrastHigh contrast dark prussianPrussian blue theme great-gatsbyGreat Gatsby gold bearBear app theme chartreuse-darkChartreuse dark theme gothamGotham dark theme graywhiteGray and white minimal vision-friendly-darkAccessible dark theme flag-indiaIndia flag colors omniOmni dark theme jollyJolly bright theme maroongoldMaroon and gold yebluYellow and blue blueberryBlueberry colors slateorangeSlate and orange kacho_gaJapanese aesthetic outrunOutrun retro style ocean_darkDeep ocean dark city_lightsCity lights theme aura_darkAura dark theme pandaPanda syntax theme auraAura purple theme apprenticeApprentice vim theme moltackMoltack colors codeSTACKrcodeSTACKr theme date_nightDate night romantic holiHoli festival colors neonCyan/magenta cyberpunk ambient_gradientAmbient gradient
Clone the repository git clone https://github.com/encryptedtouhid/github-readme-stats.git
cd github-readme-stats Configure your GitHub token Create src/GitHubStats.Api/appsettings.Development.json:
{
"GitHub" : {
"PersonalAccessTokens" : [" ghp_your_token_here" ]
}
} Or set the environment variable:
export GitHub__PersonalAccessTokens__0=ghp_your_token_hereBuild and run cd src
dotnet build GitHubStats.sln
cd GitHubStats.Api
dotnet runThe API will be available at http://localhost:5042.
Run tests cd src
dotnet test GitHubStats.TestsConfigure via appsettings.json or environment variables:
Setting Description Default GitHub:PersonalAccessTokensGitHub PAT(s) for API access required GitHub:MaxRetriesMax retry attempts for API calls 3GitHub:TimeoutSecondsAPI request timeout 30Cache:RedisConnectionStringRedis connection string null (in-memory)Cache:StatsCardTtlSecondsStats card cache TTL 86400 (1 day)Cache:TopLangsCardTtlSecondsTop languages cache TTL 518400 (6 days)Cache:PinCardTtlSecondsPin card cache TTL 864000 (10 days)Cache:GistCardTtlSecondsGist card cache TTL 172800 (2 days)
src/
├── GitHubStats.Api # HTTP endpoints, middleware, and startup
├── GitHubStats.Application # Business logic and card service orchestration
├── GitHubStats.Domain # Entities, interfaces, and domain services
├── GitHubStats.Infrastructure # GitHub API client, caching, and token rotation
├── GitHubStats.Rendering # SVG card rendering and 60+ theme definitions
└── GitHubStats.Tests # Unit and integration tests
Key design decisions:
Clean architecture with clear separation of concerns GitHub GraphQL API for efficient data fetching with REST fallback for commit counts Token rotation across multiple PATs for rate limit distribution Polly resilience patterns (retries, circuit breaker, timeouts) Background cache refresh job for tracked users OpenTelemetry instrumentation for observability MIT
Developed by Khaled Md Tuhidul Hossain