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/components
folder.- Each component should be a folder with
index.ts
,ComponentName.tsx
,ComponentName.module.scss
files. - Use CSS modules.
- Keep
.module.scss
files together with their components.
- Each component should be a folder with
- Advanced project structure:
src/modules
folder. Inside per page modulesHomePage
,CartPage
, etc., andshared
folder with shared content between modules.- Inside each module its own
components
folder 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 top
button.- The content should be limited to the same width as the page content;
Back to top
button should scroll to the top smoothly;
- Add
NotFoundPage
containing textPage not found
for 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.
ProductsSlider
for theHot prices
block:- The products with a discount starting from the biggest absolute value;
<
and>
buttons should scroll products.
Shop by category
block 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
h1
withPhones/Tablets/Accessories page
(choose required). - Add
ProductsList
component showing all theproducts
. - Implement a
Loader
to 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 yet
message (choose required). - Add a
<select>
with theNewest
,Alphabetically
, andCheapest
options to sort products byage
,title
, orprice
(after discount).- Save the sort value in the URL
?sort=age
and apply it after the page reload.
- Save the sort value in the URL
- Add
Pagination
buttons andItems on page
select element with4
,8
,16
, andall
options.- It should limit the products you show to the user;
- Save pagination params in the URL
?page=2&perPage=8
(page=1
andperPage=all
are 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
.
ProductCard
image and title should be links to the product details page.- Use
Loader
when 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;
About
section should contain just a description (without any subheaders);- Choose
Tech specs
you want to show.
- Add the ability to choose a picture.
- Implement
You may also like
block with products chosen randomly:- Create
getSuggestedProducts
method fetching the suggested products.
- Create
- Add
Back
button working the same way as a BrowserBack
button. - Add
Breadcrumbs
at 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 found
if there is no product with a given id on the server.
Create a Cart page with a list of CartItem
s at /cart
.
Each item should have an id
, quantity
, and a product
.
Use React Context or Redux to store Items.
Add to cart
button in theProductCard
should add a product to theCart
.- If the product is already in the
Cart
the button should sayAdded to cart
and do nothing. - Add the ability to remove items from the
Cart
with anx
button next to aCartItem
. - Add a message
Your cart is empty
when there are no products in theCart
. - Add the ability to change the item quantity in the
Cart
with-
and+
buttons (it should be > 0). - Total amount and quantity should be calculated automatically.
- Show the quantity at the
Cart
icon in the header. - Save the
Cart
tolocalStorage
on each change and read it on page load. Checkout
button 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
confirm
function 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
ProductCard
element. - 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
Favorites
icon in the header. - Save favorites to
localStorage
on each change and load them on page load.
- Add
NotFoundPage
containing textPage not found
for all the other URLs with the link toHomePage
. - Implement the
Product was not found
state 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
Search
value in the URL as a?query=value
to apply on page load. - Show
There are no phones/tablets/accessories/products matching the query
instead ofProductList
when needed. - Add
debounce
to the search field.