Beautiful, customizable GitHub statistics cards for your README.md. Free, open-source, and easy to use.
- 6 Beautiful Themes - Dark, Light, Dracula, Monokai, Nord, Gruvbox
- Customizable Stats - Choose what to display
- Lightning Fast - Edge functions + aggressive caching
- Privacy First - No data collection, no tracking
- Accessible - Semantic HTML, proper contrast ratios
- Go to https://github-stats.coded4.me
- Enter your GitHub username
- Customize your card
- Copy the Markdown code
- Paste in your README.md
- Node.js 18.17.0 or later
- GitHub Personal Access Token (Create one)
- Required scopes:
public_repo,read:user
- Required scopes:
# Clone your fork
git clone https://github.com/yourusername/github-stats.git
cd github-stats
# Install dependencies
npm install
# Configure environment variables
cp .env.example .env
# Edit .env and add your GITHUB_TOKEN
# Run development server
npm run dev
# Build for production
npm run build
npm start- Click the button above
- Add
GITHUB_TOKENenvironment variable - Deploy!
GET /api/stats
| Parameter | Type | Default | Description |
|---|---|---|---|
user |
string | required | GitHub username |
stats |
string | commits,repos,langs |
Comma-separated stats to show |
theme |
string | dark |
Theme name |
bg_color |
string | - | Custom background color (hex) |
text_color |
string | - | Custom text color (hex) |
icon_color |
string | - | Custom icon color (hex) |
title_color |
string | - | Custom title color (hex) |
border_radius |
number | 10 |
Border radius (0-20) |
hide_border |
boolean | false |
Hide card border |
layout |
string | default |
Layout style |
langs_count |
number | 5 |
Number of languages (1-10) |
cache |
number | 1800 |
Cache duration in seconds |
commits- Total commitsrepos- Public repositoriesprs- Pull requestsissues- Issuesstars- Stars receivedfollowers- Followers countlangs- Top languages
dark- GitHub dark themelight- GitHub light themedracula- Dracula thememonokai- Monokai themenord- Nord themegruvbox- Gruvbox theme
github-stats/
├── src/
│ ├── app/
│ │ ├── api/
│ │ │ ├── stats/route.ts # Main API endpoint
│ │ │ └── preview/route.ts # Preview endpoint
│ │ ├── layout.tsx # Root layout
│ │ └── page.tsx # Home page
│ ├── components/
│ │ ├── StatsConfigurator.tsx # Main configurator
│ │ ├── StatsPreview.tsx # Live preview
│ │ └── CodeSnippet.tsx # Code generator
│ ├── lib/
│ │ ├── github/
│ │ │ ├── client.ts # GraphQL client
│ │ │ ├── queries.ts # GraphQL queries
│ │ │ └── types.ts # TypeScript types
│ │ ├── svg/
│ │ │ ├── generator.ts # SVG generation
│ │ │ └── themes.ts # Theme definitions
│ │ ├── cache/
│ │ │ └── index.ts # Cache system
│ │ └── utils/
│ │ ├── rate-limiter.ts # Rate limiting
│ │ └── validators.ts # Input validation
│ └── styles/
│ └── globals.css # Global styles
├── public/ # Static assets
├── .env.example # Environment template
├── package.json # Dependencies
├── tsconfig.json # TypeScript config
├── tailwind.config.ts # Tailwind config
└── README.md # This file
npm run testnpm run type-checknpm run lintContributions are welcome! Please read our Contributing Guidelines first.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by github-readme-stats
- Built with Next.js and Tailwind CSS
- Icons by Lucide and Octicons
- GitHub: @Coded4-me
- Email: contact@coded4.me
Made with ❤️ by the Coded4 team