Skip to content

An interactive web application for event management, it consists of two main components: an admin interface for staff to manage event information, and a public-facing site for visitors to browse and search events.

Notifications You must be signed in to change notification settings

IniBuilds-git/Event-Hub

Repository files navigation

Event Hub Management System

A comprehensive web application for managing events, featuring an admin interface for staff to create and manage events, and a public-facing website for visitors to browse, search, and book tickets for events.

Features

Admin Interface

  • Secure authentication system with role-based access control (admin and super-admin roles)
  • Dashboard with real-time statistics and event metrics
  • Event Management: Create, edit, delete, and view events
  • Ticket Management: Define multiple ticket types with pricing and quantities
  • Reservation Management: View and manage customer reservations
  • User Management: Create and manage admin users with different roles
  • Image uploads to Cloudinary CDN for event images
  • Category Management: Organize events by categories
  • Responsive design for desktop and mobile devices

Public Interface

  • Event Discovery: Browse upcoming events with filtering options
  • Search functionality: Find events by title, location, date, or category
  • Event Details: View comprehensive event information
  • Online Ticket Booking: Purchase tickets for events
  • Reservation Confirmation: Email notifications for bookings
  • Responsive design optimized for all devices

Technology Stack

  • Backend: PHP 8.4
  • Database: MySQL 8.0
  • Frontend: HTML5, CSS3, JavaScript, AJAX
  • Containerization: Docker & Docker Compose
  • Image Storage: Cloudinary CDN
  • Email Service: SMTP integration
  • Testing: PHPUnit for unit and integration testing

Project Structure

.
├── docker/              # Docker configuration
│   ├── Dockerfile
│   ├── docker-compose.yml
│   ├── nginx/           # Nginx configuration
│   └── php/             # PHP configuration
├── src/                 # Application source code
│   ├── admin/           # Admin panel files
│   ├── api/             # API endpoints
│   ├── assets/          # CSS, JS, images
│   ├── includes/        # PHP includes
│   │   ├── classes/     # PHP classes
│   │   │   ├── Controllers/
│   │   │   ├── Models/
│   │   │   └── Services/
│   │   ├── config.php
│   │   ├── db.php
│   │   └── helpers.php
│   └── test/            # Unit tests
└── README.md          

Installation

Prerequisites

  • Docker and Docker Compose
  • Git

Setup Steps

  1. Clone the repository:
git https://github.com/IniBuilds-git/Event-Hub
cd event-hub
  1. Start the Docker containers:
cd docker
docker-compose up -d
  1. Access the application:

Default Login Credentials

Development

Running Tests

The application includes unit tests using PHPUnit. To run the tests:

cd src
vendor/bin/phpunit

Adding New Features

  1. Created appropriate model class in src/includes/classes/Models/
  2. Created controller in src/includes/classes/Controllers/
  3. Implemented API endpoints in src/api/
  4. Add frontend views in src/admin/ or src/
  5. Wrote tests in src/test/

Event API Endpoints

  • GET /api/admin/events/get.php - Get all events (admin)
  • GET /api/admin/events/get.php?id=X - Get event by ID (admin)
  • POST /api/admin/events/create.php - Create new event (admin)
  • POST /api/admin/events/delete.php - Delete event (admin)
  • GET /api/user/events.php - Get public events
  • GET /api/user/event/get-event.php?id=X - Get public event details

Reservation API Endpoints

  • GET /api/admin/reservation/get.php - Get all reservations (admin)
  • GET /api/admin/reservation/get.php?id=X - Get reservation by ID (admin)
  • POST /api/admin/reservation/cancel.php - Cancel reservation (admin)
  • POST /api/user/reservation/create.php - Create new reservation (public)

Configuration

Environment Variables

This application uses environment variables for configuration. Here's what each variable does:

Database Configuration

  • DB_SERVER: MySQL server hostname
  • DB_USERNAME: MySQL username
  • DB_PASSWORD: MySQL password
  • DB_NAME: Database name

Application Settings

  • BASE_URL: The base URL of the application
  • ADMIN_URL: The URL for the admin interface

Cloudinary Configuration (for image uploads)

  • CLOUDINARY_CLOUD_NAME: Your Cloudinary cloud name
  • CLOUDINARY_API_KEY: Your Cloudinary API key
  • CLOUDINARY_API_SECRET: Your Cloudinary API secret
  • CLOUDINARY_UPLOAD_PRESET: Your Cloudinary upload preset

Email Configuration (for sending confirmations)

  • SMTP_HOST: SMTP server hostname
  • SMTP_PORT: SMTP server port
  • SMTP_USER: SMTP username
  • SMTP_PASS: SMTP password
  • SMTP_FROM: Sender email address
  • SMTP_FROM_NAME: Sender name

Security

  • All user inputs are sanitized to prevent XSS attacks
  • Prepared statements prevent SQL injection
  • Password hashing for secure authentication
  • Environment variables for sensitive credentials
  • CSRF protection for forms
  • Role-based access control for admin functions

Acknowledgements

About

An interactive web application for event management, it consists of two main components: an admin interface for staff to manage event information, and a public-facing site for visitors to browse and search events.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published