How vivekaviva/product-dashboard works
This is a React/TypeScript product catalog app. Users browse and search a paginated list, view product details, and add, edit, or delete products; routed pages dispatch product operations through Redux state and API helpers. Cards calculate discounted prices, while a shared form supports product creation and editing. The README describes only a Vite template, so product capabilities are identified from the source index and sampled code. The API helper is present, but its external service and request details were not shown.
Main entry points: Products.tsx Product listing · DetailedProducts.tsx Product details · productSlice.ts Product state and actions · App.tsx Route map
Components 18
Application Routing
- React entry
src/main.tsx - Route map
src/App.tsx
Catalog Experience
- Product listing
src/pages/Products.tsx - Product details
src/pages/DetailedProducts.tsx - Product card
src/components/ProductCard.tsx - Discount calculation
src/helpers/calculateDiscountedPrice.ts - Pagination controls
src/components/Pagination.tsx - Loading indicator
src/components/Loader.tsx - Search debounce
src/hooks/useDebounce.ts
Product Editing
- Add product
src/pages/AddNewProduct.tsx - Edit product
src/pages/EditProduct.tsx - Product form
src/components/ProductForm.tsx
State and Data
- Typed Redux hooks
src/hooks/hook.ts - Product state and actions
src/store/productSlice.ts - Product API helpers
src/store/productAPI.ts - Product data types
src/store/productTypes.ts - Redux store
src/store/store.ts
Other components
- Catalog user
Connections 29
- Catalog user → React entry: opens app
src/main.tsx - React entry → Route map: renders
src/main.tsx - Route map → Product listing: routes to
src/App.tsx - Route map → Product details: routes to
src/App.tsx - Route map → Add product: routes to
src/App.tsx - Route map → Edit product: routes to
src/App.tsx - React entry → Redux store: provides
src/main.tsx - Product listing → Typed Redux hooks: uses
src/pages/Products.tsx - Product listing → Product state and actions: dispatches
src/pages/Products.tsx - Product listing → Search debounce: debounces search
src/pages/Products.tsx - Product listing → Product card: renders
src/pages/Products.tsx - Product listing → Pagination controls: renders
src/pages/Products.tsx - Product listing → Loading indicator: renders
src/pages/Products.tsx - Product details → Typed Redux hooks: uses
src/pages/DetailedProducts.tsx - Product details → Product state and actions: dispatches
src/pages/DetailedProducts.tsx - Product details → Product card: renders
src/pages/DetailedProducts.tsx - Product details → Loading indicator: renders
src/pages/DetailedProducts.tsx - Product details → Discount calculation: calculates price
src/pages/DetailedProducts.tsx - Product card → Discount calculation: calculates price
src/components/ProductCard.tsx - Add product → Typed Redux hooks: uses
src/pages/AddNewProduct.tsx - Add product → Product state and actions: dispatches
src/pages/AddNewProduct.tsx - Add product → Product form: renders
src/pages/AddNewProduct.tsx - Edit product → Typed Redux hooks: uses
src/pages/EditProduct.tsx - Edit product → Product state and actions: dispatches
src/pages/EditProduct.tsx - Edit product → Product form: renders
src/pages/EditProduct.tsx - Edit product → Loading indicator: renders
src/pages/EditProduct.tsx - Typed Redux hooks → Redux store: selects and dispatches
src/hooks/hook.ts - Redux store → Product state and actions: registers reducer
src/store/store.ts - Product state and actions → Product API helpers: calls
src/store/productSlice.ts