The goal is to develop a platform for college students that allows them to interact with campus events, clubs, and activities. The platform will provide personalized event calendars, a social media space for clubs, ticket management using QR codes, and more.
'Initial commits for backend development was performed in another repository. "https://github.com/KisuZoid/happen_temp"'
A QR Code-based Event Attendance System with JWT authentication, role-based access, and email verification. Users can register, generate QR codes for events, and mark attendance by scanning them.
β JWT Authentication - Secure login/logout with tokens
β Role-Based Access Control - Admin, Organizer, and User roles
β Password Hashing - Uses bcrypt for encryption
β Email Verification - Users must verify email before login
β Password Reset - Secure OTP-based reset
β Create & Manage Events - Admin & organizers can create, update, and delete events
β QR Code Generation - Unique QR for every user-event pair
β One-Time QR Usage - Prevents multiple scans
β QR Code Validation - Tracks scanned status
β Event Ticketing - Users can generate tickets linked to QR
β Real-time Attendance Marking - Scan QR for check-in
β Duplicate Prevention - Stops multiple entries
β Attendance Logs - Admins can track who attended
β ObjectId Validation - Prevents invalid data input
β User Registration Confirmation
β Password Reset Emails
β Event Notifications
β RESTful API - Well-structured and documented
β MongoDB Integration - Scalable database
β Optimized Indexing - For faster query execution
β Error Handling Middleware - Centralized error management
π¦ backend
β£ π config
β β π db.js # Database connection setup
β£ π controllers
β β£ π authController.js # Handles authentication & JWT
β β£ π eventController.js # Event management
β β£ π qrController.js # QR Code generation & validation
β β£ π ticketController.js # Ticket management
β β£ π userController.js # User profile & role management
β β π attendanceController.js # Attendance tracking
β£ π middleware
β β£ π authMiddleware.js # JWT validation & role-based access
β β£ π roleMiddleware.js # Role-based permissions
β β π errorHandler.js # Centralized error handling
β£ π models
β β£ π eventModel.js # Event schema
β β£ π qrModel.js # QR Code schema
β β£ π ticketModel.js # Ticket schema
β β£ π userModel.js # User schema
β β π attendanceModel.js # Attendance schema
β£ π routes
β β£ π authRoutes.js # Auth routes
β β£ π eventRoutes.js # Event routes
β β£ π qrRoutes.js # QR & attendance routes
β β£ π ticketRoutes.js # Ticket routes
β β£ π userRoutes.js # User routes
β β π attendanceRoutes.js # Attendance routes
β£ π utils
β β£ π emailService.js # Email verification & reset
β β£ π jwtUtils.js # JWT token utilities
β β£ π hashUtils.js # Password hashing
β β π qrUtils.js # QR code generation helpers
β£ π .env # Environment variables
β£ π package.json # Dependencies & scripts
β£ π index.js # Main server file
β£ π app.js # Part of server file
β π README.md # Project documentation
| Method | Route | Description |
|---|---|---|
| POST | /api/auth/register | Register user |
| POST | /api/auth/login | Login user |
| GET | /api/auth/verify/:token | Email verification |
| POST | /api/auth/reset-password | Request password reset |
| Method | Route | Description |
|---|---|---|
| POST | /api/events/create | Create event |
| GET | /api/events/ | Get all events |
| Method | Route | Description |
|---|---|---|
| POST | /api/tickets/generate | Generate ticket |
| Method | Route | Description |
|---|---|---|
| POST | /api/qr/generate | Generate QR Code |
| POST | /api/qr/scan | Scan QR & Mark Attendance |
β Node.js & Express.js
β MongoDB with Mongoose ORM
β JWT Authentication
β Bcrypt for Password Hashing
β QR Code Generation (qrcode package)
β Nodemailer for Emails
β Role-Based Access Control (RBAC)
β Multer (for file handling, if needed)
πΉ JWT Authentication - Ensures secure access
πΉ Password Hashing - Protects stored passwords
πΉ Role-Based Access Control - Restricts unauthorized access
πΉ Preventing QR Code Reuse - Stops multiple scans
- Fork the repo
- Create a new branch (
feature-branch) - Commit changes & push
- Create a Pull Request
This project is MIT Licensed.