Skip to content

Linielt/realworld-api-spring-boot

Repository files navigation

RealWorld Example App

Spring Boot 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.

How it works

  • Spring Boot for auto configuration of dependencies
  • Spring Data JPA for persistence with MySQL
  • Spring Security to secure application using self-signed JWTs generated with oauth2-resource-server

Getting started

Build

./mvnw clean install -U

Follow instructions here to generate public and private keys for signing JWTs.

Add MySQL credentials to env.properties file

DB_NAME=your_db_name
DB_USER=your_username
DB_PASSWORD=your_password

Diagram

Database ER diagram

Improvements to be made

  • Use Lombok to reduce boilerplate code
  • Add Logging
  • Use linting tools for more consistent code formatting
  • Write more tests and include a E2E test
  • Find better ways of dealing with nested DTOs
  • Make API accept XML

References

About

Spring Boot implementation of the RealWorld API

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages