Skip to content
/ cinema Public

Application for managing a cinema system and purchasing tickets.

Notifications You must be signed in to change notification settings

Gimi818/cinema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cinema

A cinema management application with a ticketing system

The new user registers within the application and completes the email verification process by clicking the activation link received in their email. Once verified, the user proceeds to select a screening date and choose a film for that specific time, while also checking the seat availability for the chosen screening.

Moving on to the next step, the user initiates the ticket booking process. They select a seat, specify the row, and choose a discount type.

The application provides two discount options :

  • Events: Cheap Tuesday and Cheap Friday, offering a 20% reduction in ticket prices.

  • Student discounts: An additional 10% off on ticket prices.

After a successful booking, the application sends an email containing the ticket in PDF format, which includes all the details along with a unique QR code for confirming the purchase and details of the ticket

The application is integrated with the National Bank of Poland's API, allowing customers to choose from 34 currencies for the ticket price. The application sends a periodic request to the API NBP every 24 hours, ensuring the database is updated with the latest currency values.

User have the authority to add new films to the database and create new screenings, specifying the date, time, and film.

I utilized a MySQL database to establish relationships within the data. The application is deployed on Docker and incorporates Swagger for documentation.

Application is developed using following technologies:

Core:

java spring docker git mysql docker java java

To run the application, follow these steps :

  • Install IntelliJ IDEA and Docker Desktop on your computer.
  • Run Docker Desktop.
  • Clone the repository in IntelliJ IDEA using the link https://github.com/Gimi818/Cinema
  • Run docker-compose up in the terminal.
  • Run the applications in IntelliJ IDEA.
  • Try the applications in Postaman, the steps on how to do it are below.

How to use application in Postman:

Step 1 :
POST localhost:8080/users/registration
Enter your data.
JSON:
{
 "firstName":"Wojciech",
 "lastName":"Gmiterek",
 "email":"[email protected]",
 "password":"password",
"repeatedPassword" :"password",
"role":"USER"
}

Step 2 :
Click on the account activation link.

Step 3 :
GET localhost:8080/screenings?date=2023-11-25
Select the desired cinema date, input it into the URL, and discover a film you'd like to watch.
(screenings are available from 2023-11-20 to 2023-12-05)

Step 4 :
GET localhost:8080/screenings/1
Enter the film ID into the URL to check the available seats for the screening.

Step 5 :
POST localhost:8080/book/ea6c7acd-4f87-4ee5-829c-0460c315caad/1
Enter the user UUID and then the film ID.
Choose the ticket type NORMAL or REDUCE if you are a student, you are qualified for a discount.
Select the currency in which you would like to receive the ticket price, you can choose from 34 currencies. 
Send request localhost:8080/codes and check available currencies.
Enter the row number or seat number. 
JSON:
{
 "ticketType":"REDUCE",
 "currency":"USD",
 "rowsNumber":7,
 "seatInRow": 5
}

Step 6 :
You have received an email with a PDF ticket containing the details along with a QR code confirming your purchase.
Scan the QR code and check purchase details

Add the film to the database:
POST localhost:8080/films
Enter the film data.
JSON:
{
 "title": "The Equalizer 3",
 "category": "ACTION",
 "durationFilmInMinutes": 130
}

Create a screening:
POST localhost:8080/screenings/26
Enter the ID in the URL of the film for which you want to create.
Enter the date and time of screening.
JSON:
{
 "date": "2023-12-15",
 "time": "22:30"
 }

Endpoints available in the application :

About

Application for managing a cinema system and purchasing tickets.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages