Create an e-commerce website with basic functionalities such as displaying products on the homepage, showing detailed information about each product, and allowing users to add items to their cart.
- Fetch data from the FakeStoreAPI to display a list of products on the homepage.
- Display essential information for each product (e.g., image, title, price).
- Each product should be clickable, leading to its details page.
- Upon clicking a product on the homepage, navigate to a details page for that product.
- Fetch detailed information about the selected product from the API (e.g., description, category).
- Display all relevant details about the product.
- Implement a cart feature that allows users to add products to their cart.
- Provide buttons or actions on both the homepage and the details page to add items to the cart.
- Display the current contents of the cart, including product names, quantities, and total price.
- Allow users to remove items from the cart or adjust quantities as needed.
- Compose your code independently rather than relying on AI or code from others.
- Use React.js for the frontend development.
- Utilize React Router for navigation between different pages.
- Design the website to be responsive and user-friendly.
- Implement error handling for API requests and edge cases (e.g., empty responses).
- Write clean, well-documented code with proper comments.
- Utilize modern best practices and consider code scalability and maintainability.
- FakeStoreAPI Documentation: FakeStoreAPI Documentation