A modern, minimalistic e-commerce web application built with React. Browse products across multiple categories, manage your shopping cart, and save your favorite items.
- 🏠 Home Page with hot deals and featured categories
- 🔍 Real-time Search with product suggestions
- 📂 Category Pages (Beauty, Fragrances, Dresses, Bags)
- 🛒 Shopping Cart with quantity management
- ❤️ Favorites/Wishlist functionality
- 💰 Discount Display with original and sale prices
- 🎨 Minimalistic UI with clean, modern styling
View Live Demo (https://thriving-mermaid-aaea0e.netlify.app/)
- React - UI library
- React Router - Navigation and routing
- Context API - State management (Cart & Favorites)
- DummyJSON API - Product data
Before you begin, ensure you have the following installed:
- Node.js (v14 or higher)
- npm or yarn
git clone https://github.com/HannaInIT/react-project.git
cd react-projectnpm install
# or
yarn installnpm run dev
# or
yarn devThe app will open at http://localhost:5173 (or another port if 5173 is busy).
react-project/
├── public/
├── src/
│ ├── assets/ # Images and icons
│ ├── components/ # Reusable components
│ │ ├── Header.jsx
│ │ ├── Footer.jsx
│ │ ├── ProductCard.jsx
│ │ └── PromoSlider.jsx
│ ├── context/ # Context providers
│ │ ├── CartContext.jsx
│ │ └── FavoritesContext.jsx
│ ├── pages/ # Page components
│ │ ├── Home.jsx
│ │ ├── Category.jsx
│ │ ├── ProductDetail.jsx
│ │ ├── Cart.jsx
│ │ └── Favorites.jsx
│ ├── utils/ # Utility functions
│ │ ├── priceDiscount.js
│ │ └── debounce.js
│ ├── App.jsx # Main app component
│ ├── App.css # Global styles
│ └── main.jsx # Entry point
├── package.json
└── README.md
- Add/remove products
- Adjust quantities
- Persistent storage (localStorage)
- Real-time total calculation
- Save products for later
- Toggle favorites from any page
- Persistent storage (localStorage)
- Real-time product search
- Debounced API calls
- Dropdown suggestions
- Grid layout for browsing
- Discount badges
- Price calculations
- Hover effects
This project uses the DummyJSON API for product data.
Endpoints used:
GET /products/search?q={query}- Search productsGET /products/category/{category}- Get products by categoryGET /products/{id}- Get single product
⭐ If you like this project, please give it a star! ⭐