How sivakalyanb/shopverse works
ShopVerse is a React storefront backed by a Go/Fiber API and MySQL. Shoppers browse products, authenticate, manage a cart and wishlist, then place and review orders. The frontend application owns shared session/cart state and API requests; the backend routes those requests to domain handlers, which use the database layer. The README documents the three-tier deployment and API capabilities; unsampled frontend pages and handlers are represented at their tree paths, without assuming unshown call details.
Main entry points: App.jsx App state and routes · main.go HTTP API routes · db.go Database access · HomePage.jsx Home catalog
Components 20
Storefront
- React bootstrap
frontend/src/main.jsx - App state and routes
frontend/src/App.jsx - Authentication page
frontend/src/pages/AuthPage.jsx - Home catalog
frontend/src/pages/HomePage.jsx - Product browsing
frontend/src/pages/ProductsPage.jsx - Product card
frontend/src/components/ProductCard.jsx - Cart checkout
frontend/src/pages/CartPage.jsx - Order history
frontend/src/pages/OrdersPage.jsx - Wishlist page
frontend/src/pages/WishlistPage.jsx - Navigation
frontend/src/components/Navbar.jsx - Cart sidebar
frontend/src/components/CartSidebar.jsx
Commerce API
- HTTP API routes
backend/cmd/main.go - Authentication handlers
backend/internal/handlers/auth.go - Product handlers
backend/internal/handlers/products.go - Cart handlers
backend/internal/handlers/cart.go - Order handlers
backend/internal/handlers/orders.go - JWT middleware
backend/internal/middleware/auth.go
Persistence
- Database access
backend/internal/database/db.go - MySQL store
Other components
- Shopper
Connections 28
- Shopper → React bootstrap: uses
README.md - React bootstrap → App state and routes: renders
frontend/src/main.jsx - App state and routes → Authentication page: routes
frontend/src/App.jsx - App state and routes → Home catalog: routes
frontend/src/App.jsx - App state and routes → Product browsing: routes
frontend/src/App.jsx - App state and routes → Cart checkout: routes
frontend/src/App.jsx - App state and routes → Order history: routes
frontend/src/App.jsx - App state and routes → Wishlist page: routes
frontend/src/App.jsx - App state and routes → Navigation: renders
frontend/src/App.jsx - App state and routes → Cart sidebar: renders
frontend/src/App.jsx - Home catalog → Product card: renders
frontend/src/pages/HomePage.jsx - Product browsing → Product card: renders
frontend/src/pages/ProductsPage.jsx - Wishlist page → Product card: renders
frontend/src/pages/WishlistPage.jsx - Authentication page → App state and routes: uses context
frontend/src/pages/AuthPage.jsx - Cart checkout → App state and routes: uses context
frontend/src/pages/CartPage.jsx - Home catalog → HTTP API routes: requests products
frontend/src/pages/HomePage.jsx - App state and routes → HTTP API routes: requests commerce
frontend/src/App.jsx - HTTP API routes → Authentication handlers: routes auth
backend/cmd/main.go - HTTP API routes → Product handlers: routes products
backend/cmd/main.go - HTTP API routes → Cart handlers: routes cart
backend/cmd/main.go - HTTP API routes → Order handlers: routes orders
backend/cmd/main.go - HTTP API routes → JWT middleware: protects routes
backend/cmd/main.go - Authentication handlers → JWT middleware: creates tokens
backend/internal/handlers/auth.go - Authentication handlers → Database access: reads and writes
backend/internal/handlers/auth.go - Product handlers → Database access: reads and writes
backend/internal/handlers/products.go - Cart handlers → Database access: reads and writes
backend/internal/handlers/cart.go - Order handlers → Database access: reads and writes
backend/internal/handlers/orders.go - Database access → MySQL store: persists data
README.md