A full-stack web application for managing convention tickets with QR code verification. Built with Node.js, Vue.js, PostgreSQL, and deployed using Docker Compose.
- Add Tickets: Create and send tickets with QR codes via email
- Dashboard: View all issued tickets with statistics
- Ticket Information: Name, teacher name, email, status (used/available)
- QR Code Generation: Automatic QR code generation for each ticket
- Email Delivery: Tickets are automatically sent to the provided email address
- QR Code Scanning: Scan QR codes to verify tickets
- Access Grant: Shows success screen with attendee name
- Usage Tracking: Marks tickets as used after verification
- Error Handling: Displays appropriate messages for invalid or already-used tickets
- Backend: Node.js + Express.js
- Frontend: Vue 3 + Vue Router + Pinia
- Database: PostgreSQL
- Authentication: JWT
- QR Codes: qrcode library
- Email: Nodemailer
- Deployment: Docker + Docker Compose
- Docker and Docker Compose installed
- Gmail account with App Password (or other SMTP credentials)
# Navigate to your project directory
cd convention-ticket-manager
# Configure email settings
# Edit .env file and add your email credentials
nano .envEdit the .env file and add your SMTP credentials:
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password-hereFor Gmail:
- Go to Google Account settings
- Enable 2-Factor Authentication
- Generate an App Password: https://support.google.com/accounts/answer/185833
- Use the 16-character password in the
.envfile
Development Mode (with hot reloading):
# Start with Vite HMR and nodemon
docker-compose -f docker-compose.dev.yml up --build
# Or run in detached mode
docker-compose -f docker-compose.dev.yml up -d --buildProduction Mode:
# Build and start all services
docker-compose up --build
# Or run in detached mode
docker-compose up -d --buildThe application will be available at:
- Development:
- Frontend: http://localhost:8080 (with HMR)
- Backend API: http://localhost:3000 (with nodemon)
- Production:
- Frontend: http://localhost
- Backend API: http://localhost:3000
- Open http://localhost in your browser
- Click "Register" to create an admin account
- Log in with your credentials
- Start creating tickets!
- Log in to the management interface
- Click "Add New Ticket"
- Fill in:
- Attendee Name
- Teacher Name
- Email Address
- Click "Create & Send Ticket"
- The ticket will be created and emailed with a QR code
- Scan the QR code from the email
- The verification page will open automatically
- If valid and unused:
- Shows "Access Granted" with checkmark
- Displays attendee name and teacher name -Development Mode with Docker (Recommended)
The dev setup includes:
- Vite HMR for instant frontend updates
- Nodemon for automatic backend restarts
- Volume mounting for live code changes
- PostgreSQL database
# Start development environment
docker-compose -f docker-compose.dev.yml up
# Rebuild after package.json changes
docker-compose -f docker-compose.dev.yml up --build
# Stop development environment
docker-compose -f docker-compose.dev.yml downChanges to .vue, .js, or .css files will hot reload instantly!
Backend:
cd backend
npm install
cp .env.example .env
# Edit .env with your configuration
npm run migrate # Run database migrations
npm run seed # Create default admin user
npm run dev # Start development server with nodemonFrontend:
cd frontend
npm install
npm run dev # Start Vite dev server with HMR
```bash
cd backend
npm install
cp .env.example .env
# Edit .env with your configuration
npm run migrate # Run database migrations
npm run dev # Start development serverFrontend:
cd frontend
npm install
npm run serve # Start development serverUsers Table:
- id (Serial Primary Key)
- username (Unique)
- password (Hashed)
- created_at (Timestamp)
Tickets Table:
- id (Serial Primary Key)
- name (Varchar)
- teacher_name (Varchar)
- email (Varchar)
- uuid (Unique UUID)
- is_used (Boolean)
- used_at (Timestamp)
- created_at (Timestamp)
POST /api/auth/register- Register new userPOST /api/auth/login- Login user
GET /api/tickets- Get all ticketsPOST /api/tickets- Create and send ticketDELETE /api/tickets/:id- Delete ticket
GET /api/verify/:uuid- Verify ticket by UUID
PORT=3000
DATABASE_URL=postgresql://postgres:password@db:5432/convention_tickets
JWT_SECRET=your-secret-key-change-this
JWT_EXPIRES_IN=7d
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password
EMAIL_FROM=Convention Tickets <your-email@gmail.com>
FRONTEND_URL=http://localhost- Change JWT Secret: Update
JWT_SECRETin production - Database Password: Change PostgreSQL password in docker-compose.yml
- HTTPS: Use HTTPS in production with proper SSL certificates
- Email Security: Use App Passwords, not your actual password
# Start dev services with hot reloading
docker-compose -f docker-compose.dev.yml up
# Stop dev services
docker-compose -f docker-compose.dev.yml down
# View dev logs
docker-compose -f docker-compose.dev.yml logs -f
# Rebuild dev services
docker-compose -f docker-compose.dev.yml up --build
# Remove dev volumes (clean database)
docker-compose -f docker-compose.dev.yml down -v# Start production services
docker-compose up
# Stop production services
docker-compose down
# View production logs
docker-compose logs -f
# Rebuild production services
docker-compose up --build
# Remove production DATABASE_URL in backend environment
### Frontend Not Loading
- Check if backend is running: http://localhost:3000/health
- Clear browser cache
- Check frontend logs: `docker-compose logs frontend`
## Docker Commands
```bash
# Start services
docker-compose up
# Stop services
docker-compose down
# View logs
docker-compose logs -f
# Rebuild services
docker-compose up --build
# Remove volumes (clean database)
docker-compose down -v- Update environment variables for production
- Change default passwords and secrets
- Configure proper domain names
- Set up SSL/TLS certificates
- Configure email service (SendGrid, Mailgun, etc.)
- Set up proper backup for PostgreSQL database
- Configure firewall rules
MIT
For issues and questions, please open an issue on the repository.