Let’s successively go through the libraries we will be using in our project with a brief description of each. This is important because these libraries and the functionalities that they offer will come together to become the building blocks of our service.
The building blocks of our service
1. Akka
Using Akka, we can build highly concurrent, distributed, and resilient message-driven applications for Scala. We will also be using Akka-HTTP, which provides a full server- and client-side HTTP stack, and Akka-Streams, whose purpose is to offer a safe way to formulate stream processing setups.
2. Slick
Slick will be our database layer. We are using this specifically to make our job easier as we will write our database queries in Scala instead of SQL.
3. Flyway
We will employ Flyway for database migrations. Database migrations help move in a deterministic way from a current version of the database to a newer one. Database migrations are stored according to their version number in Flyway, which automatically updates them.
4. Circe
Circe is a JSON library for Scala that employs Cats and only has a dependency on Cats. Alongside this, we will be using akka-http-json as a wrapper.
5. Refined
We will use Refined to employ refined types. This library is a port of a Haskell library, and the aim is to help developers constrain types.
6. PostgreSQL JDBC driver
PostgreSQL JDBC is an open-source driver that allows Java programs to connect to a PostgreSQL database using standard, database-independent Java code.