Nowadays, concepts like Clean Code, TDD, BDD, Test Coverage, or Quality of Life are used to facilitates the manner that we are building and maintaining our software projects.

However, if we want to verify that the tests that we wrote are really accurate and reliable against future changes or possible errors in our code, we need something else, the so-called “mutation testing”.

Although we are following all the good practices, carefully writing all our tests, and checking the code coverage, we could still have some hidden issues there.

In this story, we are going to explore this concept, which is…


Swagger, the OpenAPI implementation is really great to document our own REST APIs, and even to test it locally or remotely. But before, if you are not familiar with this topic, please take a look at the official documentation.

To do that we will implement a simple API, then document it with Swagger to generate the OpenAPI specification file, and finally, we will add some views to enable some UIs to read and test it nicely.

Our API

Let’s start as usual by creating a new first microservice (by using CLI or the Micronaut Launch website) with the open-api feature.

If you…


With the recent 2.0.0 GA, we are able to use Micronaut with a complete library toolkit including Postgres, Flyway, TestContainers, and GraalVM with minimal effort and impressive performance.

Context

This story continues with the previous article, which by using an in-memory database (H2) we created a REST API to manages users and their messages.

Particularly, we are going to add to support for a relational database (Postgres), a migration system (Flyway), and a dockerized database to test our application in the same way that it works for the development and production environments.

Finally, thanks to the recent improvements in Micronaut and…


Micronaut is evolving in the path to reach the 2.0.0 final version. As expected, necessary changes are made, and one of them is how to handle refresh tokens.

After the launch of the 2.0.0 Release Candidate 1, it seems a pretty good moment to redesign our solutions to work with this mechanism following the new way.

Configuration

First of all, an update on our dependencies is needed. Although mainly changing the micronautVersion variable should be enough, let’s take advantage of the new official Micronaut Launch online service to double-check our dependencies quickly:


In this third part of this particular trilogy on Micronaut v2, we are going to finish our project by deploying our new backend, which given a valid token provides user-related data thought a protected REST API.

Previously

In the previous parts, we followed the steps to build our backend implementation, resulting in a secured API that allows users to sign-up and sign-in (Part1) to finally retrieve user-related data using the JWT access token (Part 2).

Open API

Before reaching the cloud topic, let’s prepare our project to be more documented for future integrations, providing an easy way to use our API.

  1. Swaggerizing our…


In this second part of this journey, we are going to finish our implementation of this backend built with Micronaut v2, which given a valid token is providing our user data thought its API.

Previously

In the previous part, we explored the first steps in this backend creation, resulting in an API that allows users to register and obtain a valid access token.

Requirements

The remaining requirements for this final task are the following :

  1. Secure REST API
  2. Association with JPA
  3. Fetching mechanisms

This time, let’s focus our effort on how the framework could be used in this way and how we…


This is the first part on my journey creating a backend at fast-pace with Micronaut, starting with the initial API that covers JWT, user login, and sign-up mechanisms.

Context

Micronaut was released during the Greach 2018 and I had the pleasure to be there in life for those presentations. I’m not here to repeat the great benefits of using it or how well it has evolved, just check the official documentation, which is awesome by the way.

Since I started playing with Flutter recently, instead of using Firebase as a backend, I saw the perfect opportunity to play again with Micronaut…

Ruben Mondejar

Engineering Manager at @getuberall . Childhood with puzzles, Lego, and MSX. PhD, Hobbyist Game Dev and Proud Father

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store