- If you work alone follow the React task guideline
- If you work in a team follow the Work in a team guideline
Implement Products catalog following this design.
Use products
and product details
tо fetch data (use actual productId
as a last part of the URL before .json
).
Store the Cart in the localStorage
- Create
pages
,components
andhelpers
folders to structure your app - Use
scss
files per component - Use component names as BEM block names with all the other BEM rules applied
- Add a
Header
with links to all the pages- The
Logo
and theNav
are aligned left - The
Favorites
and theCart
are aligned right
- The
- Use
NavLink
s to highlight current page inHeader
- Add
Footer
- Footer content is limited the same width as the page content
- Add the link to the Github repo
- (*) Implement
Back to top
button
- Create
HomePage
available at/
with just a titleHome page
- Fetch products from API
- Each product has a
type
:phone
,tablet
oraccessory
price
is given beforediscount
discount
is give in percents%
age
is used to sort byNewest
id
is required to fetch product details
- Each product has a
- Create
ProductsSlider
component and use it inHot prices
block- Create
getHotPriceProducts
method fetching products with discount from API sorted by absolute discount value (not percentage given in API) - For now do all the filtering and sorting on client side
- Create
ProductCard
component to use it everywhere - Add ability to use
<
and>
buttons to scroll products
- Create
- Add
Brand new
block usingProductsSlider
- Create
getBrandNewProducts
method fetching products without a discount from the API starting from the most expensive
- Create
- Add
Shop by category
block with the links to/phones
,/tablets
and/accessories
. - Replace the
Home page
title with slider- User can change pictures with buttons infinitely
- (*) Swipe pictures every 5 seconds
- Create
PhonesPage
available at/phones
with just a titleMobile phones
- Create
getPhones
API call fetching the products with thetype
:phone
- Create
- Add
ProductsList
showing all thephones
- Implement a
Loader
to show it while waiting for the data from server - Add ability to sort the products by
age
(Newest
),name
(Alphabetically
) andprice
(Cheapest
)- (*) save sort order in the URL
?sort=age
and apply it after the page reload
- (*) save sort order in the URL
- Add
Pagination
andItems on page
with4
,8
,16
andall
options.- It should limit the products you show to the user
- Read the description for more detailed explanation
- Hide all the pagination elements if there are a few items (less than 1 smallest page size)
- (*) Save
?page=2&perPage=8
in the URL and apply them after the page reload
- Create
TabletsPage
page available at/tablets
working the same way asPhonesPage
- Create
getTablets
method fetching the products withtype
:tablet
- Create
- Create
AccessoriesPage
page available at/accessories
working the same way asPhonesPage
- Create
getAccessories
method fetching the products withtype
:accessory
- Implement
NoResults
component displayed if there are no products available
- Create
- Create
ProductDetailsPage
available at/product/:productId
ProductCard
should be a link to the details page
- Fetch phone details from API taking the
phoneId
from the URL- Use
Loader
when fetching the details
- Use
- Show the details on the page
- Hide
Available colors
andSelect capacity
for now About
section should contain just a description (without any subheaders)- Choose
Tech specs
you want to show
- Hide
- Add 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
working the same way as a BrowserBack
button - Add
Breadcrumbs
at the top- The last part is a plain text all the other ones are links
- Implement
CartPage
storing an array ofCartItems
- Each item should have
id
,quantity
and aproduct
- Each item should have
Add to cart
button inProductCart
should add a product to theCart
- If the product is already in the
Cart
the button should sayAdded to cart
- Implement
cart
helper storing the items in memory and having all the required methods. Later on it will interact with the API - Add ability to remove items from the
Cart
with ax
button - Add ability to change the quantity in the
Cart
with-
and+
buttons around the quantity - Total amount and quantity should be calculated automatically
Checkout
button should show the message that this functionality is not implemented yet- (*) Show the total quantity near the
Cart
icon in the header - (*) Save the
Cart
to thelocalSotrage
on each change and read it on page load
- Create
FavoritesPage
it should show theProductsList
with all the favorite products - Add ability to add/remove favorite products by pressing a hart
- (*) Show the favorites count near the
Favorites
icon in the header
- Add a
Search
component with an input into theHeader
to filter products - It should be shown only at
/phones
,/tablets
,/accessories
and/favorites
with an appropriate text - The
x
sign appears when the query is not empty and clears the search - It should work with pagination and sorting
- (*) Add
debounce
to the search field - (*) Save
Search
params in the URL usingqueryParams
(?query=moto
) and apply them on page load - (*) Implement
NoSearchResults
component and show it when there are no products matching the query
- Add
NotFoundPage
for all the other URLs with the link toHomePage
- Implement
Phone was not found
state for thePhoneDetailsPage
if there is no phone with a givenphoneId
on the server