Description • Features • Architecture • DB Schema • Technologies • How to start the program
A basic RESTful application is created to manage cinema operations and supports features such as:
- User registration and authentication for future access.
- Addition and removal of movies, movie sessions, and cinema halls.
- Adding tickets to a shopping cart.
- The system supports two main roles for authorization -
ADMIN
andUSER
- It supports user authentication, authorization, and various CRUD operations (Create, Read, Update, Delete).
Role | Functionality | 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.
3-layer architecture |
---|
Controllers (Presentation layer) |
Services (Application layer) |
DAO (Data access layer) |
- JDK 11
- Maven 4.0.0
- Apache Tomcat 9.0.50
- Spring (WEB, Security) 5.2.2
- Hibernate 5.4.27
- MySQL
- Clone the project from GitHub
- Configure
/resources/db.properties
with your own URL, username, password and JDBC driver - Configure Tomcat server (it is recommended to use version 9.0.50)
- Install Postman for sending requests
- First user with the role of
ADMIN
will be created automatically with the following parameters: email -admin@i.ua
, password -admin123
- Run and enjoy the program