Interview Task: Implementing a Role-Based Access Control (RBAC) system using Node.js and React

Objective

The goal of this task is to assess your understanding of Node.js, React, and your ability to implement a simple Role-Based Access Control (RBAC) system using Auth0 or a similar authentication provider. You will create a Node.js backend with a very basic React interface to manage users and their permissions.

User Types

There will be two types of users: admin and regular.

  • The admin type will have read and write permissions to all the server resources.
  • The regular type will only have read permissions to all the server resources.

Task Description

Create a resource of your choice on the API side and its CRUD operations, and protect it using an RBAC implementation.

In the final solution, you should be able to sign in using an admin type account and be able to add, update, and delete the API resource, as well as sign in using a regular type account and only be allowed to see the resource.

Deliverables

  1. A Node.js RESTful API project folder with all source code, dependencies, and documentation.
  2. A React frontend project folder with all source code, dependencies, and documentation.
  3. A written explanation of your implementation choices and any challenges you faced during the development process.

Evaluation Criteria

Your solution will be evaluated based on the following criteria:

  1. Code quality, organization, and readability.
  2. Adherence to best practices for Node.js and React.
  3. The effectiveness of the implemented RBAC system.
  4. Completeness and clarity of documentation.
  5. The thoroughness of your test cases (bonus points).
  6. The quality of your explanation of the implementation choices and your ability to identify potential challenges and solutions.

Instructions

  1. Create a personal Github / Gitlab / Bitbucket repo, add this README.md file to it.
  2. Complete the task as described in the Objective and Task Description sections and commit your code.
  3. Submit your repo link here: https://blinkin.typeform.com/to/bDKt3BTq
  4. We will review your solution and provide feedback.

Notes

You have free choice in terms of what to use and how, apart from the mentioned technologies. Docker is also fine; we leave the implementation to you.

Good luck!