A modern, full-stack MERN application for event ticket generation and management with QR code support, admin dashboard, and beautiful animated UI.
- β Event Registration - Simple form-based registration for events
- β Instant Ticket Generation - Automatic ticket ID and QR code generation
- β Downloadable Tickets - Download tickets as high-quality PDF with QR code
- β Dual Verification - Verify tickets by manual entry or QR code scanning
- β QR Code Scanner - Camera-based QR code scanning for instant verification
- β Fully Responsive - Perfect on mobile, tablet, and desktop
- β Network Access - Works on local network and via port forwarding
- β Secure Authentication - JWT-based admin login
- β Dashboard Analytics - Visual statistics with interactive charts
- β User Management - View and search all registered users
- β Event Management - Add and manage events dynamically
- β Dual Ticket Verification - Manual entry or QR code scanning
- β Camera Scanner - Built-in QR code scanner for quick verification
- β Search & Filter - Real-time search through registrations
- β Mobile-Friendly Dashboard - Full admin functionality on mobile devices
- β Modern UI - Glassmorphism and neon gradient design
- β Smooth Animations - Framer Motion animations throughout
- β QR Code Generation - Unique QR codes for each ticket
- β PDF Export - Download tickets as PDF using html2canvas & jsPDF
- β Toast Notifications - Real-time feedback with react-hot-toast
- β Confetti Effects - Celebration animations on success
- β RESTful API - Clean, well-structured backend
- React 18 - UI library
- Vite - Build tool with network access
- Tailwind CSS - Utility-first styling
- Framer Motion - Smooth animations
- React Router - Client-side routing
- Axios - HTTP client
- Recharts - Data visualization
- html2canvas & jsPDF - High-quality PDF generation
- jsQR - QR code scanning
- Lucide React - Beautiful icons
- React Hot Toast - Toast notifications
- Canvas Confetti - Celebration effects
- Node.js - Runtime
- Express - Web framework
- MongoDB - Database
- Mongoose - ODM
- JWT - Authentication
- bcryptjs - Password hashing
- QRCode - QR code generation
- CORS - Cross-origin support
- Node.js (v16 or higher)
- MongoDB (local or Atlas)
- npm or yarn
- Navigate to backend directory:
cd backend- Install dependencies:
npm install- Create
.envfile:
cp .env.example .env- Update
.envwith your configuration:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/eticket-system
JWT_SECRET=your_super_secret_jwt_key_here
NODE_ENV=development- Create admin account:
node scripts/createAdmin.js- Seed sample events (optional):
node scripts/seedEvents.js- Start the server:
npm run devBackend will run on http://localhost:5000
- Navigate to frontend directory:
cd frontend- Install dependencies:
npm install- Start the development server:
npm run devFrontend will run on http://localhost:3000
- Visit the homepage
- Click "Register Now"
- Fill in registration details and select an event
- Receive instant ticket with QR code
- Download ticket as PDF
- Navigate to
/admin/login - Login with credentials:
- Email:
admin@eticket.com - Password:
admin123
- Email:
- Access dashboard with:
- User statistics
- Event management
- Ticket verification
- Analytics charts
E-Ticket_Generator_System/
βββ backend/
β βββ config/
β β βββ db.js
β βββ controllers/
β β βββ adminController.js
β β βββ eventController.js
β β βββ userController.js
β βββ middleware/
β β βββ auth.js
β βββ models/
β β βββ Admin.js
β β βββ Event.js
β β βββ User.js
β βββ routes/
β β βββ adminRoutes.js
β β βββ eventRoutes.js
β β βββ userRoutes.js
β βββ scripts/
β β βββ createAdmin.js
β β βββ seedEvents.js
β βββ utils/
β β βββ generateTicketID.js
β β βββ generateToken.js
β βββ .env.example
β βββ package.json
β βββ server.js
βββ frontend/
β βββ public/
β βββ src/
β β βββ components/
β β β βββ Button.jsx
β β β βββ Card.jsx
β β β βββ Footer.jsx
β β β βββ InputField.jsx
β β β βββ Loader.jsx
β β β βββ Navbar.jsx
β β β βββ QRScanner.jsx
β β βββ pages/
β β β βββ AdminDashboard.jsx
β β β βββ AdminLogin.jsx
β β β βββ Home.jsx
β β β βββ NotFound.jsx
β β β βββ Register.jsx
β β β βββ Ticket.jsx
β β β βββ Verify.jsx
β β βββ App.jsx
β β βββ index.css
β β βββ main.jsx
β βββ index.html
β βββ package.json
β βββ tailwind.config.js
β βββ vite.config.js
βββ README.md
POST /api/register- Register for an eventGET /api/ticket/:ticketID- Get ticket detailsGET /api/events- Get all active eventsGET /api/events/:id- Get single event
POST /api/admin/login- Admin loginGET /api/admin/users- Get all usersGET /api/admin/events- Get all eventsGET /api/admin/stats- Get dashboard statisticsGET /api/admin/verify/:ticketID- Verify ticketPOST /api/admin/add-event- Add new event
- Glassmorphism Effects - Modern frosted glass design
- Neon Gradients - Vibrant color schemes
- Smooth Animations - Page transitions and hover effects
- Responsive Layout - Mobile-first design
- Dark Theme - Eye-friendly dark mode
- Interactive Elements - Animated buttons and cards
The application includes a built-in QR code scanner for instant ticket verification:
- Camera Access - Uses device camera (front/back)
- Real-time Scanning - Detects QR codes automatically
- Dual Modes - Manual entry or camera scanning
- Mobile Optimized - Works perfectly on smartphones
- Animated UI - Beautiful scanning interface with corner markers
- Auto-Verification - Instantly verifies after scanning
- Navigate to Verify page or Admin Dashboard
- Select "Scan QR Code" mode
- Click "Open Camera Scanner"
- Allow camera permissions
- Point camera at ticket QR code
- Automatic verification!
Access from any device on the same WiFi:
http://YOUR_IP_ADDRESS:3000
The app automatically detects your network and adjusts API URLs accordingly.
For remote access, see PORT_FORWARDING_GUIDE.md for detailed instructions on:
- VS Code port forwarding
- ngrok setup
- HTTPS configuration
- Mobile testing
Add screenshots here after deployment
- Create new web service
- Connect GitHub repository
- Set environment variables
- Deploy
- Connect GitHub repository
- Set build command:
npm run build - Set output directory:
dist - Deploy
- JWT-based authentication
- Password hashing with bcrypt
- Protected admin routes
- Input validation
- CORS configuration
- Environment variables for sensitive data
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
Created with β€οΈ by [Your Name]
- Icons by Lucide
- Animations by Framer Motion
- UI inspiration from modern event platforms
Note: This is a demonstration project. For production use, implement additional security measures and error handling.