Giter Club home page Giter Club logo

user-api's Introduction

Multi Tenant Role Based Access Control (RBAC) Authentication API

Sponsor

Thank you to Neon for sponsoring this video!

Features

  • Create an application

  • Register a user for an application

  • Login

  • Create a role

  • Assign a role to a user

  • Check user permissions with a guard

What are we using?

What you'll need

What you will learn

  • How to create a multi tenant application
  • How to create a role based access control system
  • Some basic relational database concepts
  • A nice and neat file structure for backend services
  • TypeScript
  • Fastify
  • RESTful API design
  • How to use Drizzle ORM

Data structure

Data flow

Video structure

  1. Setup the initial application
  2. Create a database with Neon
  3. Create database schemas
  4. Run migrations
  5. Register an application
  6. Register a user
  7. Login
  8. Create a role
  9. Assign a role to a user
  10. Check user permissions with a guard

Helpful files

  • CMD - Commands used in the video
  • api.json - Thunder Client collection

Tips

  • Infer the applicationId from the JWT where possible
  • Include the applicationId in queries

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.