How namnguyen1409/sp25-swp391-group2-se1889vj works
Project type and purpose
• This is a monolithic, full-stack Spring Boot web application (“Rice Sales Management System”) that uses Thymeleaf for server-side rendering, exposes REST endpoints for AJAX/clients, and integrates with WebSocket for real-time notifications. Its purpose is to allow rice dealers to manage products, warehouses, invoices, customers, and users through a browser UI, backed by a Microsoft SQL Server database.
File structure
• Top-level: pom.xml (Maven build), src/main/java (all Java code), src/main/resources (static assets and Thymeleaf templates), uploads (file store).
• Packages under java/com/group2/...:
• config – Spring configuration (MVC, security, WebSocket, DataInitializer)
• controller – MVC + REST controllers
• dto – Data Transfer Objects for API payloads
• entity – JPA entities
• repository – Spring Data JPA repositories
• service & service/impl – Business logic layer
• security & filter – JWT auth, user details, Recaptcha
• scheduler – Scheduled tasks (balance, invoice)
• mapper – MapStruct or manual mapping between entities and DTOs
• exception, handler – Custom exceptions and global handlers
• validation – Custom validation annotations and validators
• message – Domain-specific messaging (e.g., invoice status)
• Other helpers: util, specification (dynamic query builders)
• Static/UI: resources/static (JS/CSS/images), resources/templates (Thymeleaf HTML), organized by functional modules (auth, customer, product, invoice, warehouse, etc.).
README for additional insights
• Confirms core modules: product, warehouse (with zones), invoice (import/export, sales/purchase), customer, user.
• Tech stack: Spring Boot (Web, Data JPA, Security, Validation, Thymeleaf), Microsoft SQL Server, Lombok, Maven, Java 21.
• Integration: SMTP mail service, Google reCAPTCHA, file storage for uploads.
Final advice
• Be as detailed as possible: break down the monolith into its logical modules (Security, Web/MVC, REST API, Services, Repositories, Scheduling, Storage, Messaging).
• External dependencies (DB, SMTP, Recaptcha).
• Avoid over-complicating: focus on essential flows (user login, CRUD operations, scheduled tasks, notifications).