Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Admin Panel #5

Open
10 tasks
ArfatSalman opened this issue Mar 22, 2021 · 0 comments
Open
10 tasks

The Admin Panel #5

ArfatSalman opened this issue Mar 22, 2021 · 0 comments
Assignees

Comments

@ArfatSalman
Copy link

ArfatSalman commented Mar 22, 2021

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.

  • 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.

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants