Skip to content

About

An enterprise-grade ticketing and management platform tailored for single-screen cinemas, multiplex auditoriums, and entertainment venues.

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🎬 Booking System β€” Box Office & Ticketing Management Suite

High-performance, offline-capable Box Office Point-of-Sale (POS), Dynamic Screen & Seat Layout Designer, Thermal Ticket Printing Engine, GST/Tax Compliance Management Suite, and Offline Cryptographic Hardware-Bound Licensing.

Author License React TypeScript Vite SQLite WASM Electron GitHub Sponsors


🌟 Overview

Booking System is an enterprise-grade ticketing and management platform tailored for single-screen cinemas, multiplex auditoriums, and entertainment venues. Built with React 18, TypeScript, and an embedded WASM-powered SQLite database (sql.js), it delivers sub-millisecond offline response times, complete ACID transactional integrity, seamless hardware integration with thermal receipt printers, and an unforgeable offline cryptographic licensing engine.


✨ Key Features

🎟️ 1. Box Office Point of Sale (POS)

  • Real-Time Interactive Seat Map: Dynamic SVG/Canvas grid rendering custom row architectures, aisles, wheelchair spots, and seat classifications.
  • Instant Tax & S.CH Computation: Real-time breakdown of Admission Net (ADM), Service Charges (S.CH), CGST, SGST, Cess, and Total Gross.
  • Fast-Paced Counter Workflow: One-click seat allocation, multi-payment support (Cash, UPI / QR, Credit/Debit Cards, Online Partners), and F9 hotkey instant thermal printing.
  • Per-Show Overrides & Class Fallbacks: Real-time pricing lookup prioritizing custom show-rate rules with global seat class fallbacks.

πŸ–¨οΈ 2. ESC/POS & Thermal Ticket Printing Engine

  • 3 Printing Layout & Feed Modes:
    • Horizontal (3-Part Sheet): Prints Accounts ([A]), Distributor ([D]), and Patron ([P]) side-by-side in 1 pass on perforated stationery.
    • Vertical Strip (Uncut Roll): Stacks active copies vertically on a single continuous uncut roll with dashed tear lines and 1 cut at the bottom.
    • Sequential (Cut Each Copy): Prints each copy as a separate slip with auto-cut between copies.
  • Live Ticket Preview & Customization: True-to-life dimension-accurate live previews with horizontal/vertical scrolling, offline system typography stack, font size, margins, and paper orientation.
  • Configurable Simultaneous Copies: Print Accounts ([A]), Distributor ([D]), and Patron ([P]) or custom copies in configurable print orders and purpose tags.
  • Cinema GSTIN Visibility Toggle: Configurable toggle in Cinema Profile to conditionally display or hide GSTIN numbers on printed tickets.
  • Thermal Hardware Support: Direct native integration with standard 80mm and wide-format POS thermal printers (Citizen, Epson, TVS-E, POS-80).

πŸͺ‘ 3. Dynamic Screen & Seat Layout Designer

  • Visual Auditorium Builder: Add and arrange custom rows (A, B, C...) with variable seat counts, aisle gaps, blocked seats, and wheelchair accessibility.
  • Seat Class & Palette Master: Assign individual classes (Gold Plus, Gold, Platinum, Silver, Recliner, Balcony) with custom hex color identifiers, circular swatches, and display orders.
  • Instant Class Navigation: Direct routing from the layout editor to the Seat Classes management tab in Dropdowns & Lookups Master.

πŸ’° 4. Dynamic Pricing & Tax (GST) Masters

  • Multi-Tier Pricing Engine: Base pricing rules per seat class + custom rate overrides per movie showtime.
  • Flexible Tax Calculation Modes: Support for Inclusive (Gross encompasses taxes) and Exclusive (Taxes added atop base rate) tax methodologies.
  • Rounding Rules: Configurable Normal (Math.round), Floor, or Ceiling rounding logic.

