An e-commerce sneakers store built with React, Vite, React Router, Context API, and Tailwind CSS. Product data is served using JSON Server.
- Product listing with images, sizes, and colors
- Product details page with selectable size, color, and quantity
- Add to cart with unique cart item handling
- Cart page with quantity adjustment and removal
- Persistent global state using React Context
- Responsive navbar and popup notifications
- Modern UI with Tailwind CSS
npm installnpm run devnpm run serverThis runs JSON Server at http://localhost:8000/products using public/data/products.json.
Visit http://localhost:5173 in your browser.
src/- React source codecomponents/- Reusable UI components (Navbar, Button, Popup, ProductDetails, etc.)pages/- Main pages (Homepage, ProductDetails, Cart, PageNotFound)contexts/- React Context for global state (StoreContext)
public/data/products.json- Product data for JSON Serverpublic/images/- Product images
npm run dev- Start Vite dev servernpm run server- Start JSON Server for productsnpm run build- Build for productionnpm run lint- Lint code
- React 19
- Vite
- React Router DOM 7
- Tailwind CSS
- JSON Server
- Context API
Author: mb-basir