A RESTful API for a blogging platform built with Java and Spring Boot.
This project is a blogging platform that provides users with the ability to register, login, manage their profiles, create, read, update, and delete blog posts, comment on blog posts, and perform search functionality to search for blog posts by title or content. It also implements role-based access control (RBAC) where only authorized users can perform certain actions.
- User registration and authentication
- User profile management
- CRUD operations for blog posts
- Commenting on blog posts
- Role-based access control (RBAC)
- Pagination and sorting for blog posts and comments
- Search functionality for blog posts by title or content
- Java
- Spring Boot
- Spring Security
- Spring Data JPA
- PostgreSQL (or your preferred database)
- Maven (or Gradle)
git clone https://github.com/sancristm/CRESWAVE_CODE_TEST.git
cd CRESWAVE_CODE_TEST
mvn clean package
java -jar CRESWAVE_CODE_TEST.jar
Once the application is running, you can interact with the API using tools like Postman or cURL. You can register users, login, create blog posts, comment on blog posts, etc. See the API Endpoints section for details on available endpoints and their usage.
- User Registration:
POST /api/v1/user/register
- User Login:
POST /api/v1/user/login
(to be implemented) - Blog Posts:
GET /api/v1/blogs/
: Retrieve all blog postsGET /api/v1/posts/{BlogpostId}
: Retrieve a specific blog post by IDPOST /api/v1/blogs
: Create a new blog postPUT /api/v1/posts/{BlogpostId}
: Update an existing blog postDELETE /api/v1/blogs/{BlogpostId}
: Delete a blog post
- Comments:
GET /api/v1/comments/
: Retrieve all commentsGET /api/v1/comments/{id}
: Retrieve a specific comment by IDPOST /api/v1/comments
: Create a new commentPUT /api/v1/comments/{id}
: Update an existing commentDELETE /api/v1/comments/{id}
: Delete a comment
Contributions are welcome! Please follow the Contribution Guidelines.
This project is licensed under the MIT License.