[Web Application]/5 min read/CHATHURA DEVINDA

BookMyTicketLK

Event Ticket Management System is a production-grade, full-stack event ticketing and point-of-sale (POS) platform built with the MERN stack (MongoDB, Express, React 19, Node.js) and Socket.IO. It manages the complete event lifecycle from organizer onboarding and interactive commission negotiation to public/guest checkout, on-site POS box-office sales, automated e-ticket PDF generation, and real-time QR gate scanning. Engineered with ACID-compliant database transactions, automated background cron pipelines, and multi-tier role-based access control, the platform ensures zero overselling under high-concurrency traffic while automating financial escrow and post-event settlements.

EventsBookingTickets
BookMyTicketLK

Overview

The Event Ticket Management System is a comprehensive, end-to-end event commerce and venue entry ecosystem built on the MERN Stack. It bridges the gap between online ticket marketplaces and physical venue box offices by unifying public web checkout, guest purchasing, on-site Point of Sale (POS), organizer financial settlements, and QR-based gate validation into a single real-time platform.

Engineered to handle high-concurrency ticket drops with atomic seat reservations, real-time WebSocket updates, and automated lifecycle management.

Core Architecture & Role Ecosystem

The platform operates across five distinct role-based portals, ensuring strict separation of privileges and tailored workflows for every stakeholder:

Portal / RolePrimary ResponsibilitiesKey Capabilities
Admin GovernancePlatform oversight, moderation & financeEvent & organizer approval, commission negotiation, settlement payouts, audit logs
Seller (Organizer)Event lifecycle & revenue managementMulti-date event creation, tier pricing, pass requests, team management, CSV analytics
Buyer & GuestEvent discovery & ticket purchasingInteractive search, guest checkout without login, instant PDF tickets & charity badges
Gate Agent (POS)On-site box office ticket salesFast terminal checkout (Cash, Card, QR, Split), instant print/email, immediate check-in
ScannerVenue access controlMobile/handheld QR validation, multi-day check-in tracking, anti-passback protection

Key Engineering Highlights

1. Concurrency-Safe Ticket Reservations

During high-demand ticket sales, preventing overselling is critical. The checkout engine uses ACID-compliant database transactions paired with a temporary slot reservation mechanism:

•
Selected tickets are atomically locked with a time-bound TTL reservation window during checkout.
•
Background workers automatically reclaim abandoned carts and release inventory back to the pool in real time.

2. Dynamic Commission Negotiation Engine

Rather than enforcing a rigid platform fee, organizers and administrators can negotiate custom commission structures per event:

•
Organizers propose either a percentage-based or fixed-fee commission model.
•
Built-in bi-directional counter-offer threads with full audit history.
•
Agreed terms are automatically bound to the financial settlement engine for that specific event.

3. Automated Event Lifecycle & Settlement Pipeline

A suite of timezone-aware background jobs orchestrates the entire post-purchase and post-event pipeline without manual intervention:

•
Reservation Cleanup: Reclaims expired pending checkouts automatically.
•
Automated State Transitions: Progresses events from Active → Sales Closed → Completed → Archived based on schedules.
•
Escrow to Available Balance: Automatically calculates net revenue, deducts agreed platform fees and hardware rental costs, and transfers funds from holding escrow to withdrawable balance after event completion.
•
Automated Cloud Backups & Storage Hygiene: Archives essential records and cleans up stale temporary artifacts.

4. Complimentary & Crew Pass Allocation System

Organizers can request categorized passes (VIP, Photographer, Staff) across specific event dates:

•
Automatically calculates complimentary pass quotas based on total venue capacity.
•
Supports seamless upgrade payments when organizers request passes exceeding their complimentary allocation.
•
Generates color-coded PDF credentials and dispatches them directly to crew members via email.

5. Hybrid SSR Meta Injection for SEO

While built as a fast Single Page Application (SPA) with React 19, public event pages feature dynamic server-side metadata injection:

•
Dynamically injects Open Graph (OG), Twitter Cards, and JSON-LD (Event schema) structured data for search engine crawlers and social media link previews.
•
Implements in-memory TTL caching and strict HTML sanitization.

System Workflow Diagram

mermaidCode Snippet
flowchart TD
    A["Organizer Creates Event"] --> B{"Commission Terms"}
    B -->|Standard Rate| C["Admin Approval"]
    B -->|Custom Offer| D["Interactive Negotiation Thread"]
    D --> C
    C --> E["Event Published (Live Sales)"]
    E --> F["Online & Guest Checkout"]
    E --> G["On-Site POS Terminal"]
    F --> H["Automated PDF & QR Generation"]
    G --> H
    H --> I["Venue Gate QR Scanning"]
    I --> J["Automated Escrow Settlement"]