Skip to content

AKVishwakrama/QR_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Management System with QR-Based Entry

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.

What It Does

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.

Tech Stack

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

How to Run Locally

Prerequisites

You'll need:

  • Java JDK 8 or higher
  • PostgreSQL installed and running
  • IntelliJ IDEA or any Java IDE

Database Setup

  1. Create a database:
CREATE DATABASE event_management;
  1. That's it! The application creates tables automatically on first run.

Backend Setup

  1. Download these JAR files and put them in your project:

  2. Add them to your project libraries in IntelliJ:

    • File → Project Structure → Libraries → Add JARs
  3. Update database credentials in EventManagementRestAPI.java:

private static final String PASSWORD = "your_password_here";
  1. 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" EventManagementRestAPI

You should see: "Server running on: http://localhost:8080"

Frontend Setup

  1. Open frontend/script.js and verify API URL:
const API_BASE_URL = 'http://localhost:8080/api';
  1. Open frontend/index.html in your browser. That's it!

Features

Event Management

  • 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

Registration

  • 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

Entry Validation

  • 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

Reports

  • Dashboard shows total events, registrations, and revenue
  • Event-wise reports with attendance rates
  • Revenue tracking
  • All data updated in real-time

How the QR Code Works

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:

  1. Looks up this code in the database
  2. Checks if it matches the event
  3. Verifies it hasn't been used before
  4. Marks it as checked-in if valid

The QR codes are actual scannable images (not just text) thanks to QRCode.js.

Database Schema

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

What I Learned

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.

Known Limitations

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.

Possible Improvements

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

Screenshots

Screenshot 2025-12-19 212523 Screenshot 2025-12-19 212603 Screenshot 2025-12-19 125512 Screenshot 2025-12-19 212446 Screenshot 2025-12-19 212150 Screenshot 2025-12-19 212549

Project Structure

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

Contributing

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!

License

Feel free to use this code for learning or your own projects. No restrictions.

Contact

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published