This is a simple blog application implemented using Spring Boot. It includes features like user registration, login, post creation, commenting, category management, and more.
- Java
- Spring Boot
- Spring Security
- JWT Authentication
- Swagger
- User Management: Allows users to register and login using JWT authentication.
- Post Management: Users can create, view, update, and delete their posts.
- Commenting: Users can comment on posts.
- Category Management: Admins can manage categories for posts.
-
Clone the repository:
git clone <https://github.com/Virendrakumardwivedi/Alphaware_Blog_Application>
-
Build and Run:
cd blog-application mvn spring-boot:run
-
Access Swagger UI:
Swagger UI provides an interactive documentation for the API endpoints. Access it at Swagger UI http://localhost:8888/swagger-ui/index.html#/
-
User API:
/api/user/register
: Register a new user./api/user/login
: Authenticate and generate JWT token./api/user/welcome
: Welcome message./api/user/getUsers
: Get all users./api/user/getUsers/{id}
: Get user by ID.
-
Post API:
/api/posts
: Create a new post./api/posts/{id}
: Get post by ID./api/posts
: Get all posts./api/posts/{id}
: Update post by ID./api/posts/{id}
: Delete post by ID.
-
Comment API:
/api/comments
: Add a new comment./api/comments/{id}
: Get comment by ID./api/comments
: Get all comments./api/comments/{id}
: Update comment by ID./api/comments/{id}
: Delete comment by ID.
-
Category API:
/api/category
: Create a new category./api/category/{id}
: Get category by ID./api/category
: Get all categories./api/category/{id}
: Delete category by ID.
- JWT authentication is used for securing the API endpoints.
- Each request must include a valid JWT token in the Authorization header.
Contributions are welcome! Feel free to fork the repository and submit pull requests.