How sovannarahong/coffee-shop-backend works
This is a Spring coffee-shop backend exposing staff and customer APIs for catalog, ordering, payments, inventory, and administration. The main customer flow is API request to domain service, then persistence or payment processing, with a response; the sampled review flow specifically checks completed purchases before accepting a review. The tree also shows authentication, purchasing, inventory, and notification subsystems. No README was supplied, so relationships beyond the sampled controller/service code are omitted or marked unverified.
Main entry points: controller REST controllers · ReviewServiceImpl.java Review workflow · repository Application database · service Order management
Components 20
API surface
- REST controllers
src/main/java/com/coffee_shop/coffee_shop/controller - Review endpoints
src/main/java/com/coffee_shop/coffee_shop/controller/ReviewController.java
Customer commerce
- Review workflow
src/main/java/com/coffee_shop/coffee_shop/service/serviceimpl/ReviewServiceImpl.java - Review persistence
src/main/java/com/coffee_shop/coffee_shop/repository/ReviewRepository.java - Order management
src/main/java/com/coffee_shop/coffee_shop/service - Product catalog
src/main/java/com/coffee_shop/coffee_shop/service - Payment processing
src/main/java/com/coffee_shop/coffee_shop/service - Rating summary
src/main/java/com/coffee_shop/coffee_shop/dto/response/ProductRatingSummaryResponse.java
Staff operations
- Ingredients and stock
src/main/java/com/coffee_shop/coffee_shop/service/IngredientService.java - Supplier purchasing
src/main/java/com/coffee_shop/coffee_shop/service - Staff administration
src/main/java/com/coffee_shop/coffee_shop/service/UserService.java - Application database
src/main/java/com/coffee_shop/coffee_shop/repository
Identity and access
- Authentication
src/main/java/com/coffee_shop/coffee_shop/security - Customer accounts
src/main/java/com/coffee_shop/coffee_shop/service - Audit logging
src/main/java/com/coffee_shop/coffee_shop/service
External integrations
- CutLuy gateway client
src/main/java/com/coffee_shop/coffee_shop/client/CutLuyClient.java - CutLuy service
- Telegram notifications
src/main/java/com/coffee_shop/coffee_shop/service/serviceimpl/TelegramNotificationServiceImpl.java - Image storage
src/main/java/com/coffee_shop/coffee_shop/service/serviceimpl/S3ServiceImpl.java
Other components
- Customer / staff
Connections 23
- Customer / staff → Review endpoints: submits requests
src/main/java/com/coffee_shop/coffee_shop/controller/ReviewController.java - Review endpoints → Review workflow: calls service
src/main/java/com/coffee_shop/coffee_shop/controller/ReviewController.java - Review workflow → Review persistence: reads and writes
src/main/java/com/coffee_shop/coffee_shop/service/serviceimpl/ReviewServiceImpl.java - Review workflow → Order management: checks purchase
src/main/java/com/coffee_shop/coffee_shop/service/serviceimpl/ReviewServiceImpl.java - Review workflow → Rating summary: builds summary
src/main/java/com/coffee_shop/coffee_shop/service/serviceimpl/ReviewServiceImpl.java - Customer / staff → REST controllers: uses API
- REST controllers → Product catalog: dispatches requests
src/main/java/com/coffee_shop/coffee_shop/controller/ReviewController.java - REST controllers → Order management: dispatches requests
src/main/java/com/coffee_shop/coffee_shop/controller/ReviewController.java - REST controllers → Payment processing: dispatches requests
src/main/java/com/coffee_shop/coffee_shop/controller/ReviewController.java - REST controllers → Ingredients and stock: dispatches requests
src/main/java/com/coffee_shop/coffee_shop/controller/IngredientController.java - REST controllers → Supplier purchasing: dispatches requests
src/main/java/com/coffee_shop/coffee_shop/controller/ReviewController.java - REST controllers → Staff administration: dispatches requests
- REST controllers → Customer accounts: dispatches requests
src/main/java/com/coffee_shop/coffee_shop/controller/ReviewController.java - REST controllers → Audit logging: dispatches requests
src/main/java/com/coffee_shop/coffee_shop/controller/ReviewController.java - Authentication → Staff administration: authenticates staff
- Payment processing → CutLuy gateway client: requests payment
- CutLuy gateway client → CutLuy service: calls gateway
- Product catalog → Image storage: uploads images
- Order management → Telegram notifications: sends notifications
- Review persistence → Application database: persists reviews
- Staff administration → Application database: persists staff data
- Ingredients and stock → Application database: persists stock
- Supplier purchasing → Application database: persists purchases
src/main/java/com/coffee_shop/coffee_shop/service/serviceimpl/ReviewServiceImpl.java