How gokulvgk/online-jwellery-shop works
This repository implements a small storefront: users browse products, build a session-persisted cart, and submit purchases; separate screens support registration and login. The React client routes these workflows and shares cart state, while Spring controllers handle account and purchase requests, with services and repositories behind them. The purchase submission endpoint is visible in the client, but the purchase controller implementation was not excerpted, so that connection is marked unverified. The README is empty; other unsampled behavior is not inferred.
Main entry points: App.jsx Route App · CartProvider.jsx Cart State · CartPage.jsx Cart Page · BillAmount.jsx Bill Amount
Components 24
Storefront UI
- Route App
client/src/App.jsx - Product Browse
client/src/pages/HomePage.jsx - Product List
client/src/components/ItemList.jsx - Product Selection
client/src/components/Item.jsx
Cart Workflow
- Cart State
client/src/contexts/CartProvider.jsx - Cart Page
client/src/pages/CartPage.jsx - Cart List
client/src/components/CartList.jsx - Cart Item
client/src/components/CartItem.jsx - Quantity Controls
client/src/components/AdjustQuantityButtons.jsx - Bill Amount
client/src/components/BillAmount.jsx - Purchase Submit
client/src/components/BuyButton.jsx - Purchase Closure
client/src/components/ClosureModal.jsx
Account Services
- Login Screen
client/src/pages/LoginPage.jsx - Registration Screen
client/src/pages/RegisterPage.jsx - Account Controller
server/src/main/java/packages/react_backend/controllers/LoginRegisterController.java - Account Service
server/src/main/java/packages/react_backend/services/LoginRegisterService.java - Password Encoder
server/src/main/java/packages/react_backend/services/EncoderService.java - User Repository
server/src/main/java/packages/react_backend/repositories/UsersRepo.java - User Record
server/src/main/java/packages/react_backend/DAOmodels/UsersEntity.java
Purchase Services
- Purchase Controller
server/src/main/java/packages/react_backend/controllers/BuyController.java - Purchase Service
server/src/main/java/packages/react_backend/services/PurchaseService.java - Purchase Repository
server/src/main/java/packages/react_backend/repositories/PurchaseRepo.java - Purchase Record
server/src/main/java/packages/react_backend/DAOmodels/PurchaseEntity.java
Other components
- Shopper
Connections 28
- Shopper → Route App: opens
- Route App → Product Browse: routes to
client/src/App.jsx - Route App → Cart Page: routes to
client/src/App.jsx - Route App → Login Screen: routes to
client/src/App.jsx - Route App → Registration Screen: routes to
client/src/App.jsx - Product Browse → Product List: renders
client/src/pages/HomePage.jsx - Product List → Product Selection: renders
client/src/components/ItemList.jsx - Product Selection → Cart State: updates
client/src/components/Item.jsx - Cart Page → Cart State: reads
client/src/pages/CartPage.jsx - Cart Page → Cart List: renders
client/src/pages/CartPage.jsx - Cart List → Cart Item: renders
client/src/components/CartList.jsx - Cart Item → Quantity Controls: renders
client/src/components/CartItem.jsx - Quantity Controls → Cart State: adjusts
client/src/components/AdjustQuantityButtons.jsx - Cart Page → Bill Amount: renders
client/src/pages/CartPage.jsx - Bill Amount → Cart State: reads
client/src/components/BillAmount.jsx - Bill Amount → Purchase Submit: renders
client/src/components/BillAmount.jsx - Bill Amount → Purchase Closure: renders
client/src/components/BillAmount.jsx - Purchase Submit → Cart State: reads
client/src/components/BuyButton.jsx - Purchase Submit → Purchase Controller: posts purchases
- Registration Screen → Account Controller: posts registration
client/src/pages/RegisterPage.jsx - Account Controller → Account Service: delegates to
server/src/main/java/packages/react_backend/controllers/LoginRegisterController.java - Account Service → User Repository: reads and saves
server/src/main/java/packages/react_backend/services/LoginRegisterService.java - Account Service → Password Encoder: encodes and matches
server/src/main/java/packages/react_backend/services/LoginRegisterService.java - User Repository → User Record: persists
server/src/main/java/packages/react_backend/repositories/UsersRepo.java - Purchase Controller → Purchase Service: delegates to
server/src/main/java/packages/react_backend/controllers/BuyController.java - Purchase Service → Purchase Repository: saves batches
server/src/main/java/packages/react_backend/services/PurchaseService.java - Purchase Service → Purchase Record: maps purchases
server/src/main/java/packages/react_backend/services/PurchaseService.java - Purchase Repository → Purchase Record: persists
server/src/main/java/packages/react_backend/repositories/PurchaseRepo.java