About this project

GitHub Visitor Counter is an open-source tool that displays country flags of visitors on your GitHub profile README. It runs as a serverless API deployed on Vercel, requiring zero maintenance or account registration. ## Overview Users add a single markdown image tag to their GitHub profile to show where visitors come from. The service integrates with the Flag Counter API and provides four display modes: Top Countries, Flag Map, Flags From (US/CA), and Mini Counter. ## Key Features - **One-line integration**: Add a single markdown line to any GitHub profile README - **No registration required**: Works immediately with just a GitHub username - **Four display modes**: Top countries list, flag map visualization, location-filtered flags, and a compact mini counter - **Multiple themes**: Default, Dark, GitHub, GitHub Dark, and Transparent - **Per-repository counters**: Track visits to individual repositories separately - **Official ID compatible**: Supports existing Flag Counter IDs for dashboard integration - **Real-time configuration tool**: Interactive web dashboard with live preview - **Keyboard shortcuts and config import/export** for power users ## Display Modes 1. **Top Countries**: Grid of flags sorted by visitor count 2. **Flag Map**: Geographic map visualization of visitor locations 3. **Flags From**: Filtered flags showing only visitors from specified countries (US or Canada) 4. **Mini Counter**: Compact display showing either flag count or page views ## Tech Stack Built with Next.js 15, React 19, TypeScript, Tailwind CSS, and deployed on Vercel with global CDN caching. ## Usage Add to your GitHub profile README: ``` ![](https://github-visitor-counter-tau.vercel.app/api?username=YOUR_USERNAME) ``` Optional parameters include `displayMode`, `theme`, `columns`, `maxflags`, `label`, custom colors, and more. Per-repository tracking uses `repo` or the combined `username/repo` format. Existing Flag Counter users can pass a `counterId` parameter. ## Self-Hosting The project is MIT-licensed and can be self-hosted via Vercel deployment or local development with `npm run dev`. All source code is available in the repository.