Skip to content

GreenLeaf 🌱-> is a responsive React + Redux Toolkit e-commerce app for houseplants. Explore, add to cart, and manage your plant collection with a modern UI. @IBM , @coursera

Notifications You must be signed in to change notification settings

Waqas-Khan-CodeCanvas/e-plantShopping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌱 GreenLeaf β€” Houseplant Store

React Redux Toolkit Tailwind CSS Vite Status

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.


🌟 Project Overview

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

✨ Features

🏠 Landing Page

  • Full-screen hero section with background image
  • Company name and short description
  • β€œGet Started” button linking to the product listing page

πŸͺ΄ 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

πŸ›’ Shopping Cart Page

  • 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

🧭 Header Navigation

  • Visible on product listing and cart pages
  • Displays shopping cart icon with live item count
  • Navigation between Products and Cart pages

πŸ› οΈ Tech Stack

  • React
  • Redux Toolkit
  • React Router
  • Tailwind CSS
  • Vite

πŸ“ Project Structure

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.css

πŸš€ Getting Started

1️⃣ Clone the repository

git clone https://github.com/your-username/greenleaf.git

2️⃣ Install dependencies

npm install

3️⃣ Start the development server

npm run dev

The app will be available at:

http://localhost:5173

πŸ§ͺ Redux State Management

  • 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

πŸ“Έ Screenshots

πŸͺ΄ Product Listing alt text

πŸ›’ Shopping Cart alt text

βœ… 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 khan Built with React, Redux, and a love for plants 🌿

πŸ“„ License

This project was created for educational purposes as part of a peer-graded assignment.

Releases

No releases published

Packages

No packages published