Blog Posts project in Spring Boot, RestAPI, JPA, PostMan and MYSQL

The blog post is a backend Project in Spring boot, RestAPI, JPA, MYSQL, and postman. It contains the Restapi that will run over the postman to perform operations that will be related to managing the online blog.

Used technologies to create Blog Post API

  • It uses Spring boot to create RestAPIS.
  • JPA repository to manage the database transactions.
  • MYSQL is a database to store information.
  • Postman to execute the API.
  • Swagger to create API documentation.
  • The backend is running over the Tomcat Server.

BlogPost Project Overview

The online blog post project manages the article and contains the blog website, There will be two direct or indirect users of the application Administration and viewers.

where the administration can log in and Create Post with Post contain, post ID, and Author name.

Role of Administration

  • Create, Update and Delete Post.
  • Create Post Categories.
  • Filter posts according to the categories.
  • Sort Posts according to the posted date.

Role of Viewes

  • View and read the post
  • Filter posts according to the categories.
  • Search posts by name
  • Like or Dislike the post

ReatAPI calls for the blog posts.

Common APIs
  • Post request for User/Driver Registration
  • Login and generate an auth token

API calls after admin login

  •  Create API to register a new user.
  •  Create API to get the user list.
  • Create Rest API to update the user by user id.
  • Delete a user by id.
  • Get API to log in and create an authentication token using JWT.
  • Create Post as an Admin
  • Get Post as a user.
  • Get Post by Categories.

RestAPI with Payload:

{
"posts": [{
"id": 1,
"author": "Rylee Paul",
"authorId": 9,
"likes": 960,
"popularity": 0.13,
"reads": 50361,
"tags": [ "tech", "health" ]
},
...
]
}
Request:
Route: /api/ping
Method: GET
Response:
Response body (JSON):
{
"success": true
}
Response status code: 200

Payload 2

Response body (JSON):
{
"posts": [{
"id": 1,
"author": "Rylee Paul",
"authorId": 9,
"likes": 960,
"popularity": 0.13,
"reads": 50361,
"tags": [ "tech", "health" ]
},
...
]
}

Leave a Comment

Your email address will not be published. Required fields are marked *