This project is an SPA developed with React and React Router, facilitating product browsing, details viewing, and shopping cart management via the Fake Store API. With concise component design and efficient routing, it provides users a seamless experience for exploring and purchasing products.
- React
- React Router
- Tailwind CSS (for styling)
- Utilized Axios to fetch product data from the provided API endpoint.
- Created components to display products in a grid format.
- Each product component includes relevant information such as name, price, and image.
- Implemented infinite scrolling to load products dynamically as the user scrolls.
- Enhanced user experience and performance for large product catalogs.
- Developed a separate product details page/component to display comprehensive information about each product.
- Includes details like description, specifications, and reviews.
- Implemented a shopping cart component that allows users to add and remove products.
- Utilized React state management to maintain the cart state across components.
- Implemented a search component that enables users to search for products by name or description.
- Product list filters dynamically based on the search query entered by the user.
To run the this project locally, follow these steps:
- Clone the repository:
git clone https://github.com/bsrakts/adolfha-ecommerce.git
- Change to the project directory:
cd FakeStore-Project
- Install the dependencies:
npm install
- To start the development server and run the project, execute the following command:
npm start
This will start the application on your local machine, and you can access it in your web browser at http://localhost:3000.
public/
├── index.html
├── manifest.json
└── robots.txt
src/
├── components/
│ ├── Cart.js
│ ├── Item.js
│ ├── LoadingScreen.js
│ └── Navbar.jsx
├── helpers/
│ └── apiClient.js
├── pages/
│ ├── Details.jsx
│ ├── Home.jsx
├── App.css
├── App.js
├── App.test.js
├── index.css
├── index.js
├── logo.svg
├── reportWebVitals.js
└── setupTests.js
This project relies on the following dependencies:
- React: A JavaScript library for building user interfaces.
- React Router DOM: A library for routing in React applications.
- FakeStoreAPI: A mock API used to fetch product data.