Skip to content

πŸ›οΈ Modern e-commerce platform built with React, TypeScript, Redux Toolkit & TailwindCSS. Features cart, wishlist, checkout & responsive design.

Notifications You must be signed in to change notification settings

MuhammadSohaib-pro/shopease

Repository files navigation

πŸ›οΈ ShopEase - Modern E-Commerce Platform

A feature-rich, responsive e-commerce web application built with React, TypeScript, and Redux Toolkit. ShopEase provides a seamless shopping experience with modern UI/UX design and comprehensive e-commerce functionality.

React TypeScript Redux Vite TailwindCSS

✨ Features

πŸ›’ Shopping Experience

  • Product Catalog: Browse through a wide range of products with detailed information
  • Advanced Filtering: Filter products by category, price, and ratings
  • Smart Search: Real-time product search with debouncing for optimal performance
  • Product Details: Comprehensive product pages with images, descriptions, and ratings
  • Related Products: Intelligent product recommendations

🎯 User Features

  • Shopping Cart: Add, remove, and update product quantities
  • Cart Drawer: Quick access to cart with slide-out panel
  • Wishlist: Save favorite products for later
  • Order Management: Track order history and status
  • Guest Checkout: Shop without account creation

🎨 UI/UX

  • Responsive Design: Seamless experience across all devices
  • Dark Mode Support: Eye-friendly dark theme
  • Loading Skeletons: Smooth loading states for better UX
  • Toast Notifications: Real-time feedback for user actions
  • Breadcrumb Navigation: Easy navigation through product categories
  • Empty States: User-friendly messages for empty carts/wishlists

πŸ”§ Technical Features

  • State Management: Redux Toolkit for predictable state management
  • Persistent Storage: LocalStorage integration for cart, wishlist, and orders
  • Async Operations: Redux Thunk for API calls
  • Type Safety: Full TypeScript implementation
  • Code Splitting: Optimized bundle size
  • API Integration: RESTful API integration with Axios

πŸš€ Demo

Live Demo

View Live Demo

Screenshots

Home Page

Home Page

Product Listing

Product Listing

Shopping Cart

Shopping Cart

Checkout

Checkout

πŸ› οΈ Tech Stack

Frontend

  • React 18.3.1 - UI library
  • TypeScript 5.6.2 - Type safety
  • Vite 6.0.5 - Build tool and dev server
  • Redux Toolkit 2.5.0 - State management
  • React Router DOM 7.1.1 - Routing

Styling

  • TailwindCSS 3.4.17 - Utility-first CSS framework
  • shadcn/ui - Reusable component library
  • Lucide React - Beautiful icons

API

  • Axios 1.7.9 - HTTP client
  • FakeStore API - Product data

πŸ“¦ Project Structure

