How munavar-git/aurafit works
AuraFit is a React storefront with customer accounts, shopping, checkout and order tracking, alongside an admin area for catalog, user and order management. The customer journey is routed through product browsing and details, cart, checkout and order history; authentication gates account actions. Redux holds authentication and admin state, while cart and wishlist hooks manage user-specific data through services. The README is only a Vite template description, so product capabilities are inferred from the source tree. Arrows are limited to relationships shown in excerpts or the source index; unsampled wiring is omitted.
Main entry points: AppRouter.jsx App routing · src/pages Storefront pages · admin/pages Admin pages · NavBar.jsx Site navigation
Components 26
Customer storefront
- App routing
src/routes/AppRouter.jsx - Storefront pages
src/pages - Home sections
src/components/home - Site navigation
src/components/layout/NavBar.jsx - Site footer
src/components/layout/Footer.jsx - Product search
src/components/layout/SearchOverlay.jsx
Identity and state
- Sign-in pages
src/pages/authentication - Customer route guard
src/routes/ProtectedRoute.jsx - Authentication state
src/redux/authSlice.js
Commerce services
- User service
src/services/userServices.js - Cart state and actions
src/hooks/useCart.js - Wishlist state and actions
src/hooks/useWishlist.js - Cart service
src/services/cartService.js - Wishlist service
src/services/wishlistService.js - Product service
src/services/productService.js - Order service
src/services/orderService.js
Administration
- Admin route guard
src/admin/routes/AdminProtectedRoute.jsx - Admin pages
src/admin/pages - Admin layout
src/admin/components/AdminLayout.jsx - Admin product state
src/admin/slices/adminProductSlice.js - Admin order state
src/admin/slices/adminOrderSlice.js - Admin user state
src/admin/slices/adminUserSlice.js - Admin tables and forms
src/admin/components - Sales overview
src/admin/components/SalesOverview.jsx
Other components
- Shopper
- JSON Server
Connections 37
- Shopper → App routing: browses
src/routes/AppRouter.jsx - App routing → Storefront pages: routes to
src/routes/AppRouter.jsx - App routing → Sign-in pages: routes to
src/routes/AppRouter.jsx - App routing → Customer route guard: guards customer routes
src/routes/AppRouter.jsx - App routing → Admin route guard: guards admin routes
src/routes/AppRouter.jsx - App routing → Admin pages: routes to
src/routes/AppRouter.jsx - App routing → Admin layout: wraps admin routes
src/routes/AppRouter.jsx - Sign-in pages → User service: authenticates
src/pages/authentication/Login.jsx - Sign-in pages → Authentication state: updates
src/pages/authentication/Login.jsx - Customer route guard → Authentication state: checks session
src/routes/ProtectedRoute.jsx - Site navigation → Authentication state: dispatches logout
src/components/layout/NavBar.jsx - Site navigation → Cart state and actions: reads cart
src/components/layout/NavBar.jsx - Site navigation → Wishlist state and actions: reads wishlist
src/components/layout/NavBar.jsx - Site navigation → Product search: opens
src/components/layout/NavBar.jsx - Storefront pages → Site navigation: uses
src/pages/Products.jsx - Storefront pages → Site footer: uses
src/pages/Products.jsx - Storefront pages → Product service: loads products
src/pages/Products.jsx - Product search → Product service: searches products
src/components/layout/SearchOverlay.jsx - Storefront pages → Cart state and actions: uses cart
src/pages/Checkout.jsx - Storefront pages → Order service: creates orders
src/pages/Checkout.jsx - Storefront pages → Order service: loads order history
src/pages/MyOrders.jsx - Cart state and actions → Cart service: loads and saves
src/hooks/useCart.js - Wishlist state and actions → Wishlist service: loads and saves
src/hooks/useWishlist.js - Cart service → JSON Server: reads and writes
- Wishlist service → JSON Server: reads and writes
- User service → JSON Server: reads and writes
src/services/userServices.js - Product service → JSON Server: reads and writes
src/services/productService.js - Order service → JSON Server: reads and writes
src/services/orderService.js - Admin route guard → Admin layout: permits admin
src/routes/AppRouter.jsx - Admin pages → Admin product state: dispatches product actions
src/admin/pages/AddProduct.jsx - Admin pages → Admin order state: dispatches order actions
src/admin/pages/Orders.jsx - Admin pages → Admin user state: dispatches user actions
src/admin/pages/Users.jsx - Admin pages → Admin tables and forms: renders tables and forms
src/admin/pages/Products.jsx - Admin pages → Sales overview: renders overview
src/admin/pages/Dashboard.jsx - Admin product state → Product service: requests catalog data
src/admin/slices/adminProductSlice.js - Admin order state → Order service: requests order data
src/admin/slices/adminOrderSlice.js - Admin user state → User service: requests user data
src/admin/slices/adminUserSlice.js