TicketSystem

This repository contains the backend and app components of an Event Ticket System.

Event Ticket System

This repository contains the backend and app components of an Event Ticket System.

License

This project is licensed under the MIT License.

Backend

The backend provides a REST API for managing various aspects of the ticket system, including customers, tickets, purchases, events, and more. It is built using Java 19 and relies on the powerful Spring ecosystem for efficient development and deployment.

Setup and Configuration

To set up the backend, please follow these steps:

  1. Start the MySQL server. You don’t have to set up a database; it will be created automatically on the first start.
  2. Open the application.properties file located in the backend project.
  3. Update the secret.key property with a strong and secure key. This key is used for token generation and validation.
  4. Run the backend application using the command: mvn spring-boot:run.
  5. The backend API documentation can be accessed at http://localhost:8080/ or your local IP address in your network. It provides detailed information about the available endpoints and their usage.

Write down the IP of the backend computer. You will need it later.

It can be found in the console Use this IP if you are using the Mobile Ticket System App: XYZ

or

  1. Open CMD on the machine running the backend.
  2. Type ipconfig.
  3. Find the IPv4 Address

Dependencies

The backend project relies on the following dependencies:

Frontend

The frontend provides an interface to browse events, purchase tickets, and view/download their tickets. It is built using Angular and TypeScript. (Please note that the frontend does not include user management and the example provided does not have any security implications. Its only an example.)

Setup and Configuration

To set up the frontend, please follow these steps:

  1. Install Node.js and npm on your machine.
  2. Navigate to the frontend directory: cd frontend
  3. Install the dependencies by running: npm install
  4. Open the src/environments/environment.ts file and update the backendUrl variable.
  5. Start the frontend application by running: ng serve
  6. Access the frontend application at http://localhost:4200 in your web browser.

Dependencies

The frontend project relies on the following dependencies:

  • rxjs: A library for reactive programming using Observables.
  • jspdf: A library for generating PDFs in JavaScript.
  • zone.js: A library for detecting and managing asynchronous operations in JavaScript.
  • @angular/http: Angular’s HTTP module for making HTTP requests.
  • @angular/core: The core framework for building Angular applications.
  • angularx-qrcode: A library for generating QR codes in Angular.
  • @angular/forms: Angular’s form module for handling form validation and submission.
  • @angular/router: The Angular router for managing navigation between different views.
  • @angular/material: Material Design components for Angular applications.
  • @angular/common: Common utilities for Angular applications.

App

The app component provides a user-friendly interface for scanning and validating event tickets using the device’s camera. It is developed in Java 19 using Android Studio and Gradle build system.

Setup and Configuration

To set up the app, please follow these steps:

  1. Open the app project in Android Studio.
  2. Build the app in Android Studio and install it on an Android device using ADB, either directly from Android Studio or through any preferred method.
  3. Set the backend URL in the settings (InApp)

Dependencies

The app relies on the following dependencies: