A comprehensive event management and registration system built with Next.js, featuring automated email notifications, QR code generation, and food coupon tracking.
- Event Management: Create and manage multiple events with details and dates
- Student Registration: Register students for events with duplicate prevention
- Email Notifications: Automated email with registration details and QR code
- QR Code Generation: Unique QR codes for each registration, stored in Azure Blob Storage
- Ticket System: Public ticket pages accessible via QR code
- Food Coupon Tracking: Admin-controlled food coupon issuance and status tracking
- Participant Management: View all participants per event with comprehensive details
- Email/Password based authentication using NextAuth
- Protected admin dashboard
- Session management with JWT strategy
- Admin-only actions (food coupon issuance)
- Automated email notifications upon registration
- Beautiful HTML email templates
- Embedded QR codes from Azure storage
- Registration and event details included
- Generated using QRCode library
- Uploaded to Azure Blob Storage
- Public access for scanning
- Links to ticket verification page
- Visible to everyone (issued/not issued status)
- Admin-only issuance button (when logged in)
- One-time issuance protection
- Fast confirmation dialog for rush hour efficiency
- Real-time status updates
- Framework: Next.js 16.0.0 (App Router with Turbopack)
- Authentication: NextAuth v4.24.11
- Database: MongoDB with Mongoose
- Email: Nodemailer (Gmail)
- Storage: Azure Blob Storage
- QR Code: qrcode library
- Styling: SCSS Modules
- Runtime: React 19.2.0
- Node.js (v18 or higher)
- MongoDB (local or Atlas)
- Azure Storage Account
- Gmail account with App Password
-
Clone the repository
git clone https://github.com/iicnitdgp/Event_Registration.git cd Event_Registration/event-registration -
Install dependencies
npm install
-
Configure environment variables
Create a
.env.localfile in the root directory:# MongoDB Connection MONGODB_URI=mongodb://localhost:27017/event-registration # NextAuth Configuration NEXTAUTH_SECRET=your-secret-key-change-this-in-production NEXTAUTH_URL=http://localhost:3000 # Admin Credentials EMAIL_ID=your-admin-email@example.com EMAIL_PASSWORD=your-admin-password # Email Configuration (Gmail) PassKey=your-gmail-app-password-here # Azure Storage Configuration AZURE_STORAGE_CONNECTION_STRING=your-azure-connection-string AZURE_STORAGE_CONTAINER_NAME=uploads
-
Generate NextAuth Secret (optional but recommended)
openssl rand -base64 32
-
Set up Gmail App Password
- Go to Google Account β Security β 2-Step Verification
- Scroll to "App passwords"
- Generate password for "Mail"
- Copy the password to
PassKeyin.env.local
-
Set up Azure Storage
- Go to Azure Portal
- Create/Select Storage Account
- Go to Access keys
- Copy Connection String to
.env.local
Development mode:
npm run devProduction build:
npm run build
npm startOpen http://localhost:3000 in your browser.
event-registration/
βββ app/
β βββ api/
β β βββ auth/[...nextauth]/ # NextAuth configuration
β β βββ DBOperation/ # Database operations
β β βββ events/ # Event CRUD endpoints
β β βββ register/ # Registration endpoint
β β βββ participants/ # Participants management
β β βββ ticket/ # Ticket verification
β β βββ upload/image/ # Azure image upload
β βββ dashboard/ # Admin dashboard
β βββ ticket/[eventId]/[registrationId]/ # Public ticket page
β βββ globals.css
β βββ layout.js
β βββ page.js # Login page
βββ component/
β βββ CreateEvent.js/ # Event creation form
β βββ EventRegistration/ # Registration form
β βββ ViewParticipants/ # Participants table
β βββ sessionwrapper.js # Session provider
βββ lib/
β βββ db.js # MongoDB connection
β βββ mail.js # Email service
β βββ qrcode.js # QR code generation & Azure upload
βββ model/
β βββ event.js # Event schema
β βββ event_register.js # Registration schema
βββ public/
{
EventName: String (required),
EventDetails: String,
EventDate: Date (required),
timestamps: true
}{
EventID: ObjectId (ref: Event, required),
Name: String (required),
Email: String (required),
Phone: String,
RollNo: String (required),
QRCodeUrl: String,
FoodCuponIssue: Boolean (default: false),
timestamps: true
}- Navigate to
/(login page) - Enter admin email and password (configured in
.env.local) - Redirects to
/dashboardafter successful login
- Go to "Create Event" tab in dashboard
- Fill in Event Name, Details, and Date
- Click "Create Event"
- Go to "Register for Event" tab
- Select an event from dropdown
- Fill in student details (Name, Email, Phone, Roll Number)
- Click "Register"
- System checks for duplicates (by Roll No or Email)
- Email sent with QR code upon successful registration
- Go to "View Participants" tab
- Select an event from dropdown
- View table with all registered participants
- See QR code links and food coupon status
- Delete participants if needed
- Scan QR code or visit ticket page
- Login as admin
- Click "Issue Food Coupon" button
- Confirm in dialog
- Status updates immediately (no success popup for speed)
- Anyone can access:
/ticket/[eventId]/[registrationId] - Shows event details, participant info, QR code
- Food coupon status visible to everyone
- Admin actions visible only when logged in
- JWT-based session management
- Protected API routes with authentication checks
- Duplicate registration prevention
- One-time food coupon issuance
- Environment variable configuration
- Secure password handling
- Responsive design (mobile-friendly)
- SCSS modules for styling
- Tabbed navigation in dashboard
- Color-coded status badges
- Loading states and error handling
- Confirmation dialogs for critical actions
The automated email includes:
- Event registration confirmation header
- Personal information (Name, Roll No, Email, Phone)
- Event details (Name, Date, Description)
- Embedded QR code image from Azure
- Link to ticket page
- Professional formatting with brand colors
- Gmail daily sending limits apply
- Azure storage costs for QR codes
- Single admin account (can be extended to multiple)
- No email validation beyond format check
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available under the MIT License.
- IIC NIT Dgp - iicnitdgp
- Next.js team for the amazing framework
- NextAuth for authentication solution
- Azure for blob storage
- MongoDB for database solution
For issues and questions, please create an issue in the GitHub repository.
Built with β€οΈ for efficient event management