A React/Next.js application for managing and browsing products with features such as filtering, sorting, pagination, favorites, and editing. Built with Zustand, Tailwind CSS, and React Hook Form.
-
Fetch products from a public API (
https://dummyjson.com/products). -
Favorites system: mark/unmark products as favorite.
-
Filter & search:
- Filter by all or favorites.
- Search by product title.
- Filter by category.
-
Sorting:
- By price (ascending/descending).
-
Pagination: displays products in pages with a configurable number of items per page.
-
Product details page with full description, image, price, and rating.
-
Responsive UI built with Tailwind CSS.
- Next.js 16 (App Router / Client Components)
- React 19
- TypeScript
- Zustand for state management
- React Hook Form for forms
- Tailwind CSS for styling
- Lucide React icons
/components # Reusable UI components (ProductCard, EditProductForm, Navbar)
/hooks # Custom hooks (useProductsFilters)
/store # Zustand store for products
/shared-types # TypeScript types
/pages # Next.js pages (Products list, Product detail, Edit product)
/api # API fetching utilities
- Clone the repository:
git clone https://github.com/asxnah/products.git
cd products-dashboard- Install dependencies:
npm i- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
dev– start Next.js dev serverbuild– build for productionstart– start production serverlint– run linterformat– format code (if Prettier is set up)
All product-related state is managed with Zustand:
products: list of productsfavorites: list of favorite product IDs- Methods:
fetchProducts()toggleLike(id)