Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vickypandey14/user-roles-and-permissions-apis-in-node-js-mongodb

This project provides a straightforward implementation of user management functionalities, roles, and permissions using Node.js and MongoDB.
https://github.com/vickypandey14/user-roles-and-permissions-apis-in-node-js-mongodb

api express-js express-middleware express-validator expressjs javascript jwt-authentication mongodb mongoose nodejs

Last synced: about 2 months ago
JSON representation

This project provides a straightforward implementation of user management functionalities, roles, and permissions using Node.js and MongoDB.

Awesome Lists containing this project

README

        

# User Roles and Permissions APIs in Node.js & MongoDB

[![Tweet](https://img.shields.io/twitter/url?url=https%3A%2F%2Fgithub.com%2Fvickypandey14%2FUser-Roles-and-Permissions-APIs-in-Node-JS-MongoDB.git)](https://twitter.com/intent/tweet?text=Check%20out%20this%20User%20Roles%20and%20Permissions%20API%20project%20built%20with%20Node.js%20%26%20MongoDB%3A%20https%3A%2F%2Fgithub.com%2Fvickypandey14%2FUser-Roles-and-Permissions-APIs-in-Node-JS-MongoDB.git)

A simple repository for managing user roles and permissions through APIs using Node.js and MongoDB.

## Features

- **Role-based Authentication:** Implement secure authentication based on user roles, ensuring that users have appropriate access levels.
- **Permission Management:** Define and manage granular permissions to control user actions and access within the application.
- **User Management API Endpoints:** Explore a variety of API endpoints for effective user management, allowing operations such as user creation, deletion, and retrieval.
- **Post and Post Category:** A newly added feature includes post and post category management, expanding the functionality of the application.

## Getting Started

1. Clone the repository:

```bash
git clone https://github.com/vickypandey14/User-Roles-and-Permissions-APIs-in-Node-JS-MongoDB.git
```

2. Install dependencies:

```bash
cd User-Roles-and-Permissions-APIs-in-Node-JS-MongoDB
npm install
```

### Create an `.env` file:

Create an `.env` file based on the provided `.env.example`. This file should contain your sensitive information, such as database credentials and any other environment variables required. Ensure that the `.env` file is not committed to version control.

3. Set up your MongoDB database and configure the connection in the project. Ensure that the MongoDB server is running and accessible. Modify the configuration files for database connection and environment variables.

4. Run the application:

```bash
nodemon index
```

5. Explore the API endpoints and customize as needed.

## Contributing

Feel free to contribute to this project. Fork the repository, make your changes, and submit a pull request.