Skip to content

Latest commit

 

History

History
116 lines (96 loc) · 4.12 KB

README.md

File metadata and controls

116 lines (96 loc) · 4.12 KB

img_30.png CINEMA-APP

img_1.png

img_40.png DESCRIPTION

This demo-project is a web-based application designed as a cinema service model.

The application offers features such as user authentication, registration, and CRUD operations.

The service is constructed using Hibernate and Spring frameworks, adhering to fundamental REST and SOLID principles.

img_33.png Features

  • Log in / authentication / authorization
  • Add / get / get all movies
  • Add / get / get all cinema halls
  • Add / get / find available movie sessions
  • Add a session / find by user / register & delete a shopping cart
  • Complete order / get a history of orders

img_37.png Structure

Project

├───java 
│   └───cinema
│       ├───config             ---- Application configuration classes
│       ├───controller         ---- User request processing controllers
│       ├───dao                ---- The dao layer facilitates data management operations
│       ├───dto                ---- Database data transfer classes
│       │   ├───request 
│       │   └───response 
│       ├───exception          ---- Custom exception
│       │   └───data processing                    
│       ├───lib                ---- Custom annotations
│       │   ├───fields value match 
│       │   └───valid email 
│       ├───model              ---- Project models 
│       │   ├───cinema hall 
│       │   ├───movie 
│       │   ├───movie session
│       │   ├───order 
│       │   ├───role
│       │   ├───shopping card
│       │   ├───ticket
│       │   └───user             
│       ├───service             ---- The service layer encapsulates the business logic 
│       └───util                ---- Date pattern manager  
└───resources                      


Database

img.png

img_28.png Used Technologies

  • JDK 17
  • MAVEN 4.0.0
  • MYSQL 8.0.32
  • SPRING 5.3.20
  • SPRING SECURITY 5.6.10
  • HIBERNATE 5.6.14
  • JAVA SERVLETS 4.0.1
  • JACKSON CORE 2.14.1
  • TOMCAT 9.0.50

img_41.png Getting Started

Prerequisites:

  • Java 17 or later
  • Apache Tomcat 9 (version 9.0.50 is recommended)
  • MySQL 8 or later
  • Spring 5 or later
  • Hibernate 5 or later

Install process

  1. Clone this repository.

  2. Open the project in your IDE and build it.

  3. Open the db.properties file (/src/main/resources/db.properties) and change the information about database connection. img2.png img3.png

  4. Configure Tomcat.

    Use only Tomcat 9

    • choose war exploded
    • leave only "/" in the application context
      img4.png
  5. Launch and use.

Testing process

  1. Register at Postman.
  2. You can test next role access to specific resources for ADMIN and for USER.
POST: /register - all
GET: /cinema-halls - user/admin
POST: /cinema-halls - admin
GET: /movies - user/admin
POST: /movies - admin
GET: /movie-sessions/available - user/admin
POST: /movie-sessions - admin
PUT: /movie-sessions/{id} - admin
DELETE: /movie-sessions/{id} - admin
GET: /orders - user
POST: /orders/complete - user
PUT: /shopping-carts/movie-sessions - user
GET: /shopping-carts/by-user - user
GET: /users/by-email - admin
...

Authors

Viktoriia Svidovska