You should render an admin page with these operations (for now). The admin panel doesn't require any strict design or designing. However, the form fields, buttons and the layout should be centered and not be placed haphazardly on the page. Feel free to use bootstrap or other CSS/JS utilities.
Admin Authorization: As soon as someone comes onto your backend URL, he/she should be prompted to login as an admin (as WordPress applications do). In your backend, you are going to have a list of admins. The way to do this is numerous and you can choose one of the many methods. For e.g. you can have a property on the user role which can tell what's the role of a user. In our case, since there will only be one role (i.e of the admin), you can also have a separate list of admins. An non-admin should be not be able to access or modify any resource in the backend.
[ ] Admin Authorization
[ ] Products (CRUD operations)
[ ] Add a product
This should take all the details of a product and save it in the DB.
[ ] Update a product (using a unique ID)
[ ] See the product (using a unique ID)
[ ] Delete a product (using a unique ID)
[ ] List all products (with IDs)
[ ] Write tests for them
[ ] Seed your DB using actual products from Amazon, Flipkart etc. Use S3 for your
[ ] Integrate this API in your frontend.
Note: If you've been using the fakestoreapi, you can use fakestoreapi in your backend as well. That is, an approach like this should be feasible.
For a particular product / category / cart system, search in your DB first and if you do not find enough product, get products from fakestoreapi.
Restrictions
Ensure that you are not using React to render the backend pages. You have to use a template engine. It is recommend that you use EJS template engine as it is very popular and has great support. Though, you may use something else as well.
@ArfatSalman what would be best way to do the internationalisation for product detail page? I am thinking of adding two records for 1 product in DB, 1 for English and 1 for Spanish.
Instructions
You should render an admin page with these operations (for now). The admin panel doesn't require any strict design or designing. However, the form fields, buttons and the layout should be centered and not be placed haphazardly on the page. Feel free to use bootstrap or other CSS/JS utilities.
Admin Authorization: As soon as someone comes onto your backend URL, he/she should be prompted to login as an admin (as WordPress applications do). In your backend, you are going to have a list of admins. The way to do this is numerous and you can choose one of the many methods. For e.g. you can have a property on the user
role
which can tell what's the role of a user. In our case, since there will only be one role (i.e of the admin), you can also have a separate list of admins. An non-admin should be not be able to access or modify any resource in the backend.Note: If you've been using the fakestoreapi, you can use fakestoreapi in your backend as well. That is, an approach like this should be feasible.
Restrictions
Ensure that you are not using React to render the backend pages. You have to use a template engine. It is recommend that you use EJS template engine as it is very popular and has great support. Though, you may use something else as well.
Resources