A backend system for managing college event check-ins using QR codes. The system allows users to register for events and receive a unique QR code. On the event day, organizers can scan the QR to verify attendance and mark the user as "checked-in."
- User Registration and Login with JWT Authentication
- Role-based access (student, admin)
- Event Creation and Management
- QR Code Generation for Event Registration
- Email Notifications with QR Codes
- Admin Dashboard for Attendee Management
- Swagger API Documentation
- Node.js (v14 or higher)
- MongoDB
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd scanin- Install dependencies:
npm install- Create a
.envfile in the root directory with the following variables:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/scanin
JWT_SECRET=your_jwt_secret_key
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_email_password
- Start the development server:
npm run devOnce the server is running, you can access the Swagger documentation at:
http://localhost:3000/api-docs
- POST
/api/auth/register- Register a new user - POST
/api/auth/login- Login user
- POST
/api/events- Create a new event (Admin only) - POST
/api/events/:eventId/register- Register for an event - POST
/api/events/:eventId/check-in/:userId- Check-in an attendee (Admin only) - GET
/api/events/:eventId/attendees- Get event attendees (Admin only)
- Register a new user (student or admin)
- Login to get JWT token
- Use the token in the Authorization header for protected routes
- Create events (admin only)
- Register for events (students)
- Check-in attendees using QR codes (admin only)
- JWT-based authentication
- Password hashing using bcrypt
- Role-based access control
- Input validation using express-validator
- 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 licensed under the MIT License - see the LICENSE file for details.