How hiandy98/lunch-order-system works
This repository is primarily a Spring backend for user accounts, authentication, and store/menu records. The visible user workflow supports registration and account maintenance; the store workflow supports create, retrieve, update, and delete. The frontend source is a Vite/React starter screen rather than a lunch-ordering interface. Source excerpts establish controller-to-service calls and sampled persistence/authentication actions; wiring not demonstrated by excerpts is left out.
Main entry points: UserController.java User Controller · DefaultUserService.java User Service · StoreController.java Store Controller · DefaultStoreService.java Store Service
Components 18
User Accounts
- User Controller
backend/src/main/java/com/lunch/ops/backend/user/controller/UserController.java - Registration Service
backend/src/main/java/com/lunch/ops/backend/user/service/impl/DefaultUserRegisterService.java - User Service
backend/src/main/java/com/lunch/ops/backend/user/service/impl/DefaultUserService.java - User Repository
backend/src/main/java/com/lunch/ops/backend/user/repository/UserRepository.java - User Entity
backend/src/main/java/com/lunch/ops/backend/user/entity/User.java
Store Catalog
- Store Controller
backend/src/main/java/com/lunch/ops/backend/store/controller/StoreController.java - Store Service
backend/src/main/java/com/lunch/ops/backend/store/service/impl/DefaultStoreService.java - Store Repository
backend/src/main/java/com/lunch/ops/backend/store/repository/StoreRepository.java - Store and Menu
backend/src/main/java/com/lunch/ops/backend/store/entity/Store.java
Authentication
- Auth Controller
backend/src/main/java/com/lunch/ops/backend/user/controller/AuthController.java - Auth Service
backend/src/main/java/com/lunch/ops/backend/user/service/impl/DefaultAuthService.java - User Details Lookup
backend/src/main/java/com/lunch/ops/backend/security/CustomUserDetailsService.java - JWT Filter
backend/src/main/java/com/lunch/ops/backend/security/JwtAuthenticationFilter.java - JSON Login Filter
backend/src/main/java/com/lunch/ops/backend/security/JsonAuthenticationFilter.java - JWT Utilities
backend/src/main/java/com/lunch/ops/backend/security/JwtUtils.java - Security Configuration
backend/src/main/java/com/lunch/ops/backend/config/SecurityConfig.java
Other components
- API Client
- Error Handling
backend/src/main/java/com/lunch/ops/backend/common/exception/GlobalExceptionHandler.java
Connections 16
- API Client → User Controller: sends account requests
- API Client → Auth Controller: requests logout
- API Client → Store Controller: sends store requests
- User Controller → Registration Service: registers users
- User Controller → User Service: manages accounts
- Registration Service → User Repository: checks and saves
- User Service → User Repository: reads and writes
- User Service → Auth Service: logs out on account changes
- User Details Lookup → User Repository: looks up users
- Auth Controller → Auth Service: logs out
- Auth Service → API Client: clears auth cookie
- Store Controller → Store Service: manages stores
- Store Service → Store Repository: reads and writes
- Store Service → Store and Menu: creates and updates
- User Controller → Error Handling: errors handled by
- Store Controller → Error Handling: errors handled by