Skip to content

25017438d/EIE4432_Boothsystem_miniproject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽช Hong Kong Food Carnival

Node.js Express.js Socket.io EJS

A comprehensive event management and booth reservation system for food carnival events

Features โ€ข Installation โ€ข Usage โ€ข Tech Stack โ€ข License


๐Ÿ“‹ Overview

The Hong Kong Food Carnival platform is a full-featured web application designed to streamline event management, booth reservations, and vendor operations for large-scale food carnival events. Built with Node.js and Express, it offers real-time updates, interactive booth mapping, QR code ticketing, and comprehensive analytics.

โœจ Features

๐ŸŽซ For Attendees

  • Interactive Booth Exploration - Visual floor plans with real-time availability
  • Smart Booking System - Reserve premium, standard, or economy booths
  • Digital Ticketing - QR code-based tickets with instant generation
  • Secure Payments - Multiple payment methods supported
  • Profile Management - Track bookings, transactions, and preferences
  • Real-time Updates - Live booth availability via WebSocket

๐Ÿ‘จโ€๐Ÿ’ผ For Administrators

  • Event Management - Create and manage multiple carnival events
  • Booth Configuration - Dynamic booth editor with tier management
  • User Administration - Comprehensive user management dashboard
  • Transaction Monitoring - Real-time payment and booking tracking
  • Analytics Dashboard - Revenue insights, booking trends, and statistics
  • QR Scanner - Validate tickets and manage check-ins

๐ŸŽจ Visual Features

  • Themed Booth Zones - Wellness, Snacks, Global Flavors, Organic, Desserts, Beverages
  • Multi-floor Support - Harbour View Hall & Sky Garden Pavilion
  • Responsive Design - Mobile-friendly interface
  • Interactive Maps - Color-coded booth status visualization

๐Ÿš€ Installation

Prerequisites

  • Node.js 18.x or higher
  • npm or yarn package manager

Setup Steps

  1. Clone the repository
git clone https://github.com/YOUR_USERNAME/BoothSystem.git
cd BoothSystem
  1. Install dependencies
npm install
  1. Configure environment (optional)
# Create .env file
PORT=3000
SESSION_SECRET=your-secret-key
NODE_ENV=development
  1. Start the server
npm start
  1. Access the application
http://localhost:3000

๐Ÿ“– Usage

Default Accounts

Admin Account:

  • Username: admin
  • Password: adminpass

Test User Account:

  • Username: TestUser
  • Password: TestUser123

Key Routes

