Git Product home page Git Product logo

perfect-blog-api's Introduction

Blog API Application Project

Build a Blog API that can be used to manage posts and comments as well as go through the registration and logging user process using a JWT token

Tech Stack

Server: Node, Express, MongoDB, Mongoose, JWT

API FEATURES

  • ✅ Authentication using JSON Web tokens (JWT) & Authorization
  • ✅ Post CRUD operations
  • ✅ Category CRUD operations
  • ✅ Comment functionality
  • ✅ Profile photo uploaded
  • ✅ Update password
  • ✅ System blocking user if inactive for 30 days
  • ✅ Admin can block a user
  • ✅ A user can block different users
  • ✅ A user who block another user cannot see his/her posts
  • ✅ Check if a user is active or not
  • ✅ Check last date a user was active
  • ✅ Changing user award base on number of posts created by the user
  • ✅ A user can follow and unfollow another user
  • ✅ Get all users who views someone's profile
  • ✅ Admin can unblock a blocked user
  • ✅ A user can close his/her account


ENDPOINTS

Run Locally

Clone the project

  git clone https://link-to-project

Go to the project directory

  cd my-project

Install dependencies

  npm install

Start the server

  npm run server

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

MONGODB_URL , JWT_SECRET , CLOUDINARY_CLOUD_NAME , CLOUDINARY_API_KEY , CLOUDINARY_API_KEY , CLOUDINARY_API_SECRET_KEY

BaseURL = https://test.onrender.com/

API Authentication

Some endpoints may require authentication for example. To create a create/delete/update post, you need to register your API client and obtain an access token.

The endpoints that require authentication expect a bearer token sent in the Authorization header.

Example:

Authorization: Bearer YOUR TOKEN

perfect-blog-api's People

Contributors

klaus139 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.