-
Notifications
You must be signed in to change notification settings - Fork 0
Update product #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis update introduces significant refactoring and enhancements across backend and frontend modules. The backend (MartAuth, MartGateway, MartProduct) sees improved entity modeling with richer JPA associations, stricter error handling via custom exceptions, and expanded repository query methods. Controller and service layers are streamlined, with exception handling centralized and method signatures updated. Security configurations and JWT handling are refined for both gateway and auth services. The frontend (martUI) receives a comprehensive redesign: new components (Header, Footer, Contact, Cart, Checkout, Wishlist, ProductDetails, etc.) are added, navigation and routing are restructured, and code organization is improved for scalability and maintainability. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Gateway
participant AuthService
participant ProductService
User->>Gateway: HTTP request (e.g., /authen/login, /products)
Gateway->>Gateway: JwtAuthenticationFilter (extracts JWT, roles)
alt Public endpoint (/authen/**, /users/**, /actuator/**)
Gateway->>TargetService: Forward request (no auth required)
else Protected endpoint
alt JWT valid
Gateway->>TargetService: Forward request with user headers
else JWT invalid
Gateway-->>User: 401 Unauthorized
end
end
TargetService->>Gateway: Response
Gateway->>User: Response
sequenceDiagram
participant Controller
participant Service
participant Repository
participant DB
Controller->>Service: API call (e.g., getProductById)
Service->>Repository: Query (e.g., findById)
Repository->>DB: SQL/ORM query
DB-->>Repository: Entity/Result
alt Entity found
Repository-->>Service: Entity
Service-->>Controller: Entity
else Not found
Repository-->>Service: null/empty
Service-->>Controller: throw ProductException
end
Controller-->>User: Response (or error)
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (64)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Style
Documentation