πŸ“Š 5. Daily Collection Report (DCR) & Reconciliation

  • Class-wise & Show-wise DCR: Auto-aggregates opening/closing ticket sequences, gross intake, GST breakup, and statutory summary with computer-generated report certification.
  • Payment & Cancellation Breakdown: Real-time aggregation of collections by payment mode (Cash, UPI/QR, Cards) and cancellation reconciliation.
  • Strict Exhibition Date Accounting: Statutorily accounts for show exhibition dates without cross-day leakage.
  • Export & Print: Instant 100% offline print view and CSV export for daily box-office reconciliation.
  • Complete Audit Trail: Immutable logging of all user activities (logins, bookings, cancellations, role modifications).

πŸ” 6. Role-Based Access Control (RBAC) & Security

  • Granular Permissions Matrix: Module-level rights (can_read, can_create, can_update, can_delete) across 8 security domains.
  • Built-in Security Roles: SYSTEM_ADMIN (full control) and OPERATOR (box office counter operations).
  • Hardened SQLite Engine: Strictly parameterized SQL statements to eliminate injection vulnerabilities.

πŸ›‘οΈ 7. Offline Cryptographic Machine Licensing & Capacity Quotas

  • Asymmetric ECDSA (P-256 / SHA-256): Public key embedded in client binary; private key kept strictly offline by developer.
  • Hardware Machine ID Binding: Cryptographically tied to non-volatile host PC hardware (macOS IOPlatformUUID, Windows MachineGuid/wmic, Linux machine-id).
  • Screen & Seating Capacity Quotas: Enforce granular capacity limits (maxScreens, maxSeats) or grant Unlimited access signed tamper-proof into the payload.
  • Quota Enforcement & Upgrade Dialog: Real-time enforcement in Cinema and Screen Layout builders with one-click Machine ID copy and upgrade assistance.
  • Pre-Boot Gatekeeper: Completely locks application views until an authentic .lic file matching the computer's Machine ID is verified.

πŸ› οΈ Technology Stack

Layer Technology
Frontend Framework React 18 + TypeScript
Build Tool Vite 6
Styling & Design System Tailwind CSS v4 + Radix UI Primitives + Lucide Icons
Date & Time Engine date-fns (Modular & Timezone-Safe)
State Management Zustand
Embedded Database sql.js (SQLite WebAssembly) with native IPC disk loading & localStorage snapshotting
Desktop Shell Electron 34 + electron-builder
Cryptography Engine WebCrypto (SubtleCrypto) ECDSA P-256 + SHA-256 Digital Signatures

πŸš€ Getting Started

Prerequisites

  • Node.js: v20.0.0 or higher
  • npm: v9.0.0 or higher

Installation

  1. Clone the repository:

    git clone https://github.com/besaoct/bookingsystem.git
    cd bookingsystem
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev

    Open http://localhost:5173 in your browser.


πŸ–₯️ Running as Desktop Application (Electron)

# Run Electron in development mode
npm run electron:dev

# Build distributable installer for offline clients (requires .lic activation)
npm run electron:build:mac      # macOS DMG (Universal: Apple Silicon + Intel)
npm run electron:build:win      # Windows Installer (x64)

# Build for Mac App Store (MAS) (No license file required, purchased via Apple)
npm run electron:build:mas

πŸ” Offline Software License Generation (Developer Guide)

The system includes both a Web GUI Generator and a CLI Tool for issuing cryptographically signed software licenses with optional screen and seat capacity restrictions.

🌐 Option A: Standalone Web GUI Generator

Open tools/license-generator.html directly in any modern browser:

  • Features built-in cryptographic signing using browser WebCrypto (SubtleCrypto ECDSA P-256).
  • Supports configuring Max Screen Limit and Max Seat Limit with instant "Unlimited" toggle switches.
  • One-click .lic file download and Base64 activation key copying.

πŸ’» Option B: CLI Generator Tool

Run the license:generate CLI script from your terminal:

# 1. 1-Year Subscription License with Screen & Seat Quota
npm run license:generate -- --machine "BS-8F2A-99B1-4CD0-E7A3" --client "Grand Multiplex" --days 365 --screens 4 --seats 600

