How asyncarijit/truassignment works
Project type and purpose
• This is a single-page frontend application built with React and Vite.
• Purpose: allow users to search products (e.g., via barcode), apply filters, view product listings and details. It relies on an external products API/service.
File structure
• Top-level “public” and “index.html”: static assets and HTML entrypoint.
• “vite.config.js”: Vite dev/build configuration.
• “src/main.jsx”: application bootstrap (mounts React into the DOM).
• “src/App.jsx”: root component that defines routes/pages.
• “src/pages”: high-level routes: Home, ProductDetails.
• “src/components”: reusable UI components (SearchBar, BarcodeSearch, Filters, ProductCard, Skeleton).
• “src/hooks”: custom hooks (useFilters, useProducts) that encapsulate data fetching and business logic.
• “src/redux”: state management;
• store.js – configures Redux store
• slices/filterSlice.js – manages filter state
• slices/productSlice.js – manages products list & details
• “src/utils”: pure helper functions (extractMeta, productUtils).
README
• Confirms this is a minimal React+Vite template with HMR and ESLint, using either Babel or SWC plugin.
• No backend or specialized architecture is mentioned beyond the standard SPA.
Detailed checklist to capture essential elements
• [ ] Vite Dev/Build environment
• [ ] index.html → main.jsx → App.jsx (application bootstrap flow)
• [ ] Pages (Home, ProductDetails)
• [ ] Core Components (SearchBar, BarcodeSearch, Filters, ProductCard)
• [ ] Redux store and slices (filterSlice, productSlice)
• [ ] Custom Hooks (useFilters, useProducts)
• [ ] Utility modules (extractMeta, productUtils)
• [ ] External Products API
• [ ] Data flows and dependencies labeled and directional