Round-Robin Coupon Distribution System
Documentation
Key Features
- Sequential coupon distribution with no repetition
- Guest user access without login requirements
- IP and cookie-based abuse prevention
- Secure admin panel for coupon management
- Comprehensive tracking of claimed coupons
- Dynamic enabling/disabling of coupons
System Architecture
Frontend Client
User coupon claiming
Backend Server
Distribution logic & API
Database
Coupon & user tracking
Setup Instructions
Prerequisites
- Node.js (v14.0.0 or higher)
- Next.js (v15)
- MongoDB (v4.4 or higher)
- npm or yarn package manager
Installation Steps
Clone the repository
https://github.com/SwastikIIIT/Round-Robin-Coupon-Distribution-System.gitInstall dependencies
cd Round-Robin-Coupon-Distribution-System
npm installConfigure environment variables
MONGODB_URI=mongodb+srv://whirphool123:Vasuthegreat@cluster0.yitht.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0
AUTH_SECRET=secrethelloStart the application
npm run start
Security Features
| Feature | Description |
|---|---|
| IP-Based Tracking | Prevents multiple claims from the same IP address within the configured cooldown period (default: 90 seconds). |
| Cookie-Based Tracking | Uses browser cookies to identify repeat visitors, even if they change IP addresses. |