- Create the following APP: Products Routes WebApp using the Provided Boilerplate,
Note: Make sure you start json-server
on 8080
port with provided db.json
file, then only you will be able to see data on this website.
- Fork this repository https://github.com/riteshf/rct-101-e3.git
- Clone the Forked repository.
- Note: This Clone repository should be on your github account.
- navigate to the folder
cd rct-101-e3
- npm install
- npm start
- Make sure your
json-server
is running on port8080
,db.json
file is provided.
Note: Libraries are not installed, you need to install axios
and react-router-dom
yourself.
Note - Make sure you use only the given components and dont create new files and folders. Changing component name, structures might result in giving you zero marks.
- db.json
- Initial Products should be fetched using json-server only after user logs in.
- cartItems has following operations, accessible post login
- Add
- Delete
- Update Count
Note - Make sure you use only the given data and dont create new data. Changing data might result in giving you zero marks
/
:Home
is a protected route, accessible post login.- App should redirect to
/login
:Login
page as soon as he visits the/
: Home Url. - Post
Login
, user should be re-directed to/
: Home Page. - Only Post login User should fetch
/products
and/cartItems
and populate at required place. - Products
- User Should be able to Add Product to cart, if that product is not already existing in
/cartItems
.- Initial Count is 1
- Increment/Decrement Cart Item Count by Matching Product ID
- Remove Product from Cart only if Added.
- User Should be able to Add Product to cart, if that product is not already existing in
- Do not use Global CSS, instead use
<componentName>.module.css
convention for Css in that file. - Do Not Remove
data-cy="xxxx"
from anywhere, this are used by testing tools to test your code, removal of this will lead to low score. - Make sure you use only the given components and dont create new files and folders as chaging component name, structures might result in giving you zero marks
- Make sure you use only the given data and dont create new data, as chaging data might result in giving you zero marks.
Note - This might not be all the things, you are free to use other components.
- You need to Submit Github Link as well as netify link.
- Make sure you use masai github account provided by MasaiSchool(submit link to root folder of your repository on github).
- Make Sure you have netify account, else you will be getting zero marks as netify takes down your app in few days if your account does not exist.