Clone this repository and return your answer as zip-file containing all the relevant files (including .git, so that we can see your commit history). DO NOT fork this repo.
There's no single 'correct' answer for these assignments, but elegant solutions gain extra points. The point of this exercise is to prove that you can learn unknown and rather poorly documented codebase and allow you to demonstrate your JS skills.
In the backend
folder you can find a skeleton for a simple app. These assignments require you to modify and add code as needed. You should also add test cases when you think that's appropriate.
Make sure that users are stored in the database in a safe way. How would you store passwords? You can add 3rd party libraries and new properties to User model if needed.
How would you validate that user is logging in with the correct password? Implement the function checkPassword
according to specification in the User model code.
Creating users with existing username should result to error Username xx is already taken
.
When listing users with
GET /users
GET /users/:id
Make sure passwords (and other non-public properties) are not sent. Hint: check serverbone codebase.
Make a simple frontend app: 'admin' GUI for the previously built backend using BackboneJS or React or both. With the app, you should be able to create new users and list created users.
You may use additional 3rd party libs too if you like. Make sure to write tests also for the frontend!