How movie-ticket-booking-group/movie-ticket-booking-project works
Project type and purpose
• This is a Java Spring Boot backend micro-service for a movie-ticket booking platform. It exposes RESTful endpoints for browsing/searching movies, booking tickets, viewing history, and administering movie data.
File structure
• Top-level: pom.xml, mvnw script, .mvn wrapper → this is a Maven Spring Boot project.
• src/main/java/com/cinema_package/cinema_project:
• CinemaProjectApplication.java (Spring Boot entry point)
• MovieController.java (REST API layer)
• MovieService.java (business logic)
• MovieRepository.java (Spring Data JPA data‐access)
• Movie.java and BookingHistory.java (JPA entities)
• src/main/resources/application.properties → holds DB and other configuration.
• Testing under src/test/java mirrors the main package.
README for additional insights
• Uses PostgreSQL (relational persistence), Spring Data JPA, Docker for containerization, and Postman as a client.
• Describes all REST endpoints (GET, POST, PUT, DELETE) plus an external “payment” step parameter.
Components
a. Main components
• Clients (Web, Mobile, Postman)
• API Layer (MovieController)
• Service Layer (MovieService)
• Data Access Layer (MovieRepository)
• PostgreSQL Database
• Infrastructure container (Docker)
b. Relationships and interactions
• Client → HTTP call → Controller
• Controller → calls → Service
• Service → calls → Repository
• Repository → JDBC/ORM → PostgreSQL
• All components run inside a Docker container or Kubernetes pod (optional layer).
c. Architectural patterns and design principles
• Layered (Controller → Service → Repository)
• MVC‐style separation (though no UI code here, Controller handles input, Service handles business rules, Repository handles persistence)
• Spring Boot auto-configuration, dependency injection
d. Key technologies
• Java 17+ (or 11+)
• Spring Boot (embedded Tomcat)
• Spring MVC (REST controllers)
• Spring Data JPA (Hibernate)
• PostgreSQL (persistent store)
• Docker for containerization
• Maven for build
Detail level
• If using Docker, group all app components inside a “Container” boundary