Giter Club home page Giter Club logo

node-role-based-auth's Introduction

node-role-based-authorization-api

Node.js Role Based Authorization API

####Summary

The current PoC project aims to develop a working node backend based on a given set of business conditions

Entities users, groups. collections and items

Users can belong to multiple groups or be a global manager A group can link to multiple collections A collection can belong to a single group Items belong to a single collection

A global manager can:

  • CRUD all roles users
  • CRUD all groups, collections and items

A group manager can:

  • CRUD regular and manager roles only under current group
  • CRUD collections and items only under current group

####Requirement:

  • Build CRUD API for all 4 entities

  • All access, filtering and relation logic should be implemented as an Authorization layer by way of middlewares

  • The authorization layer should be generic

  • Absolute paths

  • Whenever a user gets updated an email should be sent to him (this should be in a service)

  • Patterns: modules, services, dependency injection, multi-tier architecture

  • Must run in serverless (serverless.framework) with offline and warmup plugins

  • When an email is changed both old and new emails should get notified

Documentation

No persistence system by design, only hardcoded initial data.

Getting started command
  • npm i && npm start
Serverless run command
  • serverless offline
Running API tests locally

To locally run the provided Postman collection against your backend, execute:

APIURL=http://localhost:4000/ ./run-api-tests.sh

For more details, see run-api-tests.sh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.