A Next.js application that generates customizable SVG badges for tracking visits to your projects or websites.
- 🎨 Native Color Picker: Uses HTML5 native color inputs for maximum compatibility and simplicity
- 🎯 Real-time Preview: See your badge changes instantly as you customize
- 🔧 Highly Customizable: Control colors, labels, shadows, and more
- 📊 Visit Tracking: Automatic visit counting with MongoDB storage
- 🔐 Pass Key Protection: Secure badge count modification
- 📋 Easy Integration: Copy-paste ready URLs for embedding
Visit the main page to use the interactive badge generator:
- Set your unique ID and pass key
- Customize colors using native HTML5 color inputs
- Preview your badge in real-time
- Copy the generated URL for use
Your badge URL will look like:
https://yourdomain.com/your-unique-id?label=Visits&CBGC=1CA2F1&...
label: Badge label text (default: "Visits")PK: Pass key for secure operationsSETC: Set specific count (requires correct pass key)LBGC: Label background color (hex without #, default: "484848")CBGC: Count background color (hex without #, default: "1CA2F1")LTC: Label text color (hex without #, default: "ffffff")CTC: Count text color (hex without #, default: "ffffff")LSHW: Label shadow color (hex without #, default: "1")CSHW: Count shadow color (hex without #, default: "1")SHWO: Shadow opacity (0-100, default: "30")swap: Swap label and count positions (0 or 1, default: "0")
<img src="https://yourdomain.com/your-unique-id" alt="Visits" />Make sure to set your MongoDB connection string. Copy .env.example to .env and update:
MONGODB_URI=your_mongodb_connection_string
port=3000# Install dependencies
npm install
# Run development server
npm run dev
# Build for production
npm run buildVisit http://localhost:3000 to access the badge generator interface (or another port if 3000 is in use).