This is a React project built using Vite and TypeScript, implementing a Shopping Cart Application with various features such as User Authentication, Product Fetching, Searching, Adding to Cart, and more.
- Login Process: Implements a login process using the Dummy JSON Authentication API.
- Token Authorization: Saves the login token for authorization purposes.
- Protected Home Page: The home page is a protected route, allowing only logged-in users.
- Product Fetching: Fetches products from the Dummy JSON Products API.
- Product Search: Allows users to search for products based on their name.
- Cart Functionality: Implements a cart feature where users can add products, remove products, and view the total amount of the cart.
- Add to Cart Button: Provides an "Add to Cart" button on product cards for easy adding of products to the cart.
-
Clone the project from the GitHub repository:
git clone https://github.com/Pruthvik007/shopping-cart-assignment.git
-
Change directory to the project folder:
cd shopping-cart-assignment
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Visit localhost:5173 in your browser to view the application.
- Upon visiting the application, click the "Sign In" button to log in.
- Products are Paginated, allowing you to navigate through different pages.
- Use the Search Functionality to find specific products by their name.
- Add products to the cart using the "Add to Cart" button on product cards.
- The Cart Icon displays the total number of items in the Cart and the Total Amount.
- You can Remove items from the Cart as well.