Your personalized year in review for GitHub contributions and coding activity. View your GitHub stats, contributions, and coding journey for 2025 in a beautiful, shareable format.
Live Demo - Click here
- 📊 Comprehensive GitHub statistics visualization
- 📈 Contribution patterns and calendar heatmap
- 🔤 Most used programming languages
- 🌟 Top repositories showcase
- 🤖 AI-powered year analysis and fun roasting
- 📱 Social sharing with dynamic OG images
- 💾 Download stats as image
- Framework: Next.js 14 (TypeScript)
- Database: MongoDB
- Styling: Tailwind CSS + Shadcn UI
- APIs: GitHub GraphQL & REST, OpenRouter AI
- Analytics: Umami
- Node.js 18+
- MongoDB
- GitHub Personal Access Token
- OpenRouter API Key (for AI feature)
- Clone the repository
git clone https://github.com/mtwn105/GitHubWrapped.git
cd GitHubWrapped/frontend- Install dependencies
pnpm install- Set up environment variables
Create a .env.local file in the frontend directory:
# MongoDB
MONGODB_URI=mongodb://localhost:27017/githubwrapped
# GitHub
GITHUB_TOKEN=your_github_token
# OpenRouter AI
OPENROUTER_API_KEY=your_openrouter_key
# Umami Analytics (optional)
NEXT_PUBLIC_UMAMI_URL=https://your-umami-instance.com
NEXT_PUBLIC_UMAMI_WEBSITE_ID=your_website_id
# App URL
NEXT_PUBLIC_APP_URL=http://localhost:3000- Run the development server
pnpm devThe application will be available at http://localhost:3000
GitHub Token:
- Go to GitHub Settings → Developer settings → Personal access tokens
- Generate token with
repo,read:user,user:emailscopes
OpenRouter (for AI):
- Sign up at OpenRouter
- Get API key from dashboard
frontend/
├── app/
│ ├── [username]/ # User profile pages
│ ├── about/ # About page
│ ├── actions/ # Server actions
│ ├── api/ # API routes
│ │ ├── [username]/og/ # OG image generation
│ │ ├── ai/ # AI analysis
│ │ └── stats/ # Stats endpoints
│ └── page.tsx # Home page
├── components/ # UI components
├── lib/
│ ├── models/ # MongoDB models
│ ├── services/ # Business logic
│ ├── github.ts # GitHub API
│ └── mongodb.ts # DB connection
└── types/ # TypeScript types
GET /api/stats/[username]- Get user statsPOST /api/stats/[username]- Generate user statsGET /api/stats/top- Top 6 usersGET /api/stats/all- All usersPOST /api/ai- AI analysisGET /api/[username]/og- OG image
- Import your repository to Vercel
- Set
frontendas root directory - Add environment variables:
MONGODB_URI=your_mongodb_uri GITHUB_TOKEN=your_github_token OPENROUTER_API_KEY=your_openrouter_key NEXT_PUBLIC_UMAMI_URL=your_umami_url NEXT_PUBLIC_UMAMI_WEBSITE_ID=your_umami_id NEXT_PUBLIC_APP_URL=https://your-domain.com - Deploy
- Create cluster at MongoDB Atlas
- Create database user
- Whitelist IPs (
0.0.0.0/0for Vercel) - Add connection string to Vercel env vars
Contributions are welcome! Feel free to submit a Pull Request.
- Fork the repository
- Create feature branch
- Commit your changes
- Push and open a PR
This project is licensed under the MIT License - see the LICENSE file for details.
Created by Amit Wani
