Skip to content

Instantly share code, notes, and snippets.

@boobo94
Last active August 1, 2018 15:12
Show Gist options
  • Save boobo94/8616e84eed97a20c7ed38715fc7f8dcd to your computer and use it in GitHub Desktop.
Save boobo94/8616e84eed97a20c7ed38715fc7f8dcd to your computer and use it in GitHub Desktop.
Backend exercise for interview

Hi,

We have a simple exercise for you. You have to create few endpoints for a project manager tool. Firstly we have two types of users: regular users and admins.

What a regular user can do:

  • register (username, email, password, first name, last name)

  • login (username, password)

  • see details about his profile (username, email, first name, last name), just if he it's logged in, and he must only be able to view HIS profile

    What an admin can do:

  • login (username, password)

  • see all users available with (username, email, first name, last name)

  • add a project (name, company name)

    What everyone can do:

  • see all the projects available inside the platform

Note:

  • You do not need to have a database for this, you can simply store the data inside an object in memory (it will be reset on restart). You could also store the object in a file if you want.
  • You should probably have a predefined admin user (since they cannot directly register from the API).
  • You can use any authentication method you want: JWT, cookies etc.

Please before to sent the exercise to validate if the user have permission to make that request to the web-service, for example an user cannot add a project or see the details about other users. Fell free to create a github repository and upload the code there, if you prefer other git provider, feel free to use it, but please give us access to see the code.

Feel free to choose your technologies. But you can take a look on references links. Make as much possible as you can from this exercise. Feel free to add new stuff if you want (not mandatory).

Optional: Type down few words about how did you structured the project and why.

Resources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment