How gokulkrishna12/gk-s-fitness-shop-frontend works
GK’s Fitness Shop is a React storefront for browsing fitness products, managing a cart and wishlist, checking out, and tracking orders, with account and admin workflows. The main path runs from the routed app through catalog/product interactions and shared shop state to checkout and order history; admins also manage products and orders. The README additionally describes OTP validation, Razorpay payments, community reviews, and an AI assistant. Some API and page implementations were not sampled, so uncertain connections are omitted; src_backup is treated as a legacy copy, not part of the active app.
Main entry points: App.jsx Routed app · axiosClient.js HTTP client · AuthContext.jsx Auth state · ShopContext.jsx Cart and wishlist state
Components 26
Application shell
- Routed app
src/App.jsx - Navigation
src/components/Navbar/Navbar.jsx - HTTP client
src/api/axiosClient.js
Shopping journey
- Cart and wishlist state
src/context/ShopContext.jsx - Home page
src/pages/Home/Home.jsx - Product catalog
src/pages/Catalog/Catalog.jsx - Product details
src/pages/ProductDetails/ProductDetails.jsx - Product card
src/components/ProductCard/ProductCard.jsx - Cart page
src/pages/Cart/Cart.jsx - Wishlist page
src/pages/Wishlist/Wishlist.jsx - Checkout
src/pages/Checkout/Checkout.jsx - Order history
src/pages/Orders/Orders.jsx
Account and access
- Auth state
src/context/AuthContext.jsx - Sign in
src/pages/Auth/Login.jsx - Registration
src/pages/Auth/Register.jsx - Authentication API
src/api/authApi.js - OTP API
src/api/otpApi.js - Profile
src/pages/Profile/Profile.jsx
Store operations
- Admin dashboard
src/pages/Admin/AdminDashboard.jsx - Admin orders
src/pages/Admin/AdminOrders.jsx - Admin products
src/pages/Admin/AdminProducts.jsx
Customer assistance
- Chat assistant
src/components/ChatAssistant/ChatAssistant.jsx - AI coach
src/components/AiCoachModal/AiCoachModal.jsx
Other components
- Shopper
- Razorpay
- Shop backend
Connections 37
- Shopper → Routed app: opens
- Routed app → Navigation: renders
src/App.jsx - Routed app → Home page: routes to
src/App.jsx - Routed app → Product catalog: routes to
src/App.jsx - Routed app → Product details: routes to
src/App.jsx - Routed app → Sign in: routes to
src/App.jsx - Routed app → Registration: routes to
src/App.jsx - Routed app → Checkout: routes to
src/App.jsx - Routed app → Order history: routes to
src/App.jsx - Routed app → Admin dashboard: routes to
src/App.jsx - Routed app → Auth state: provides
src/App.jsx - Routed app → Cart and wishlist state: provides
src/App.jsx - Routed app → Chat assistant: loads
src/App.jsx - Navigation → Auth state: reads
src/components/Navbar/Navbar.jsx - Navigation → Cart and wishlist state: reads
src/components/Navbar/Navbar.jsx - Product catalog → Product card: renders
src/pages/Catalog/Catalog.jsx - Product catalog → HTTP client: requests catalog
src/pages/Catalog/Catalog.jsx - Product details → HTTP client: requests product data
src/pages/ProductDetails/ProductDetails.jsx - Product details → Product card: renders related items
src/pages/ProductDetails/ProductDetails.jsx - Product card → Cart and wishlist state: uses shopping actions
src/components/ProductCard/ProductCard.jsx - Cart and wishlist state → Auth state: reads login state
src/context/ShopContext.jsx - Cart and wishlist state → HTTP client: syncs cart and wishlist
src/context/ShopContext.jsx - Sign in → Auth state: updates session
src/pages/Auth/Login.jsx - Sign in → Authentication API: uses
src/pages/Auth/Login.jsx - Registration → Auth state: updates session
src/pages/Auth/Register.jsx - Registration → OTP API: uses OTP
src/pages/Auth/Register.jsx - Authentication API → HTTP client: uses client
src/api/authApi.js - Checkout → Auth state: reads session
src/pages/Checkout/Checkout.jsx - Checkout → Cart and wishlist state: reads cart
src/pages/Checkout/Checkout.jsx - Checkout → HTTP client: submits checkout requests
src/pages/Checkout/Checkout.jsx - Checkout → Razorpay: initiates payment
README.md - Order history → Auth state: reads session
src/pages/Orders/Orders.jsx - Order history → HTTP client: requests orders
src/pages/Orders/Orders.jsx - Admin dashboard → Auth state: reads session
src/pages/Admin/AdminDashboard.jsx - Admin dashboard → HTTP client: manages products and orders
src/pages/Admin/AdminDashboard.jsx - Product details → Shop backend: supports reviews
README.md - Shop backend → HTTP client: serves shop data