This is a feature-rich e-commerce web app and also my very first React project which I started to build after learning React from a Youtube channel. The app includes various pages for products, a functional cart, error handling, and a checkout system. It is fully responsive and provides a seamless user experience across all devices.
- HTML & CSS: For structure and styling as I didn't have any idea about Tailwind CSS at that time.
- React.js: Because I learned this and wanted to implement React in some project.
-
Home Page, Product Pages, and About Page:
- Product pages include:
- Everything
- Groceries
- Toiletries
- Products are listed based on the page's category.
- Product pages include:
-
Product Description Page:
- Displays detailed information about a product when clicked on a product listing.
-
Search Functionality:
- Search products by name on each product page.
- Add products to the cart.
- Edit the quantity of items in the cart.
- Displays the total amount for items in the cart.
- Includes a checkout button that navigates to an order form.
- On form submission, displays a success message on the final order page.
- No Products to Display:
- Shown when the product page loads, and the user searches for an unavailable product.
- 404 Not Found:
- Shown when the user types an invalid URL.
The app looks great on all devices, whether mobile, tablet, or desktop.
I learned alot btw and also faced many challenges along the way because as a beginner in react I started to build this ecommerce store (You can think how difficult it was for me). Well, I learned alot from each and every challenge which I faced along my way and I enjoyed the process as well.
-
Fake Product Data:
- Stored in a JSON file for a simple, mock database.
-
React Router:
- Enables smooth navigation between different pages.
-
Context API:
- Used for state management.
-
Custom Hook:
- Created to fetch product data for maintaining DRY (Don't Repeat Yourself) code.
-
Axios:
- Used for API requests.
- Clone the repository:
git clone https://github.com/rumaisanaveed/ecommerce-app.git
- Navigate to the project directory:
cd ecommerce-app
- Install dependencies:
npm install
- Start the development server:
Terminal 1:Terminal 2:npm start
npx json-server -p 3500 -w data/db.json
⭐ Note: Take your time to explore the app at https://organic-ecommerce-store.netlify.app/, and don't forget to give this repo a star!