Tuesday, February 13, 2018

Rest based API server

Rest based API platforms are very common these days. This has also led to the logical separation of front-end and back-end. New front-end techniques like Single page application nicely fit with these concepts and also is a logical separation of ownership. Backend deals with providing the information in the form of API and front-end deals with presenting them in an appropriate way.

Putting a Rest-based API server means a lot of frameworks need to play with each other. There are functional concerns about security, performance needs to be taken care of. However, at the core, it's about exposing endpoints as web services which can consume and emit JSON data.

The other aspect needs to be handled is the choice of language and the frameworks. It can be done in hundreds of languages and each language has multiple ways to do it.

In the same context, I have put a Java-based API server skeleton in place. The source code is available at


Do check out the development branch. The other branches may not be stable.

The API server code is in the server folder. Also, do read the server/README.md which contains all the details of how to bring it locally and run it. The frameworks that I have used are following. (I will deal with individual choices with time and why I chose to do things certain way)

  • Gradle as build tool
  • Spring Boot
  • Spring Security using JWT
  • Hibernate
  • Liquibase
  • Hibernate Envers
  • Postgres as DB
  • Lombok
  • Unit tests
  • Integration tests
  • Swagger 2
This will remain a work in progress. Feel free to comment if you want to see certain things handled. And feel free to use it. All the details in server/README.md

No comments:

Post a Comment