A modern, responsive React + Redux Toolkit e-commerce application for browsing and purchasing houseplants πΏ
This project was built as part of a peer-graded assignment, following a detailed rubric and objective grading criteria.
GreenLeaf is a simple online plant store that allows users to:
- Browse plants by category
- Add plants to a shopping cart
- Manage quantities using global state
- View total items and total cost in real time
The project demonstrates:
- Component-based UI design
- Global state management with Redux Toolkit
- Client-side routing using React Router
- Responsive and modern UI with Tailwind CSS
- Full-screen hero section with background image
- Company name and short description
- βGet Startedβ button linking to the product listing page
- Displays 6 unique houseplants
- Each plant includes:
- Thumbnail image
- Name
- Price
- Add to Cart button
- Plants grouped into multiple categories
- Add to Cart button behavior:
- Adds plant to cart
- Increases cart count in header
- Becomes disabled after selection
- Displays:
- Total number of plants
- Total cost of items
- Each plant type shows:
- Thumbnail
- Name
- Unit price
- Quantity controls (increase / decrease)
- Delete button to remove plant from cart
- Checkout button (Coming Soon)
- Continue Shopping button linking back to products
- Visible on product listing and cart pages
- Displays shopping cart icon with live item count
- Navigation between Products and Cart pages
- React
- Redux Toolkit
- React Router
- Tailwind CSS
- Vite
src/
βββ app/
β βββ store.js
β
βββ features/
β βββ cart/
β βββ cartSlice.js
β
βββ data/
β βββ plants.js
β
βββ components/
β βββ Header.jsx
β βββ PlantCard.jsx
β
βββ pages/
β βββ Landing.jsx
β βββ Products.jsx
β βββ Cart.jsx
β
βββ App.jsx
βββ main.jsx
βββ index.css1οΈβ£ Clone the repository
git clone https://github.com/your-username/greenleaf.gitnpm install
npm run dev
The app will be available at:
-
Global state is managed using Redux Toolkit.
-
Cart State Includes:
-
C art items
-
Quantity per plant
-
Total number of items
-
Total cost
-
Redux Actions:
-
Add plant to cart
-
Increase quantity
-
Decrease quantity
-
Remove plant from cart
β Assignment Requirements Checklist
β Public GitHub repository
β Redux Toolkit used for global state
β Landing page with background image and CTA
β Product listing with categories
β Add-to-cart functionality
β Disabled add button after selection
β Header with live cart count
β Shopping cart with quantity controls
β Total price and total item calculation
β Navigation between all pages
Developer :
Waqas khanBuilt with React, Redux, and a love for plants πΏ
π License
This project was created for educational purposes as part of a peer-graded assignment.

