Skip to content

Repository files navigation

πŸ›οΈ ShopNest e-commerce app



A full-featured, responsive e-commerce web application built from scratch with React, TypeScript, Redux Toolkit.


lastshop.1.mp4

πŸ”— Live Demo

https://esraamhmd.github.io/shopnest-E-commrce-website

πŸ“– Introduction

ShopNest is a complete front-end e-commerce application that delivers a full online shopping experience. Every feature β€” from browsing and searching products, to managing a cart and completing checkout β€” is fully implemented with real data, real validation, and real state management.

This project was built entirely from scratch with no UI libraries or component frameworks. Every button, card, form, modal, slider, and layout was hand-coded using React and custom CSS.

What makes ShopNest different from tutorial projects?

Typical Tutorial Project ShopNest
Fake or hardcoded product data βœ… Live data from DummyJSON REST API
No real search logic βœ… Smart client-side search with false-match prevention
Basic or no form validation βœ… Full per-field validation with real-time feedback
Simple state with useState only βœ… Redux Toolkit with 7 independent slices
Desktop only βœ… Fully responsive β€” mobile, tablet, and desktop
UI library such as Bootstrap βœ… 100% custom CSS β€” hand-written from scratch
No real icons βœ… Professional icons from Flaticon


✨ Features

πŸ” Smart Search

  • Searches product title, category, and brand at the same time
  • Short queries (1–2 characters) are precise β€” description is excluded to avoid false matches
  • Longer queries (3+ characters) search all fields including description and tags
  • Category dropdown to search within a specific department
  • Popular search tag cloud for fast discovery

πŸ—‚οΈ Category Browsing

  • Dropdown with 28 categories β€” opens directly below the search bar
  • Hover mega menus for Electronics, Fashion, Beauty, Kids, and Home
  • Each mega menu shows sub-categories and top brand chips
  • Category nav bar visible on every page
  • Each category click fetches real products from the API

πŸ›’ Shopping Cart

  • Add, remove, and update quantity for any product
  • Live subtotal, shipping fee, and total price
  • Free shipping applied automatically on orders over $50
  • Cart badge in the header updates in real time

❀️ Wishlist

  • Toggle favorites from any product card or product detail page
  • Dedicated wishlist page with all saved items
  • Add any wishlist item directly to cart with one click

πŸ“¦ Product Detail Page

  • Full image gallery with clickable thumbnail navigation
  • Customer reviews with star ratings and dates
  • Related products loaded from the same category
  • Stock availability: In Stock or Low Stock
  • Quantity selector before adding to cart

πŸ’³ Checkout and Payment

  • Shipping info: first name, last name, address, city, phone
  • Two payment methods: Credit/Debit Card or Cash on Delivery
  • Card number auto-formats with a space every 4 digits
  • Expiry date auto-formats as MM/YY
  • All fields validated before the order is submitted
  • Order success screen shown after confirmation

πŸ” Authentication

  • Login β€” validates email format and password length
  • Signup β€” first name, last name, email, password, confirm password
  • Live password strength meter: Weak, Medium, or Strong
  • Password match indicator shown in real time as you type
  • Terms and Conditions checkbox required to proceed
  • Every error appears next to its own field

πŸ“ Location Picker

  • Real OpenStreetMap embedded inside a modal
  • Choose from 15 delivery cities
  • Selected city updates the "Deliver to" label in the header via Redux

🎠 Hero Banner Slider

  • Auto-plays every 4.5 seconds through 3 slides
  • Manual previous and next arrows with dot indicators
  • Animated promo strip that cycles colors
  • Call-to-action button on each slide

πŸ”” Toast Notifications

  • A success alert appears every time a product is added to cart
  • Shows the product name and a "View Cart" shortcut button
  • Disappears automatically after 2.5 seconds

πŸ“± Fully Responsive Design

Screen Size What Changes
Larger than 1024px Full layout β€” mega menus, 4-column grid, all elements visible
768 to 1024px Mega menus hidden, 3-column grid, compact header
600 to 768px Search bar moves to second row, buttons show icons only, 2-column grid
400 to 600px Sidebar stacks above results, form fields stack vertically
Smaller than 400px Single column, logo text hidden, minimal interface

πŸš€ Tech Stack

βš›οΈ React

React is the core UI framework. The entire app is built as a tree of reusable components. Each page β€” Home, Search, Cart, Checkout, Login β€” is its own component. React hooks such as useState, useEffect, useRef, and useNavigate are used throughout for local state, side effects, DOM references, and navigation.

πŸ”· TypeScript

TypeScript adds static typing on top of JavaScript. Every component, Redux slice, and function has typed props and return values. This catches bugs before the app runs β€” for example, if a product price field is accidentally treated as a string, TypeScript throws an error immediately in the editor instead of failing silently at runtime.

🟣 Redux Toolkit

Redux Toolkit manages all global state β€” data that multiple components across different pages need to share. The cart, wishlist, user login status, selected city, and product list are all stored in Redux so any component can read or update them without passing props through many layers.

πŸ”΄ React Router DOM

Handles all navigation between pages without reloading the browser. Each URL maps to a different component. The browser address bar updates when navigating but the page never fully reloads β€” this is called client-side routing.

🟠 DummyJSON API

All product data is fetched live from dummyjson.com β€” a free public REST API with no authentication required. It provides 100 products across 28 categories, each with images, prices, ratings, reviews, and stock information.

πŸ—ΊοΈ OpenStreetMap

The delivery location picker uses a real embedded OpenStreetMap. It is completely free with no API key required.

🎨 Flaticon

All UI icons β€” search, cart, heart, user, location pin, arrow, trash, fire, phone, email, and more β€” come from Flaticon, the world's largest free icon library. Icons are downloaded as PNG files and imported directly into components.

πŸ–ŒοΈ Custom CSS

Every style in ShopNest was written by hand. No Bootstrap, no Tailwind, no Material UI β€” just pure CSS with flexbox, grid, media queries, transitions, and animations.


πŸ”„ Redux State Management

Slice What It Stores Actions
auth Login status, user name, user email login, logout
cart Cart items, total count, total price addToCart, removeFromCart, updateQuantity, clearCart
favorites Wishlist items, total count toggleFavorite, removeFromFavorites
products Product list, categories, fetch status fetchProducts, fetchProductsByCategory, fetchCategories
location Selected city, latitude, longitude setCity, setCoords
category Active category setActiveCategory
ads Promo banner visibility toggleAds

πŸ“‘ API Reference β€” DummyJSON

All product data is fetched live from DummyJSON β€” free, no API key, no sign-up needed.

Endpoint Returns
GET /products?limit=100 All 100 products with full details
GET /products/search?q=apple Products matching the search query
GET /products/category/beauty All products in a specific category
GET /products/category-list List of all available category slugs
GET /products/:id Single product with images, reviews, and stock info

πŸ“„ License

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


Built with ❀️ using React + TypeScript + Redux Toolkit


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages