A web-based event ticketing system I built to learn full-stack development. It handles everything from creating events to validating entries at the venue using QR codes.
This is basically like BookMyShow but simpler. You can:
- Create events (conferences, concerts, workshops, etc.)
- Let people register and get tickets with QR codes
- Scan those QR codes at the event entrance to validate entry
- See reports on how many people registered and showed up
I built this because I wanted to understand how event ticketing systems work behind the scenes, and also practice working with databases and REST APIs.
Frontend:
- HTML, CSS, JavaScript
- QRCode.js for generating scannable QR codes
- No framework - just vanilla JavaScript to keep it simple
Backend:
- Java with HttpServer (built-in, no Spring needed)
- REST API architecture
- Gson for JSON handling
Database:
- PostgreSQL
- Three tables: events, attendees, and registrations
You'll need:
- Java JDK 8 or higher
- PostgreSQL installed and running
- IntelliJ IDEA or any Java IDE
- Create a database:
CREATE DATABASE event_management;- That's it! The application creates tables automatically on first run.
-
Download these JAR files and put them in your project:
-
Add them to your project libraries in IntelliJ:
- File → Project Structure → Libraries → Add JARs
-
Update database credentials in
EventManagementRestAPI.java:
private static final String PASSWORD = "your_password_here";- Run the backend:
javac -cp ".:gson-2.10.1.jar:postgresql-42.6.0.jar" EventManagementRestAPI.java
java -cp ".:gson-2.10.1.jar:postgresql-42.6.0.jar" EventManagementRestAPIYou should see: "Server running on: http://localhost:8080"
- Open
frontend/script.jsand verify API URL:
const API_BASE_URL = 'http://localhost:8080/api';- Open
frontend/index.htmlin your browser. That's it!
- Create events with name, venue, date, capacity, and pricing
- Different categories: Conference, Concert, Workshop, Sports
- Real-time capacity tracking
- Events are listed with registration status
- Simple form with name, email, phone
- Multiple ticket types (VIP, Standard, Student)
- Generates unique QR code for each ticket
- Ticket displays all event details plus scannable QR code
- Scan QR code at venue
- System checks if it's valid, for the right event, and not already used
- Shows attendee details on successful validation
- Prevents duplicate entries
- Dashboard shows total events, registrations, and revenue
- Event-wise reports with attendance rates
- Revenue tracking
- All data updated in real-time
Each registration gets a unique QR code generated using SHA-256 hashing. The code includes:
- Registration ID
- Event ID
- Attendee ID
- Timestamp
Example: A3F5D8E2B1C4F7A9D6E3
When scanned at the venue, the system:
- Looks up this code in the database
- Checks if it matches the event
- Verifies it hasn't been used before
- Marks it as checked-in if valid
The QR codes are actual scannable images (not just text) thanks to QRCode.js.
events table:
- Stores event details (name, venue, dates, capacity, price)
- Each event gets a unique ID like
EVT-1234567890-ABC123
attendees table:
- Stores user information (name, email, phone)
- Email is unique to prevent duplicate accounts
registrations table:
- Links attendees to events
- Contains the QR code and check-in status
- Foreign keys ensure data integrity
Building this taught me a lot:
- How to design a RESTful API
- Database schema design with proper relationships
- Security basics like SQL injection prevention (PreparedStatements)
- CORS handling for cross-origin requests
- SHA-256 hashing for unique ID generation
- Working with PostgreSQL from Java
The trickiest part was getting the QR code validation to work reliably without duplicate entries. I solved it using a boolean flag in the database plus transaction handling.
I know there are things I'd improve:
- No payment gateway (tickets are free right now)
- Email notifications aren't automated
- No user authentication system
- Can't upload event images
- Single server setup (no load balancing)
But for a learning project, it covers the core functionality well. I focused on getting the fundamentals right rather than adding every possible feature.
If I continue working on this:
- Add Razorpay/Stripe integration for payments
- Send automated email confirmations using JavaMail
- Add user login with JWT authentication
- Add search and filtering for events
- SMS notifications via Twilio
qr_project/
├── src/JavaBackend
│ └── EventManagementRestAPI.java # Backend REST API
├── frontend/
│ ├── index.html # Main page
│ ├── styles.css # Blue-black theme
│ └── script.js # Frontend logic
├── README.md
└── .gitignore
This is a learning project, but if you want to try it out or suggest improvements, feel free to:
- Fork the repo
- Make your changes
- Submit a pull request
I'm always interested in learning better ways to do things!
Feel free to use this code for learning or your own projects. No restrictions.
If you have questions or suggestions:
- Open an issue on GitHub
- Or reach out to me (add your contact info here)
Built this while learning full-stack development. It's not perfect, but it works, and I learned a ton building it.