How upin-0583/backendhoatuoiuit works
Project type and purpose
• This is a Spring Boot–based backend RESTful API for an e-commerce flower‐ordering system (“HoaTuoiUIT”).
• It exposes endpoints for products, categories, customers, carts, orders, payments, promotions, reviews, file uploads, and user authentication (JWT).
File structure
• Top‐level:
• pom.xml / Maven wrapper (.mvn, mvnw) – build and dependency management
• src/main/java/com/example/backendhoatuoiuit – code organized by layer
• src/main/resources/application.properties – configuration
• uploads – physical file storage for uploads
• src/test – automated tests
• Layered organization under src/main/java:
• config – AppConfig, WebConfig (CORS, view resolvers), DataInitializer (DB seeding)
• controller – REST controllers per resource
• dto – request/response payload objects
• entity – JPA entities modeling tables
• repository – Spring Data JPA interfaces
• service – business logic services
• mapper – MapStruct (or manual) mappers entity↔DTO
• security – JWT filter, token provider, UserDetailsService, SecurityConfig
• exception – global exception handler, custom exceptions
Key architectural insights from README
• Postman collection for testing APIs
• No frontend in repo – implies full‐stack with separate UI consuming these APIs