Route Description
/ Home & Login
/register New user registration
/dashboard User dashboard
/booths/:eventId Browse and book booths
/payment/:bookingId Secure payment processing
/digital-ticket/:bookingId View digital ticket
/admin/* Admin panel (requires admin role)

๐Ÿ›  Tech Stack

Backend

  • Express.js 5.x - Web application framework
  • Socket.IO 4.x - Real-time bidirectional communication
  • EJS - Server-side templating
  • bcrypt - Password hashing
  • Express Session - Session management
  • Multer - File upload handling

Frontend

  • Vanilla JavaScript - Client-side interactivity
  • Chart.js - Data visualization
  • CSS3 - Modern styling and animations

Features & Libraries

  • QRCode - QR code generation
  • PDFKit - PDF ticket generation
  • json2csv - Data export functionality
  • uuid - Unique identifier generation

Data Management

  • JSON File Storage - Lightweight data persistence (development)
  • In-memory caching for serverless deployments

๐Ÿ“‚ Project Structure

minproj/
โ”œโ”€โ”€ api/                    # Serverless function entry
โ”‚   โ””โ”€โ”€ index.js
โ”œโ”€โ”€ data/                   # Data layer
โ”‚   โ”œโ”€โ”€ db.json            # JSON database
โ”‚   โ””โ”€โ”€ store.js           # Data access functions
โ”œโ”€โ”€ public/                 # Static assets
โ”‚   โ”œโ”€โ”€ css/
โ”‚   โ”‚   โ””โ”€โ”€ styles.css     # Application styles
โ”‚   โ”œโ”€โ”€ js/                # Client-side scripts
โ”‚   โ”‚   โ”œโ”€โ”€ analytics-dashboard.js
โ”‚   โ”‚   โ”œโ”€โ”€ booth-editor.js
โ”‚   โ”‚   โ”œโ”€โ”€ booth-map.js
โ”‚   โ”‚   โ”œโ”€โ”€ dashboard.js
โ”‚   โ”‚   โ””โ”€โ”€ qr-scanner.js
โ”‚   โ””โ”€โ”€ uploads/           # User uploads
โ”œโ”€โ”€ views/                  # EJS templates
โ”‚   โ”œโ”€โ”€ partials/          # Reusable components
โ”‚   โ”œโ”€โ”€ admin-*.ejs        # Admin pages
โ”‚   โ”œโ”€โ”€ booths.ejs         # Booth selection
โ”‚   โ”œโ”€โ”€ dashboard.ejs      # User dashboard
โ”‚   โ”œโ”€โ”€ digital-ticket.ejs # Ticket display
โ”‚   โ”œโ”€โ”€ login.ejs          # Authentication
โ”‚   โ”œโ”€โ”€ payment.ejs        # Payment processing
โ”‚   โ””โ”€โ”€ profile.ejs        # User profile
โ”œโ”€โ”€ server.js              # Main application server
โ”œโ”€โ”€ package.json           # Dependencies
โ””โ”€โ”€ README.md             # Documentation

๐ŸŽฏ Key Functionalities

Booth Management

  • Three-tier system: Premium ($820), Standard ($620), Economy ($480)
  • 40 booths across two floors with themed zones
  • Real-time availability tracking
  • Visual status indicators: Available, Booked, Processing

Payment Processing

  • Credit/Debit card support
  • PayPal integration
  • Bank transfer options
  • Secure transaction logging

Digital Ticketing

  • Unique QR codes for each booking
  • Downloadable PDF tickets
  • Email delivery ready
  • Admin QR scanner for validation

Analytics & Reporting

  • Revenue tracking by tier
  • Booking trends over time
  • Popular booth analysis
  • Transaction history export (CSV)

๐ŸŒ Deployment

Render.com (Recommended)

  1. Push code to GitHub
  2. Connect repository to Render
  3. Deploy as Web Service
  4. render.yaml configuration included

Alternative Platforms

  • Railway.app - Easy deployment with CLI
  • Fly.io - Global edge deployment
  • Heroku - Traditional PaaS
  • DigitalOcean App Platform - Managed infrastructure

Note: Vercel serverless deployment requires additional configuration for sessions and file uploads.

๐Ÿ”’ Security Features

  • bcrypt password hashing
  • Session-based authentication
  • CSRF protection ready
  • Secure cookie configuration
  • Input validation and sanitization

๐Ÿ“Š API Endpoints

Public Routes

  • GET / - Home page
  • POST /login - User authentication
  • POST /register - User registration
  • GET /booths/:eventId - View available booths
  • POST /bookings - Create new booking

Protected Routes

  • GET /dashboard - User dashboard
  • GET /profile - User profile
  • POST /profile/upload - Avatar upload
  • GET /transactions - Transaction history

Admin Routes

  • GET /admin/dashboard - Admin overview
  • GET /admin/analytics - Analytics dashboard
  • GET /admin/booth-editor/:eventId - Edit booth configuration
  • POST /admin/events - Create new event
  • DELETE /admin/users/:userId - Remove user

๐Ÿ“ License

This project is licensed under the ISC License.

๐Ÿ‘ฅ Authors

  • Cheng tsz hung and Awwab Hamam

๐Ÿ› Known Issues

  • Serverless deployments (Vercel) require external database for data persistence
  • Socket.IO features disabled in serverless environments
  • File uploads stored in /tmp directory on serverless platforms

๐Ÿ”ฎ Future Enhancements

  • PostgreSQL/MongoDB integration
  • Email notification system
  • Mobile app (React Native)
  • Vendor management portal
  • Multi-language support
  • Advanced analytics with ML predictions
  • Social media integration
  • Live event streaming

โญ Star this repository if you find it helpful!

Made with Express.js โ€ข Socket.IO โ€ข Chart.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors