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.
- 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.
Before running the application, ensure that you have the following software installed:
- Node.js (version 12 or later)
- MongoDB (version 4 or later)
- 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.