Spring Boot 3, Java 21 codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
This codebase was created to demonstrate a fully fledged fullstack application built with Spring Boot including CRUD operations, authentication, routing, pagination, and more.
We've gone to great lengths to adhere to the Spring Boot community styleguides & best practices.
For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
The application uses Spring Boot 3 and Java 21 for all its architecture.
Here's the functionalities of the API:
- User Authentication via JWT: It lets users sign in securely using JSON Web Tokens (JWT).
- Users: Provides operations to create, read, and update user profiles.
- Articles: Enables users to create, read, and delete articles.
- Comments: Enables users to create, read, and delete comments on articles.
- Article Listings: Offers paginated lists of articles with
offset
andlimit
params. - Article Favoriting: Allows users to mark articles as favorites.
- User Following: Enables users to follow and unfollow other users profiles.
- Article Feed: Offers a feed endpoint to see articles from followed users.
Here's the technologies used for the implementation:
- Spring Data JPA for efficient data management.
- Spring Security with JWT tokens for authentication.
- JUnit5 and Mockito for testing.
- MySql for the database.
- Flyway for the database migrations.
- modelmapper for the DTOs.
- spring-arg-resolver, for dynamic param filtering.
Here's the steps you need to make the project run:
You'll need docker installed.
- Clone this repo.
- Run
docker-compose up
.
That's it :)