Skip to content

adrianeanin/react-shopping-cart

Repository files navigation

React Shopping Cart

This project is a React application built with Vite. It utilizes the React Router for navigation, and state management is handled using the context API.

Features

  • Home Page: Shows project landing page
  • Shop Page: Displays a list of products retrieved from the productData json file.
  • Product Detail Page: Displays detailed information about a specific product and buttons for add to cart and quantity increase.
  • Error Page: Shown when there's a routing error.
  • Image Optimization: Image optimization with the ViteImagemin plugin and lazy loading.

Prerequisites

Make sure you have Node.js installed on your machine.

Installation

  1. Clone the repository
  2. npm install
  3. npm run dev

Testing

Testing is done using Vitest. Run the tests with the following command: npm run test.

Technologies Used

  • React
  • React Router
  • Context API
  • Vitest
  • Vite (build)
  • Vercel (deployment)