This is an e-commerce site where you can view a list of products, filter them, view product details and add items to the cart.
The project is divided into two main parts:
- Backend: Manages the APIs for product listing, details and cart management.
- Frontend: User interface built with React to interact with the backend and display products.
The backend uses the DummyJSON API to fetch product data. The API provides product lists, details, and filtering options.
To start the backend, follow these steps:
-
Navigate to the backend directory:
cd backend
-
Install the required dependencies:
npm install
-
Start the backend server:
npm start
-
The backend server will be available at
http://localhost:5001
.
To start the frontend, follow these steps:
-
Navigate to the frontend directory:
cd frontend
-
Install the required dependencies:
npm install
-
Start the React application:
npm start
-
The frontend will be available at
http://localhost:3000
.
To run backend tests:
-
Navigate to the backend directory:
cd backend
-
Run the tests:
npm test
To run frontend tests:
-
Navigate to the frontend directory:
cd frontend
-
Run the tests:
npm test