The Booking Cinema Ticket System allows cinema providers to register branches and manage ticket bookings, schedules, movies, and customers. Each branch can handle ticket sales, view statistics, and manage screenings.
- 1. Description
- 2. Core Features
- 3. Project Structure
- 4. Database Design
- 5. Installation
- 6. Structure of Application
- 7. Progress
- 8. License
|-exception
| |-ErrorMessage.java
| |-GlobalExceptionHandler.java
|-model
| |-Ranking.java
| |-CinemaRoom.java
| |-Cinema.java
| |-BusinessBank.java
| |-Film.java
| |-CinemaLayoutSeat.java
| |-Perform.java
| |-PickSeat.java
| |-UserAccount.java
| |-Payment.java
| |-Account.java
| |-Comment.java
| |-BusinessAccount.java
| |-CinemaLayoutGroup.java
| |-BankCinema.java
| |-OwnerShip.java
| |-OwnerShipTree.java
| |-CinemaLayout.java
| |-VnPayModel.java
| |-BusinessProvider.java
| |-CinemaProvider.java
| |-BusinessOwnership.java
| |-Item.java
| |-Tag.java
|-CinemaManagementApplication.java
|-pagination
| |-PagingModel.java
| |-CursorBasedPageable.java
| |-PageSpecificationTag.java
| |-PageSpecificationPerform.java
| |-PageSpecificationCinemaLayout.java
| |-PageSpecification.java
|-mapper
| |-JpaConverterJson.java
| |-PerformMapper.java
| |-CinemaProviderMapper.java
| |-MapperConfig.java
| |-AccountMapper.java
| |-FilmMapper.java
| |-TagMapper.java
| |-CinemaLayoutMapper.java
| |-PickSeatMapper.java
| |-CinemaMapper.java
| |-CinemaRoomMapper.java
| |-JsonToMapConverter.java
|-service
| |-CommentService.java
| |-PickSeatService.java
| |-JwtService.java
| |-PaymentService.java
| |-PerformService.java
| |-CinemaRoomService.java
| |-TagService.java
| |-CinemaLayoutService.java
| |-CinemaProviderService.java
| |-BusinessBankService.java
| |-impl
| | |-SocketIOServiceImpl.java
| | |-CommentServiceImpl.java
| | |-UserService.java
| | |-PickSeatServiceImpl.java
| | |-GetPaymentStatusService.java
| | |-VNPayServiceImpl.java
| | |-FilmServiceImpl.java
| | |-BusinessBankServiceImpl.java
| | |-CinemaProviderServiceImpl.java
| | |-TagServiceImpl.java
| | |-OrderPaymentService.java
| | |-CinemaRoomServiceImpl.java
| | |-CinemaServiceImpl.java
| | |-RedisServiceImpl.java
| | |-CinemaLayoutServiceImpl.java
| | |-JwtServiceImpl.java
| | |-PerformServiceImpl.java
| |-SocketIOService.java
| |-CachingService.java
| |-FilmService.java
| |-CinemaService.java
| |-FilmPriceService.java
|-auth
| |-RegisterRequest.java
| |-AuthenticationResponse.java
| |-AuthenticationRequest.java
| |-AuthenticationController.java
| |-AuthorizationService.java
| |-AuthenticationService.java
|-repository
| |-CinemaRepository.java
| |-PickSeatRepository.java
| |-BusinessOwnershipRepository.java
| |-CinemaLayoutRepository.java
| |-CinemaRoomRepository.java
| |-CinemaProviderRepository.java
| |-CinemaLayoutSeatRepository.java
| |-CommentRepository.java
| |-OwnerShipTreeRepository.java
| |-AccountRepository.java
| |-BusinessAccountRepository.java
| |-CinemaLayoutGroupRepository.java
| |-PaymentRepository.java
| |-PerformRepository.java
| |-FilmRepository.java
| |-BusinessBankRepository.java
| |-BusinessRepository.java
| |-TagRepository.java
|-dto
| |-UserDTO.java
| |-payment
| | |-BusinessBankDTO.java
| | |-BusinessBankDTOItem.java
| |-RankingDTO.java
| |-film
| | |-FilmDTO.java
| |-TranslateTypeDTO.java
| |-FilmPriceDTO.java
| |-CommentDTO.java
| |-PickSeatDTO.java
| |-cinema
| | |-CinemaRoomDTO.java
| | |-CinemaManagerDTO.java
| | |-CinemaDTO.java
| | |-CinemaProviderDTO.java
| | |-item
| | | |-CinemaRoomDTOItem.java
| | | |-CinemaLayoutDTOItem.java
| | | |-CinemaLayoutSeatDTOItem.java
| | | |-CinemaLayoutGroupDTOItem.java
| | |-CinemaLayoutDTO.java
| |-BusinessOwnerShipDTO.java
| |-SeatPriceDTO.java
| |-perform
| | |-PerformDTOItem.java
| | |-PerformDTO.java
| |-TagDTO.java
| |-PaymentDTO.java
|-controller
| |-ManagerCinemaController.java
| |-OrderPaymentController.java
| |-PaymentController.java
| |-FilmController.java
| |-PickSeatController.java
| |-PerformController.java
| |-GetPaymentStatusController.java
| |-CallbackPaymentController.java
| |-cinema
| | |-CinemaProviderController.java
| | |-CinemaRoomController.java
| | |-CinemaController.java
| | |-CinemaLayoutController.java
| |-CommentController.java
| |-TagController.java
| |-BusinessBankController.java
|-configuration
| |-RedisConfiguration.java
| |-SecurityConfiguration.java
| |-KeyExpiredListener.java
| |-JwtAuthenticationFilter.java
| |-Subcriber.java
| |-ApplicationConfig.java
|-utils
| |-ConvertJsonNameToTypeName.java
| |-VnPayHelper.java
|-common
| |-TranslateType.java
| |-ErrorKey.java
| |-ViewType.java
| |-RoomType.java
| |-Role.java
| |-Status.java
| |-LayoutType.java
| |-CommentType.java
| |-RoleCinema.java
| |-RoleProvider.java
| |-BusinessRole.java
| |-BankType.java
| |-VnPayConstant.java
| |-SeatStatus.java
|-payload
| |-request
| | |-AddCommentRequest.java
| | |-AddCinemaRequest.java
| | |-OrderRequestDTO.java
| | |-AddOrUpdateCinemaRoom.java
| | |-AddFilmPriceRequest.java
| | |-AddSeatPaymentRequest.java
| | |-CloneLayoutCinemaRequest.java
| | |-AddPerformRequest.java
| | |-AddBusinessBankRequest.java
| | |-PickSeatRequest.java
| | |-DeletePickSeatRequest.java
| | |-AddFilmRequest.java
| | |-AddOrDeleteTagRequest.java
| | |-AddAndDeleteManagerRequest.java
| | |-AddCinemaLayoutRequest.java
| | |-AddOrDeletePickSeatRequest.java
| | |-StatusRequestDTO.java
| | |-AddPaymentRequest.java
| |-response
| | |-DataResponse.java
| | |-PagingResponse.java
| | |-SocketResponse.java
| | |-PickSeatResponse.java
| | |-PageResponse.java
| | |-CommentResponse.java
|-output.txt
- Secure user registration and login for providers, branch managers, and customers using JWT (JSON Web Tokens).
- Each time a request is made, database will check existing the credentials of its token.
- Redis is used to enhance authentication performance by caching credentials with a time-to-live (TTL). This reduces database load and speeds up the authentication process, ensuring quick access to user sessions.
-
RBAC (Role-Based Access Control) is used to determine permissions for Business Accounts and Customer Accounts.
-
Business Account just have permissions on own their Cinema provider or cinema branches:
- Business Accounts: Can access resources associated with their own cinema provider or cinema branches.
- Customer Accounts: Have access to booking and ticket management features.
-
Ownership Validation Using DFS concept:
- The system checks whether the provider account or branch account is directly linked to the cinema branch.
- If not directly linked, the DFS algorithm traverses up the ownership hierarchy to check if the provider account is associated with the parent provider of the cinema.
- If a link is found, the request continues to role validation. If no link is found, access is denied.
- Code:

- Table Database: To optimize searching, used NoSQL concept, create just only one table for link child entity to parent entity via ID

-
Role Permission Check:
- Implementing booking for screenings and managing seat status (e.g., pending, booked) with Nodejs (is pending).
- Caching pending seat selections in Redis to optimize database writes.
- Ensuring seats marked as pending can be resolved in case the server is terminated by CronJob (is pending).
- The application features a scalable design that allows providers to easily add multiple types of wallets (VNPAY, MOMO, ZALOPAY) to enhance payment flexibility. Currently supported wallet types include: VNPay

LINK: https://dbdiagram.io/d/Trat-DJien-ITMC-Solution-65bf2fc6ac844320ae6458be

- Prerequisite: Docker with latest version
- Clone this repository, move to its directory on your device and run
docker compose upIn progress
This project is licensed under the MIT License. See the LICENSE file for details.


