Skip to content

Backend code for a feature-rich blog website with JWT authentication, post and comment management, user follow/unfollow, admin blocking, and file handling. Built with Express JS and MongoDB

License

Notifications You must be signed in to change notification settings

Shubham-Guptaji/MERN-Blog-Backend

Repository files navigation

Blog Website Backend

Introduction

This repository contains the backend code for a full-fledged blog website. It provides various features including JWT authentication, CRUD operations for posts and comments, user management functionalities like following/unfollowing authors, admin privileges to block/unblock users, and file management for uploading and deleting files.

Features

  • JWT Authentication: Users can authenticate using JSON Web Tokens for secure access to the website.
  • Post Management:
    • Create, read, update, and delete posts.
    • Like posts to show appreciation.
  • Comment Management:
    • Create, read, update, and delete comments on posts.
  • User Management:
    • Follow/unfollow authors to customize the feed.
    • Admin privileges to block/unblock users.
  • File Management:
    • Upload files such as images for posts.
    • Delete uploaded files when necessary.

Technologies Used

  • Backend Framework: Express JS
  • Database: MongoDB
  • Authentication: JSON Web Tokens (JWT)
  • Other Technologies: Cloudinary, Mongoose, Bcrypt, Express-Rate-Limit, Multer

Setup Instructions

  1. Clone the Repository:
  git clone https://github.com/Shubham-Guptaji/MERN-Blog-Backend.git
  1. Install Dependencies:
  cd MERN-Blog-Backend
  npm install
  1. Environment Variables:
  • Create a .env file based on the .env.example file.
  • Populate the environment variables with appropriate values.
  1. Database Setup:
  • Set up your database and update the database configuration in the .env file.
  1. Run the Server:
  npm start
  1. Testing:
  • Use tools like Postman or write unit tests to ensure the APIs work as expected.

Api Documentation

Ownership

  • Shubham Gupta

License

MIT License

About

Backend code for a feature-rich blog website with JWT authentication, post and comment management, user follow/unfollow, admin blocking, and file handling. Built with Express JS and MongoDB

Topics

Resources

License

Stars

Watchers

Forks

Packages