How nguyenvananit/booking-hotel-backend works
Project type and purpose
• This is a monolithic, backend-only Java application (Spring Boot) named “Manage-Hotel-Backend.”
• It exposes RESTful HTTP endpoints for hotel operations (authentication, booking, rooms, services, staff attendance, payments, etc.).
File structure
• Top-level artifacts:
• pom.xml / .mvn / mvnw → Maven build and wrapper
• Dockerfile → containerization
• src/main/java/com/nguyenvanancodeweb/lakesidehotel/** → Java source code
• src/main/resources/application.properties / application.yml → configuration
• src/test → unit/integration tests
• Layered package layout:
• config → web and CORS configuration
• controller → REST controllers (API layer)
• service / I*Service → business logic
• repository → Spring Data JPA interfaces (data access layer)
• model → domain entities
• request / response → DTOs for inbound/outbound JSON
• security → JWT filters, security config, user-details service
• utils → VNPAY payment configuration and helpers
• External integration:
• VNPAYService calls out to the VNPAY payment gateway
• Persistence:
• Repositories target a relational database (e.g., MySQL/PostgreSQL) via JPA/Hibernate.
README for additional insights
• Minimal README (“# Manage-Hotel-Backend”) but file tree reveals full REST API and external dependencies (JWT, VNPAY).
Detail recommendations
• Docker host & container boundary around that block.
• Inside the app block, list:
• REST Layer (controllers)
• Security Layer (JWT filter, WebSecurityConfig)
• Service Layer
• Repository Layer
• Model Layer (entities)
• Configuration components (WebConfig, CorsConfig) near the REST layer.