Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/basantech89/users-dilemma
https://github.com/basantech89/users-dilemma
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/basantech89/users-dilemma
- Owner: basantech89
- Created: 2020-02-06T14:51:09.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T06:37:02.000Z (about 2 years ago)
- Last Synced: 2023-03-08T05:16:29.415Z (almost 2 years ago)
- Language: JavaScript
- Size: 2.51 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 47
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Take Home Project - 2: Users-Dilemma ##
`Problem Statement`
There are 4 users in a system with different roles. One user can only be assigned one role. The login IDs and passwords of the users who have been assigned these roles have been stored locally. We need to authenticate when any user tries to login and accordingly grant/deny access.The task would be to build the following APIs (in Node.js) which are required to achieve this objective:
1. Signup - Passwords should be randomly generated at the time of signup.
2. Login
3. One sample API for each user rolePlease note that the system should be horizontally scalable.`Solution`
Tech-Stack: React, Express Server, MongoDB, Mongoose, Passport, Jsonwebtoken
Users can have 4 type of roles: unauthorized, basic, creator, admin
unauthorized users have get access to all the movies
basic users have get access to all content and post/put/delete on movie comments
creators can get/post/put/delete all the movies
admins have access to everything except basic users's private data
only basic users can be created with UI, to create other users with other roles, mongo repl has to be used