Skip to content

hpavlo/cinema-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cinema app 🎥

DescriptionFeaturesArchitectureTechnologiesHow to start the programUML diagram

📃 Description

This is a simple server program designed to organize the operation of the cinema and supports all the most necessary functions, such as:

  • New user registration and login for registered users
  • Add and remove movies, movie sessions, and cinema halls
  • Add the tickets to the shopping cart and complete the order

The program supports two types of roles: ADMIN and USER. The user has the opportunity to view sessions, movies, manage their orders. Admin can add or remove movies, sessions and so on.

Information is sent and received in JSON format. The program is written in compliance with SOLID principles, interfaces as example for comply the Dependency inversion principle, and mappers for the Single-responsibility principle.

🚀 Features

Role Possibility Endpoints
ADMIN Get and add movies, cinema halls
Get, add and delete movie sessions
Find users by email
GET: /cinema-halls
POST: /cinema-halls
GET: /movies
POST: /movies
GET: /movie-sessions/available
POST: /movie-sessions
PUT: /movie-sessions/{id}
DELETE: /movie-sessions/{id}
GET: /users/by-email
USER Get movies, movie sessions and cinema halls
Add tickets to shopping card
Complete orders
GET: /cinema-halls
GET: /movies
GET: /movie-sessions/available
GET: /orders
POST: /orders/complete
PUT: /shopping-carts/movie-sessions
GET: /shopping-carts/by-user

There is also another endpoint for registering new users, which is available to everyone: /register A user without an ADMIN role cannot perform operations, defined exclusively for users with ADMIN roles.

⚙ Architecture

3-layer architecture
Controllers (Presentation layer)
↓↑
Services (Application layer)
↓↑
DAO (Data access layer)

🧑‍💻 Technologies

Technology Version
JDK 11
Maven 4.0.0
Tomcat 9.0.50
MySQL 8.0.22
Spring (WEB, Security) 5.2.2
Hibernate 5.4.27

📎 How to start the program

  1. Clone the project from GitHub
  2. Configure /resources/db.properties with your own URL, username, password and JDBC driver
  3. Configure Tomcat server (it is recommended to use version 9.0.50)
  4. First user with the role of ADMIN will be created automatically with the following parameters: email - admin@i.ua, password - admin123
  5. Run and enjoy the program 😉

✨ UML models diagram

UML diagram