# 2. Lifetime License with Unlimited Screens & Seats
npm run license:generate -- --machine "BS-8F2A-99B1-4CD0-E7A3" --client "Star Cinemas" --lifetime --screens unlimited --seats unlimited

# 3. Custom Trial License (e.g., 7 Days or 30 Days)
npm run license:generate -- --machine "BS-8F2A-99B1-4CD0-E7A3" --client "Beta Theaters" --trial 7 --screens 2 --seats 300

# 4. Developer Master License (Runs on Any PC)
npm run license:generate -- --machine "*" --client "Master Demo" --lifetime

πŸ“‹ Available CLI Flags

Flag Description Default
--machine, -m Customer's Host PC Machine ID (e.g. BS-XXXX-XXXX-XXXX-XXXX or * for all PCs) Required
--client, -c Business / Cinema / Client Name (e.g. "Grand Multiplex") Required
--licensee, -u Contact Person / Authorized Manager Name Optional
--days, -d Number of days license remains valid 365
--lifetime, -l Issues a permanent Lifetime License (expiresAt: null) false
--trial [days] Issues a Trial License (default: 14 days, or pass custom days) false
--screens, -s Maximum screen / auditorium limit (number or unlimited) unlimited
--seats Maximum seating capacity quota (number or unlimited) unlimited
--out, -o Custom output destination path for .lic file ./[Client]_Software_License.lic

πŸ”„ Customer Activation Workflow

Customer PC                          You (Developer)
────────                         ──────────────
1. Installs app
2. Sees Machine ID  ──────────►  3. Open tools/license-generator.html or run CLI
                                 4. Generates signed [Client].lic with quotas
5. Receives .lic    ◄──────────  5. You send .lic file (or activation key)
6. Loads .lic file
7. Suite Unlocked! (100% Offline)

πŸ“¦ Dual Build Targets: Licensed vs. App Store

Target Build Command License Requirement Use Case
Mac App Store (MAS) npm run electron:build:mas No License Required Distributed via Apple App Store with upfront app purchase.
Standalone (No License) npm run electron:build:nolicense No License Required Internal demos / direct purchase without machine keys.
macOS (Direct Client) npm run electron:build:mac Hardware .lic Required Direct client sales, SaaS annual renewals, and offline venues.
Windows (Direct Client) npm run electron:build:win Hardware .lic Required Direct client sales, SaaS annual renewals, and offline venues.

πŸ”‘ Default Credentials

The system comes pre-seeded with factory demo accounts:

Username Password Role Access Level
sysadmin admin123 SYSTEM_ADMIN Full System & Configuration Access
operator operator123 OPERATOR Box Office POS & Ticket Cancellation

πŸ’‘ Tip: You can trigger a factory re-seed at any time via System Settings β†’ Database Initialization & Factory Re-Seed.


⌨️ Keyboard Shortcuts

Shortcut Action Scope
F2 Switch to Box Office POS Counter Application Wide
F3 Switch to Daily Collection Report (DCR) Application Wide
F4 Switch to Ticket Cancellation Screen Application Wide
F9 Instant Confirm & Print Ticket Copies Box Office POS Counter
Esc Clear Active Seat Selection Box Office POS Counter
Cmd / Ctrl + K Global Command Menu & Page Search Application Wide
Cmd / Ctrl + Shift + F + P Developer Credentials Quick Access Login Screen

πŸ“ Project Structure

bookingsystem/
β”œβ”€β”€ .env.appstore             # Build config for Mac App Store (No-License mode)
β”œβ”€β”€ electron/                 # Electron main and preload processes
β”‚   β”œβ”€β”€ main.ts               # Window lifecycle, hardware Machine ID query, IPC handlers
β”‚   └── preload.ts            # Safe contextBridge APIs
β”œβ”€β”€ scripts/                  # Developer CLI tools
β”‚   β”œβ”€β”€ generate-keys.js      # ECDSA P-256 keypair generator (npm run license:keys)
β”‚   β”œβ”€β”€ generate-license.js   # Customer license generator (npm run license:generate)
β”‚   β”œβ”€β”€ test-license.js       # Automated cryptographic test suite
β”‚   └── test-web-generator.js # Standalone Web generator validation test
β”œβ”€β”€ tools/                    # Standalone Web Developer Tools
β”‚   └── license-generator.html# Browser-based ECDSA P-256 License Generator
β”œβ”€β”€ public/                   # Static assets & WASM binaries
β”‚   └── sql-wasm.wasm         # SQLite WebAssembly engine
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/           # Reusable UI & Business Components
β”‚   β”‚   β”œβ”€β”€ auth/             # Login, first-time setup, and permission guards
β”‚   β”‚   β”œβ”€β”€ layout/           # TitleBar, Header, Sidebar, CommandMenu
β”‚   β”‚   β”œβ”€β”€ license/          # LicenseActivationView & LicenseUpgradeModal
β”‚   β”‚   β”œβ”€β”€ seatmap/          # Interactive visual seat grid
β”‚   β”‚   β”œβ”€β”€ ticket/           # Thermal ticket preview & printing
β”‚   β”‚   └── ui/               # Radix UI design system primitives & TimePicker
β”‚   β”œβ”€β”€ db/                   # Database Layer
β”‚   β”‚   β”œβ”€β”€ seed.ts           # Factory seed data
β”‚   β”‚   └── sqlite-service.ts # SQL.js WASM service & auto-migrations
β”‚   β”œβ”€β”€ lib/                  # Business Utilities & Cryptography
β”‚   β”‚   β”œβ”€β”€ license-crypto.ts # WebCrypto ECDSA P-256 verification engine
β”‚   β”‚   β”œβ”€β”€ tax-calculator.ts # GST & Service Charge calculation algorithms
β”‚   β”‚   β”œβ”€β”€ thermal-printer.ts# ESC/POS Thermal formatting
β”‚   β”‚   └── utils.ts          # Formatting & styling utilities
β”‚   β”œβ”€β”€ pages/                # Application Views
β”‚   β”‚   β”œβ”€β”€ masters/          # Movie, Cinema, ShowTiming, Pricing, Tax & Lookup Masters
β”‚   β”‚   β”œβ”€β”€ AuditBackupPage.tsx
β”‚   β”‚   β”œβ”€β”€ DashboardPage.tsx
β”‚   β”‚   β”œβ”€β”€ DCRReportPage.tsx
β”‚   β”‚   β”œβ”€β”€ POSCounterPage.tsx
β”‚   β”‚   β”œβ”€β”€ PrinterSettingsPage.tsx # ESC/POS Thermal printer calibration & live preview
β”‚   β”‚   β”œβ”€β”€ SystemSettingsPage.tsx # System preferences & software license card
β”‚   β”‚   β”œβ”€β”€ TicketCancellationPage.tsx
β”‚   β”‚   └── UsersPermissionsPage.tsx
β”‚   β”œβ”€β”€ services/             # Domain Services (License, Booking, Movie, Screen, Pricing, etc.)
β”‚   β”œβ”€β”€ store/                # Zustand State Stores (Auth, Booking, Settings)
β”‚   β”œβ”€β”€ types/                # Strict TypeScript Type Definitions
β”‚   β”œβ”€β”€ App.tsx               # Root component & security route guards
β”‚   └── main.tsx              # Application entry point
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── vite.config.ts

πŸ’– Sponsoring & Support

If you find this project valuable and would like to support its ongoing development, features, and maintenance, you can sponsor through GitHub Sponsors:

GitHub Sponsors


πŸ“„ License & Intellectual Property

This project is released under a Proprietary and Confidential Software License.

Copyright (c) 2026 besaoct. All rights reserved.

No part of this source code may be copied, modified, distributed, or deployed in any form without explicit written permission from the author. For commercial licensing inquiries, contact besaoct.

See LICENSE for full legal terms.

About

An enterprise-grade ticketing and management platform tailored for single-screen cinemas, multiplex auditoriums, and entertainment venues.

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages