Beautiful, dynamic, and self-hostable GitHub profile cards built with Next.js, designed for GitHub profile owners, open-source contributors, and developers who want full control over their README visuals. Generate clean image cards like Stats, Streak, Top Languages, and more β fully controlled by your own GitHub token.
Fork it. Configure it. Deploy it. Own your cards.
- π GitHub Stats Card
- π₯ GitHub Streak Card
- π Top Languages Card
- π More cards coming soon
- πΌοΈ Optimized image responses (perfect for README usage)
- π Uses your own GitHub token (no shared limits)
- π Deploy anywhere (Vercel recommended)
All cards support Light and Dark mode.
Append /dark to any endpoint to enable dark mode.
| Card | Light Mode | Dark Mode | Size |
|---|---|---|---|
| GitHub Stats | /stats |
/stats/dark |
440 Γ 210 |
| GitHub Streak | /streak |
/streak/dark |
440 Γ 210 |
| Top Languages | /top-lang |
/top-lang/dark |
300 Γ 160 |
Example usage in README (basic):



Use the <picture> tag to automatically switch cards based on the viewerβs theme:
<p align="center">
<picture>
<source
srcset="https://your-domain.vercel.app/streak/dark"
media="(prefers-color-scheme: dark)"
/>
<img
src="https://your-domain.vercel.app/streak"
alt="GitHub Streak"
style="width:100%; max-width:600px;"
/>
</picture>
</p>github-readme-cards/
βββ app/
β βββ stats/ # GitHub stats image route
β βββ streak/ # Contribution streak card
β βββ top-lang/ # Top languages card
β
βββ lib/
β βββ colors.ts # Theme & color configuration
β
βββ public/ # Static assets
β
βββ .env.example # Environment variable template
βββ next.config.js
βββ package.json
βββ README.md
βββ LICENSEYou can fully customize the look and feel of all cards by editing a single file:
lib/colors.tsThe project supports two built-in theme modes:
lightdark
These are automatically selected based on the endpoint (/dark) or user preference.
Each theme follows a strict and type-safe color contract:
export type ThemeMode = "light" | "dark";
export type CardColors = {
bg: string;
border: string;
divider: string;
primary: string;
secondary: string;
accent: string;
textMuted: string;
text: string;
};export const colors: Record<ThemeMode, CardColors> = {
dark: {
bg: "#15141B",
border: "#000000",
divider: "#E4E2E2",
primary: "#A277FF", // purple
secondary: "#61FFCA", // green
accent: "#FFCA85", // yellow
textMuted: "#9CA3AF",
text: "#FFFFFF",
},
light: {
bg: "#fcfff1",
border: "#E5E7EB",
divider: "#E5E7EB",
primary: "#5A2DFF",
secondary: "#0F766E",
accent: "#D97706",
textMuted: "#6B7280",
text: "#111827",
},
};- Open
lib/colors.ts - Modify any color value (hex, rgb, etc.)
- Save and redeploy
All cards will automatically reflect your new theme β no other code changes required.
π‘ Tip: You can create your own brand theme or match your GitHub profile colors easily.
Create a .env.local file (or configure on Vercel):
GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxx
GITHUB_JOINING_YEAR=2023
NEXT_PUBLIC_GITHUB_USERNAME=CodesWithSubham| Variable | Description |
|---|---|
GITHUB_TOKEN |
Personal Access Token for GitHub API |
GITHUB_JOINING_YEAR |
Year you joined GitHub (used for streak logic) |
NEXT_PUBLIC_GITHUB_USERNAME |
GitHub username to render cards for |
- Go to GitHub β Settings
- Navigate to Developer settings
- Open Personal access tokens β Tokens (classic)
- Click Generate new token (classic)
-
Note:
GitHub Readme Cards -
Expiration:
No expiration(or your choice) -
Scopes:
- β
read:user - β
repo(only if private repos needed)
- β
- Click Generate token
- Copy the token once and store it safely
Click Fork on the top-right of this repo.
- Go to https://vercel.com
- Click New Project
- Select your forked repository
In Project Settings β Environment Variables add:
GITHUB_TOKENGITHUB_JOINING_YEARNEXT_PUBLIC_GITHUB_USERNAME
Once deployed, your cards will be available at:
https://your-project.vercel.app/stats
https://your-project.vercel.app/streak
https://your-project.vercel.app/top-langgit clone https://github.com/your-username/github-readme-cards
cd github-readme-cards
pnpm install
pnpm dev- Tokens are server-side only
- Rate limits depend on your own token
- Never expose
GITHUB_TOKENpublicly
Planned features are ordered from most-requested to long-term ideas. Community contributions are welcome!
- β³ Contribution graph card
- β³ Repo showcase card
- β³ Theme & color customization
- β³ Custom dimensions support
MIT License Β© Subham Duary
If you like this project:
- β Star the repo
- π΄ Fork it
- π Open issues
- π§ Suggest features
Happy hacking! π