A simple application that simulates a cinema's ticket-reservation system. It contents only with backend part. Manage cinema by adding new movies, movie sessions, adding cinema halls. With registering new user the shopping cart linked to user will be created. After login as user add movie sessions to shopping cart and create orders to purchase tickets.
Project based on 3-layer architecture:
- Application layer (services)
- Data access layer (repository)
- Representation layer (controllers)
- Clone this project to your IDE as Maven project.
- Check a pom.xml file if any errors are occurred - fix them.
- Open MySql. It can be local or remote database. Create schema.
- To configure connection to database open db.properties (src/main/resources/application.properties)
- Edit these fields according to your data:
spring.datasource.url=YOUR_DATABASE_URL
spring.datasource.username=YOUR_DATABASE_USERNAME
spring.datasource.password=YOUR_DATABASE_PASSWORD
where:
- <YOUR_DATABASE_URL> - URL to Database (for local database: localhost)
- <YOUR_DATABASE_USERNAME> - username to get permission to read and write to database
- <YOUR_DATABASE_PASSWORD> - password for <YOUR_DATABASE_USERNAME> user
- Run application and open on you Internet Explorer http://localhost:8083/inject page. If you see "true", you can open http://localhost:8083/swagger-ui/index.html and test this application.
/register and /login
- Get a list of all movies (GET: /movies);
- Get a list of all cinema halls (GET: /cinema-halls);
- Get all movie sessions by a movie's id (GET: /movie-sessions/{id});
- Get a list of all films that will be shown in the cinema on a given day (GET: /movie-sessions/available).
- Get a list of all the orders made by a user (GET: /orders);
- Get your shopping cart (GET: /shopping-carts/by-user), add your order (POST: /orders/complete), change a movie session from your shopping cart by a movie session's id (PUT: /shopping-carts/movie-sessions).
- Add a movie (POST: /movies);
- Add a movie session (POST: /movie-sessions);
- Add a cinema hall (POST: /cinema-halls );
- Get a user by email (GET: /users/by-email);
- Change a movie session by its id (PUT: /movie-sessions/{id});
- Delete a movie session by its id (DELETE: /movie-sessions/{id}).
- Java 11
- Spring Boot 3.1.1
- Spring WEB
- Spring MVC
- Spring Security
- Spring Data Jpa
- Hibernate Validator
- Lombok
- MySQL
- Apache TomCat
- Maven
- Swagger

