Drop this into any GitHub README, portfolio, or blog post:
[](https://gitcity.natrajx.in/YOUR_USERNAME)GitCity fetches your entire GitHub contribution history via the GitHub GraphQL API and renders it as:
No personal access token required. Enter your username and go.
Six handcrafted themes β switch instantly:
| Theme | Preview |
|---|---|
| Matrix | |
| Noir | |
| Aurora | |
| Ocean | |
| Gold | |
| Ice |
The SVG embed API is dynamic β it re-renders from live GitHub data on each request.
Available themes: matrix Β· noir Β· aurora Β· ocean Β· gold Β· ice
<a href="https://gitcity.natrajx.in/YOUR_USERNAME">
<img src="https://gitcity.natrajx.in/api/svg?u=YOUR_USERNAME&theme=aurora"
alt="My GitHub Skyline" width="100%" />
</a><iframe
src="https://gitcity.natrajx.in/YOUR_USERNAME"
width="100%" height="500"
frameborder="0"
title="GitHub Contribution Skyline">
</iframe>Just go to gitcity.natrajx.in/YOUR_USERNAME β no setup needed.
# 1. Clone
git clone https://github.com/natrajx/gitcity
cd gitcity
# 2. Install
npm install
# 3. Set your GitHub token (for API calls)
echo "GITHUB_TOKEN=ghp_your_token_here" > .env.local
# 4. Run locally
vercel dev # uses /api serverless functions
# OR
npm run dev # Vite only (no API β use hosted API instead)
# 5. Deploy to Vercel
vercel --prod| Variable | Required | Description |
|---|---|---|
GITHUB_TOKEN |
Yes | GitHub Personal Access Token (read:user scope) |
Three files live in public/ and are served directly from the site root:
| File | URL | Purpose |
|---|---|---|
public/robots.txt |
/robots.txt |
Search crawler rules, AI bot allowlist, sitemap pointer |
public/sitemap.xml |
/sitemap.xml |
Pages for Google to index |
public/llms.txt |
/llms.txt |
Machine-readable summary for AI assistants (ChatGPT, Claude, Perplexity) |
Why public/? Vite copies everything in public/ verbatim into dist/ at build time, so these files are served at the bare URL with no routing involved β exactly what crawlers and search engines expect.
gitcity/
βββ public/ # β Static files served at site root
β βββ robots.txt # gitcity.natrajx.in/robots.txt
β βββ sitemap.xml # gitcity.natrajx.in/sitemap.xml
β βββ llms.txt # gitcity.natrajx.in/llms.txt
βββ api/
β βββ contributions/[username].js # Serverless: GitHub GraphQL proxy
β βββ og/[username].js # Serverless: SVG generator for embeds
βββ index.html # Root HTML with SEO/OG meta
βββ src/
β βββ App.jsx # Auth flow, URL params
β βββ components/ContributionGraph3D/
β β βββ ContributionGraph3D.jsx # Main graph component + filters
β β βββ IsometricGrid.jsx # SVG isometric 3D skyline
β β βββ CitySimulation.jsx # Three.js driveable city
β β βββ BirdsEyeGrid.jsx # Heatmap view
β β βββ Building.jsx # Individual isometric building
β βββ constants/
β β βββ themes.js # 6 colour themes
β βββ hooks/
β βββ useGitHubData.js # Data fetching hook
βββ vercel.json # Routing rules
βββ vite.config.js
- React 18 β UI
- Vite 5 β build
- Three.js r128 β city simulation (WebGL)
- SVG β isometric skyline (pure, embeddable)
- GitHub GraphQL API β contribution data
- Vercel β hosting + serverless
PRs welcome. Open an issue first for major changes.
git checkout -b feat/your-feature
# make changes
git commit -m "feat: your feature"
git push origin feat/your-feature
# open PR β mainGitCity is free and open-source β no login, no paywall, no token required.
If it made your README cooler or your portfolio stand out, consider buying me a coffee. It goes directly toward hosting costs, GPU time for experiments, and building more free tools like this one.
Built by Rishabh Bhartiya β ML Engineer & full-stack developer. 3 years turning research-grade ideas into production systems at scale.
- π Portfolio: rishabhbhartiya.natrajx.in
- πΌ Projects: rishabhbhartiya.natrajx.in/projects
- βοΈ Writing: rishabhbhartiya.natrajx.in/blog
- π GitHub: @rishabhbhartiya
- β Ko-fi: ko-fi.com/rishabhbhartiya
If GitCity is useful to you, a β on the repo and a mention helps a lot.
Is this the same as thegitcity.com?
No β completely different. See COMPARISON.md for the full breakdown.
MIT Β© Rishabh Bhartiya β free to use, modify, and distribute.
Made with β by Rishabh Bhartiya Β Β·Β gitcity.natrajx.in Β Β·Β More projects Β Β·Β Blog Β Β·Β β Ko-fi