Git Product home page Git Product logo

movie-ticket-booking-app's Introduction

movie-ticket-booking-app

Cinema ticket booking management system

Description

The application is a seat reservation system for a multiplex cinema, written in Java and exposed as REST services. It allows users to select a day, time, and movie to view, and then choose from available seats and ticket types. It handles reservations, including calculation of the total amount to pay and reservation expiration time, and includes a default set of test data for multiple screening rooms, movies, and screenings.

Installation

You can install the project by downloading the .zip file and typing java -jar movie-ticket-booking-app-0.0.1-SNAPSHOT.jar or clone the project and typing mvn package

How to use

The application contains test data that helps you understand how the application works. You can use the app in different ways, for example:

Example curl commands:

  • curl -X GET http://localhost:8080/allScreening - List of all screenings
  • curl -X GET http://localhost:8080/screenings?day=YYYY-MM-DD&startTime=HH:MM&endTime=HH:MM - List movies available for the given day and time interval
  • curl -X GET http://localhost:8080/screening?id=# - Get information about the specific screening, where # is ID of the screening
  • curl -X GET http://localhost:8080/reservations?id=# - Get information about the specific reservation, where # is ID of the reservation
  • curl -X POST -H "Content-Type: application/json" -d '{ "name": "Jan", "surname": "Kowalski", "screeningId": 1, "seats": [ { "row": 1, "column": 2, "ticketType": "ADULT" } ] }' http://localhost:8080/reservations - make reservation

The whole thing can also be done in Postman. To make a reservation in this program you can:

  1. In the "Create a new request" dialog, select "POST" as the HTTP method and enter the URL for the 'localhost:8080/reservations' endpoint in the "Enter request URL" field.
  2. In the "Body" tab, select the "raw" radio button and select "JSON (application/json)" from the dropdown list.
  3. In the request body, enter the reservation data as a JSON object. The JSON object should include the name and surname of the person making the reservation, the id of the screening, and a list of seats.
{
    "name": "Jan",
    "surname": "Kowalski",
    "screeningId": 3,
    "seats": [
        {
            "row": 1,
            "column": 2,
            "seatType": "CHILD"
        },
        {
            "row": 1,
            "column": 3,
            "seatType": "ADULT"
        }
    ]
}

Assumptions

Some basic assumptions:

  • A maximum of 10 seats can be booked
  • All seats must be booked in one row in one reservation
  • All seats are ADULT by default

movie-ticket-booking-app's People

Contributors

mroxny avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.