Skip to content

Madhuri243/RBAC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RBAC

This is a Role-Based Access Control (RBAC) application built using Node.js, Express, and Passport.js. This app provides authentication and authorization functionality and can be used as a starting point for any project requiring user authentication.

Currently, the application supports Email and Password authentication, but it can easily be extended to support OAuth providers like Google, Facebook, Apple, GitHub, etc.

Mongoose is used as an Object-Relational Mapping (ORM) tool for interacting with a MongoDB database to store user information.

Passport.js handles local email/password authentication.

The application is almost production-ready, and here’s how you can set it up: Step 1: Clone the Repository bash Copy code git clone https://github.com/Madhuri243/RBAC Step 2: Install Dependencies Navigate to the cloned repository and install all required dependencies:

cd RBAC npm install Step 3: Configure Environment Variables Create a .env file in the root of your project and add the following configuration variables:

PORT=3000 MONGODB_URI=YOUR_MONGODB_URI # Example: mongodb://localhost:27017 DB_NAME=YOUR_DB_NAME Replace YOUR_MONGODB_URI with your actual MongoDB connection URI and YOUR_DB_NAME with the name of your database.

Step 4: Install MongoDB (For Linux Ubuntu) Follow the official MongoDB installation guide to install MongoDB on your machine:

MongoDB Installation Guide

Step 5: Start MongoDB Daemon Once MongoDB is installed, start the MongoDB service with the following command:

sudo service mongod start Step 6: Start the Application Now, you can start the application using:

npm run dev This will start the application on the specified PORT (default is 3000).

You now have a running Role-Based Access Control (RBAC) application that is ready for further customization or deployment!

Feel free to extend the authentication functionality by adding OAuth providers like Google, Facebook, Apple, and GitHub for user sign-in, or tailor the app to your project's needs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published