A RESTful API for a role-based access control system where permissions to perform certain tasks can be granted to users by assigning them specific roles. Provides multiple endpoints to manage authentication, users and roles.
Features include authentication via JSON Web Tokens, role-based authorization, logging, image upload, assigning/unassigning role to user, activating/deactivating user, archiving user, adding, updating and deleting a role.
Consists of 2 database schemas and 25+ routes and controllers. APIs are documented using Swagger Docs.
API is deployed on a DigitalOcean Droplet using Nginx as a web server.
Configured PM2 to keep the API server running as a daemon process to ensure availability.
Tech stack - Express.js, MongoDB, Mongoose, Joi, Cloudinary, Swagger Docs, Nginx, PM2
Built with