Skip to content

RBAC System: A robust Role-Based Access Control system built with NestJS for managing user permissions and access levels efficiently and securely. πŸ”

Notifications You must be signed in to change notification settings

faid-terence/Auth-x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RBAC Module with MongoDB and Social Authentication

This is a Nest.js project that implements a Role-Based Access Control (RBAC) module with MongoDB as the database. It also includes social authentication features for Facebook, Google, and GitHub.

Table of Contents

Features

  • RBAC: Implements a flexible role-based access control system to restrict access to routes and resources based on user roles and permissions.
  • MongoDB Integration: Utilizes MongoDB as the database for storing user data, roles, and permissions.
  • Social Authentication: Supports authentication via Facebook, Google, and GitHub OAuth providers.
  • JWT Authentication: Secures the application with JSON Web Tokens (JWT) for stateless authentication.
  • Role Management: Provides endpoints for creating, updating, and deleting roles and permissions.
  • User Management: Allows for creating, updating, and deleting user accounts, as well as assigning roles to users.

Prerequisites

Before running the application, ensure that you have the following software installed:

  • Node.js (version 12 or later)
  • MongoDB (version 4 or later)

Installation

  1. Clone the repository:
git clone https://github.com/your-repo/rbac-module.git
cd rbac-module
npm install

MONGODB_URI=mongodb://localhost:27017/rbac-module
FACEBOOK_APP_ID=your-facebook-app-id
FACEBOOK_APP_SECRET=your-facebook-app-secret
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret
JWT_SECRET=your-jwt-secret

npm run start:dev

This README file provides an overview of the project, its features, installation instructions, usage examples, contribution guidelines, and licensing information. You can customize it further to include any additional details or sections specific to your project.



src/
β”œβ”€β”€ auth/
β”‚   β”œβ”€β”€ auth.controller.ts
β”‚   β”œβ”€β”€ auth.module.ts
β”‚   β”œβ”€β”€ auth.service.ts
β”‚   β”œβ”€β”€ jwt.strategy.ts
β”‚   └── ...
β”œβ”€β”€ roles/
β”‚   β”œβ”€β”€ roles.controller.ts
β”‚   β”œβ”€β”€ roles.module.ts
β”‚   β”œβ”€β”€ roles.service.ts
β”‚   └── ...
β”œβ”€β”€ users/
β”‚   β”œβ”€β”€ users.controller.ts
β”‚   β”œβ”€β”€ users.module.ts
β”‚   β”œβ”€β”€ users.service.ts
β”‚   └── ...
β”œβ”€β”€ app.module.ts
β”œβ”€β”€ main.ts
└── ...


This README file covers the following sections:

- Features
- Prerequisites
- Installation
- Configuration
- Running the Application
- API Documentation
- Project Structure
- Contributing
- License

It provides detailed information about the project, its features, installation instructions, configuration settings, project structure, and contribution guidelines. You can further customize this README file based on your specific project requirements or add any additional sections as needed.


About

RBAC System: A robust Role-Based Access Control system built with NestJS for managing user permissions and access levels efficiently and securely. πŸ”

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published