Implement the catalog with a shopping cart and favorites page according to one of the next designs:
You may also implement color theme switching!
Follow the Work in a team guideline
Follow the Instruction to setup your project, add Eslint, Prettier, Husky and enable auto deploy.
Use the data from /public/api and images from /public/img folders. You can reorganize them the way you like.
- Put components into the
src/componentsfolder.- Each component should be a folder with
index.ts,ComponentName.tsx,ComponentName.module.scssfiles. - Use CSS modules.
- Keep
.module.scssfiles together with their components.
- Each component should be a folder with
- Advanced project structure:
src/modulesfolder. Inside per page modulesHomePage,CartPage, etc., andsharedfolder with shared content between modules.- Inside each module its own
componentsfolder with the structure described above. And optionally other files/folders:hooks,constants, and so on.
- Add the sticky header with a logo, navigation, favorites, and cart.
- The footer with the link to the GitHub repo and
Back to topbutton.- The content should be limited to the same width as the page content;
Back to topbutton should scroll to the top smoothly;
- Add
NotFoundPagecontaining textPage not foundfor all the unknown URLs. - All changes the hover effects should be smooth.
- Scale all image links by 10% on hover.
- Implement all form elements and icons according to the UI Kit.
Implement Home page at available at /.
<h1>Product Catalog</h1>should be visually hidden.PicturesSlider:- Find your own images to personalize the App;
- Change pictures automatically every 5 seconds;
- The next buttons should show the first image after the last one;
- Dashes at the bottom should allow choosing an exact picture.
ProductsSliderfor theHot pricesblock:- The products with a discount starting from the biggest absolute value;
<and>buttons should scroll products.
Shop by categoryblock with links to/phones,/tablets, and/accessories.- Add Brand new block using ProductsSlider with products that are the newest according to the year field.
There should be 3 separate pages /phones, /tablets, and /accessories.
- Each page loads the data of the required
type. - Add an
h1withPhones/Tablets/Accessories page(choose required). - Add
ProductsListcomponent showing all theproducts. - Implement a
Loaderto show it while waiting for the data from the server. - In case of a loading error show the something went wrong message with a reload button.
- If there are no products available show the
There are no phones/tablets/accessories yetmessage (choose required). - Add a
<select>with theNewest,Alphabetically, andCheapestoptions to sort products byage,title, orprice(after discount).- Save the sort value in the URL
?sort=ageand apply it after the page reload.
- Save the sort value in the URL
- Add
Paginationbuttons andItems on pageselect element with4,8,16, andalloptions.- It should limit the products you show to the user;
- Save pagination params in the URL
?page=2&perPage=8(page=1andperPage=allare the default values and should not be added to the URL; - Hide pagination elements if they do not make sense;
- You can use the logic explained in the React Pagination task.
Create ProductDetailsPage available at /product/:productId.
ProductCardimage and title should be links to the product details page.- Use
Loaderwhen fetching the product details. - Show the details on the page:
- Display the available colors from colorsAvailable and the capacities from capacityAvailable as radio inputs, allowing the selection of one value from the offered options;
Aboutsection should contain a subheader with description;- Choose
Tech specsyou want to show.
- Add the ability to choose a picture.
- Implement
You may also likeblock with products chosen randomly:- Create
getSuggestedProductsmethod fetching the suggested products.
- Create
- Add
Backbutton working the same way as a BrowserBackbutton. - Add
Breadcrumbsat the top with:- A Home page link;
- A category page link (
Phones,Tablets,Accessories); - The name of the product (just a text).
- Show
Product was not foundif there is no product with a given id on the server.
Create a Cart page with a list of CartItems at /cart.
Each item should have an id, quantity, and a product.
Use React Context or Redux to store Items.
Add to cartbutton in theProductCardshould add a product to theCart.- If the product is already in the
Cartthe button should sayAdded to cartand do nothing. - Add the ability to remove items from the
Cartwith anxbutton next to aCartItem. - Add a message
Your cart is emptywhen there are no products in theCart. - Add the ability to change the item quantity in the
Cartwith-and+buttons (it should be > 0). - Total amount and quantity should be calculated automatically.
- Show the quantity at the
Carticon in the header. - Save the
CarttolocalStorageon each change and read it on page load. Checkoutbutton should show a modal dialog with the textCheckout is not implemented yet. Do you want to clear the Cart?:- Clear the Cart if the user confirms the order;
- Keep the Cart items and close the confirmation on cancel;
- Use the
confirmfunction if you don't have a better solution.
Create Favorites page with a ProductsList showing favorite products at /favorites.
- Add/remove a product to favorites by pressing a heart button in the
ProductCardelement. - The heart should be highlighted if the product is already added to the favorites.
- Use React Context or Redux to store the favorites.
- Show the number of favorites at the
Favoritesicon in the header. - Save favorites to
localStorageon each change and load them on page load.
- Add
NotFoundPagecontaining textPage not foundfor all the other URLs with the link toHomePage. - Implement the
Product was not foundstate for theProductDetailsPage.
- Implement color theme switching!
- Use skeletons to make loading more natural.
- Add the ability to change page language.
Show input:search in the header when a page contains a ProductList to search in.
- Save the
Searchvalue in the URL as a?query=valueto apply on page load. - Show
There are no phones/tablets/accessories/products matching the queryinstead ofProductListwhen needed. - Add
debounceto the search field.