Blog Project for ATRI Institute
Our project is a blogging system in the development phase, developed with Java 21 and Spring Boot. With a strong focus on security and usability, we are incorporating JWT tokens for secure authentication and implementing Spring Security to protect our endpoints. We use efficient DTOs and mappings to optimize communication and data manipulation, making the management of posts, categories, tags and users more intuitive. For storage and flexibility, we are integrating MongoDB as our main database. In addition, we are working to create clear and interactive documentation with Swagger, making it easier to understand and use our APIs.
![]() @Rafael-Dev |
![]() @NicollyRamos |
![]() @wendoxx |
---|---|---|
Rafael Silva Back-end Engineer |
Nicolly Ramos Back-end Engineer |
Wendel Silva Back-end Engineer |
- Before you start, make sure you meet the following requirements:
- Java 21 installed
- Windows updated
- Linux updated
- macOS updated
- Clone the repository:
git clone https://github.com/institute-atri/blog-backend.git
-> AuthenticationController
- POST /v1/auth/login - Authenticate user by verifying credentials.
- POST /v1/auth/register - Endpoint for user registration.
- POST /v1/auth/logout - Endpoint for logging out the current user.
- POST /v1/auth/refresh-token - Endpoint to refresh the access token using a valid refresh token.
-> UserController
- GET - /v1/users - Returns a list of all users registered in the system, only with the admin token.
- GET - /v1/users/find/{id} - Returns the user with the specified ID. Only users with the ADMIN role can search by user.
- PUT - /v1/users/update/{id} - Updates the user with the specified ID.
- DELETE - /v1/users/delete/{id} - Deletes the user with the specified ID. Only users with the ADMIN role can delete the user.
- GET - /v1/users/posts/id - Returns posts by user id.
- POST - /v1/users/change-password - Endpoint to change the password of the currently authenticated user.
-> PostController
- GET - /v1/posts - Collection of events.
- GET - /v1/posts/find/{id} - Event identifier ID.
- POST - /v1/posts/create - Create an event.
- PUT - /v1/posts/update/{id} - Update an event by ID.
- DELETE - /v1/posts/delete/{id} - Delete an event by ID.
-> CategoryController
- GET - /v1/categories - Collection of events.
- GET - /v1/categories/posts/{id} - Returns posts by category ID.
- GET - /v1/categories/find/{id} - Event identifier ID.
- POST - /v1/categories/create - Create an event.
- PUT - /v1/categories/update/{id} - Update an event by ID.
- DELETE - /v1/categories/delete/{id} - Delete an event by ID.
-> TagController
- GET - /v1/tags - Collection of events.
- GET - /v1/tags/posts/{id} - Returns posts by tag ID.
- GET - /v1/tags/find/{id} - Event identifier ID.
- POST - /v1/tags/create - Create an event.
- PUT - /v1/tags/update/{id} - Update an event by ID.
- DELETE - /v1/tags/delete/{id} - Delete an event by ID.
The API uses Spring Security for authentication control. The following roles are available:
USER -> Standard user role for logged-in users.
ADMIN -> Admin role for managing partners (registering new partners)
- Spring web
- Lombok
- Spring boot dev tools
- Spring data mongoDb
- Spring security
- Hibernate validator
- Java jwt auth0
- Spring doc open api
- Mapstruct
- Junit
- Mockito
- Cucumber
- Bifurcate the project
- Create a branch
git checkout -b feat-#1/sugestions
- Make your changes to the code
- Confirm your changes
git commit -m 'feat: add a new susgestion (#1)'
- Send to branch
git push origin feat-#1/sugestions
- Open pull request