shopease/
β”œβ”€β”€ public/                 # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/            # Images, CSS, and other assets
β”‚   β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── img/
β”‚   β”œβ”€β”€ components/        # Reusable components
β”‚   β”‚   β”œβ”€β”€ cart/          # Cart-related components
β”‚   β”‚   β”œβ”€β”€ checkout/      # Checkout components
β”‚   β”‚   β”œβ”€β”€ common/        # Shared components
β”‚   β”‚   β”œβ”€β”€ footer/        # Footer component
β”‚   β”‚   β”œβ”€β”€ header/        # Header and navigation
β”‚   β”‚   β”œβ”€β”€ home/          # Home page sections
β”‚   β”‚   β”œβ”€β”€ product/       # Product components
β”‚   β”‚   β”œβ”€β”€ product_detail/# Product detail components
β”‚   β”‚   β”œβ”€β”€ profile/       # User profile components
β”‚   β”‚   └── ui/            # UI library components
β”‚   β”œβ”€β”€ layout/            # Layout wrappers
β”‚   β”‚   └── Main.tsx
β”‚   β”œβ”€β”€ lib/               # Utility functions
β”‚   β”‚   └── utils.ts
β”‚   β”œβ”€β”€ routes/            # Route configurations
β”‚   β”‚   └── index.ts
β”‚   β”œβ”€β”€ store/             # Redux store
β”‚   β”‚   β”œβ”€β”€ cart/          # Cart slice and logic
β”‚   β”‚   β”œβ”€β”€ order/         # Order management
β”‚   β”‚   β”œβ”€β”€ products/      # Product data and thunks
β”‚   β”‚   β”œβ”€β”€ wishlist/      # Wishlist functionality
β”‚   β”‚   └── store.ts       # Store configuration
β”‚   β”œβ”€β”€ utils/             # Helper utilities
β”‚   β”‚   └── axios.ts       # API configuration
β”‚   β”œβ”€β”€ views/             # Page components
β”‚   β”‚   β”œβ”€β”€ cart/          # Cart page
β”‚   β”‚   β”œβ”€β”€ checkout/      # Checkout page
β”‚   β”‚   β”œβ”€β”€ home/          # Home page
β”‚   β”‚   β”œβ”€β”€ not_found/     # 404 page
β”‚   β”‚   β”œβ”€β”€ order_success/ # Order confirmation
β”‚   β”‚   β”œβ”€β”€ product/       # Products listing
β”‚   β”‚   β”œβ”€β”€ product_detail/# Product details
β”‚   β”‚   β”œβ”€β”€ profile/       # User profile
β”‚   β”‚   └── wishlist/      # Wishlist page
β”‚   β”œβ”€β”€ App.tsx            # Main app component
β”‚   └── main.tsx           # Application entry point
β”œβ”€β”€ .env                   # Environment variables
β”œβ”€β”€ index.html             # HTML template
β”œβ”€β”€ package.json           # Dependencies
β”œβ”€β”€ tailwind.config.js     # Tailwind configuration
β”œβ”€β”€ tsconfig.json          # TypeScript configuration
β”œβ”€β”€ vite.config.ts         # Vite configuration
└── README.md              # Project documentation

πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v18 or higher)
  • npm or yarn

Installation

  1. Clone the repository

    git clone https://github.com/MuhammadSohaib-pro/shopease
    cd shopease
  2. Install dependencies

    npm install
    # or
    yarn install
  3. Create environment file

    Create a .env file in the root directory:

    VITE_BASE_URL=https://fakestoreapi.com
  4. Start the development server

    npm run dev
    # or
    yarn dev
  5. Open your browser

    Navigate to http://localhost:5173

πŸ“ Available Scripts

Script Description
npm run dev Start development server
npm run build Build for production
npm run preview Preview production build

πŸ”‘ Key Features Explained

State Management

The application uses Redux Toolkit with the following slices:

  • Products Slice: Manages product data, categories, and selected product
  • Cart Slice: Handles cart items and drawer visibility
  • Wishlist Slice: Manages user's favorite products
  • Order Slice: Tracks order history

LocalStorage Persistence

Data is automatically persisted to localStorage:

  • Cart items (shopease_cart)
  • Wishlist items (shopease_wishlist)
  • Order history (shopease_order)

API Integration

All API calls are handled through Redux Thunks:

// Example: Fetching products
dispatch(fetchProducts());

Available thunks:

  • fetchProducts() - Get all products
  • fetchCategories() - Get product categories
  • fetchProductById(id) - Get single product
  • fetchProductsByCategory(category) - Get products by category

🎨 Customization

Components

All UI components are in src/components/ui/ and can be customized using Tailwind classes.

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Coding Standards

  • Use TypeScript for all new files
  • Follow the existing folder structure
  • Write meaningful commit messages
  • Add comments for complex logic
  • Test your changes before committing

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Your Name

πŸ“ž Support

If you have any questions or need help, please:

  • Open an issue on GitHub
  • Contact me via email

Made with ❀️ by Muhammad Sohaib

⭐ Star this repo if you find it helpful!

About

πŸ›οΈ Modern e-commerce platform built with React, TypeScript, Redux Toolkit & TailwindCSS. Features cart, wishlist, checkout & responsive design.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages