Skip to content

snehal242005/EventSphere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EventPass — Event Pass Generation & Verification System

Full-stack system for engineering college events with QR-based pass generation, PDF download, and gate scanning.


Tech Stack

Layer Technology
Backend Java 17, Spring Boot 3.2, Spring Security, JPA
Database MySQL 8
Auth JWT (jjwt 0.11.5)
PDF iText7 7.2.5
QR Code ZXing 3.5.2
Frontend Vanilla HTML/CSS/JS · Inter + Poppins (Google Fonts)

Project Structure

EventPass/
├── backend/                     # Spring Boot project
│   ├── pom.xml
│   └── src/main/java/com/eventpass/
│       ├── config/              # DataInitializer (seeds DB)
│       ├── controller/          # REST controllers
│       ├── dto/                 # Request/Response DTOs
│       ├── model/               # JPA entities
│       ├── repository/          # Spring Data JPA repos
│       ├── security/            # JWT filter + SecurityConfig
│       └── service/             # Business logic + PDF/QR
└── frontend/                    # Static HTML/CSS/JS
    ├── index.html               # Event listing with filters
    ├── event-detail.html        # Event detail + seats
    ├── register.html            # Dynamic registration form
    ├── pass-download.html       # Pass preview + PDF download
    ├── admin-login.html         # Admin login (JWT)
    ├── admin-dashboard.html     # Events / Registrations / Attendance
    ├── admin-scan.html          # Mobile QR scanner
    ├── css/
    │   ├── style.css
    │   └── admin.css
    └── js/
        ├── main.js              # Shared utilities + apiFetch
        ├── events.js            # Event listing + filters
        ├── register.js          # Registration form logic
        ├── admin.js             # Dashboard tabs + modals
        └── scan.js              # jsQR camera scanner

Prerequisites

  • Java 17+
  • Maven 3.8+
  • MySQL 8.x running locally
  • A modern browser (Chrome/Edge recommended for QR scanning)

Setup & Run

1. Create the MySQL Database

CREATE DATABASE eventpass_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

2. Configure Database Password

Edit backend/src/main/resources/application.properties:

spring.datasource.username=root
spring.datasource.password=YOUR_MYSQL_PASSWORD

3. Build & Run the Backend

cd backend
mvn clean install
mvn spring-boot:run

The server starts on http://localhost:8080

On first run, DataInitializer automatically:

  • Creates the default admin account
  • Seeds 8 demo events

4. Open the Frontend

Open frontend/index.html directly in your browser, or serve it with any static server:

# Using Python
cd frontend
python -m http.server 5500
# Then open http://localhost:5500

Tip: VS Code's Live Server extension works great for this.


Default Credentials

Role Email Password
Admin admin@techfest.com Admin@123

API Endpoints

Public

Method Endpoint Description
GET /api/events All active events
GET /api/events/{id} Event detail + seats remaining
POST /api/register Register user, returns pass code
GET /api/pass/{code}/download Download PDF event pass
GET /api/pass/{code}/info Pass info JSON

Admin (JWT Bearer required)

Method Endpoint Description
POST /api/admin/login Login, returns JWT token
GET /api/admin/events All events with registration count
POST /api/admin/events Create new event
PUT /api/admin/events/{id} Update event
GET /api/admin/events/{id}/registrations All registrations for an event
POST /api/admin/scan Verify QR pass code
GET /api/admin/attendance/{eventId} Attendance log for an event

Registration Request Body

{
  "eventId": 1,
  "firstName": "Snehal",
  "lastName": "Jadhav",
  "email": "snehal@college.edu",
  "mobile": "9876543210",
  "collegeName": "MIT College of Engineering",
  "branch": "Computer Engineering",
  "year": "3rd",
  "teamName": "Code Warriors",
  "teamMemberEmails": ["teammate1@college.edu", "teammate2@college.edu"]
}

teamName and teamMemberEmails are only used for GROUP events.


Scan Response

{
  "status": "VERIFIED",
  "message": "Valid pass! Welcome to Hackathon 2026",
  "registrantName": "Snehal Jadhav",
  "eventName": "National Hackathon 2026",
  "collegeName": "MIT College of Engineering",
  "year": "3rd",
  "teamName": "Code Warriors",
  "scannedAt": "15 Jul 2026, 09:30 AM"
}

Status values: VERIFIED | ALREADY_SCANNED | INVALID

Notes

  • iText7 is used under the AGPL license (free for open-source / educational use).
  • The JWT secret in application.properties is a demo key — change it in production.
  • CORS is open (allowedOriginPatterns: *) for local development.
  • The QR scanner (admin-scan.html) requires HTTPS or localhost for camera access.

About

Event pass generation and verification system

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors