• Post category:StudyBullet-3
  • Reading time:5 mins read

Build microservice in Kotlin without prior Java knowledge, using REST and GraphQL

What you will learn

Basics of Kotlin programming language

Ktor web framework

Working with databases using Exposed DSL

Dependency management with Gradle

Testing with Kotlin

Working with GraphQL

Running Kotlin inside Docker container and Docker Compose

Deploying Kotlin service to Heroku


In this course, we’ll be building a microservice in Kotlin, and by the end of this course, it will be deployed to the cloud.
The microservices will represent a cat hostel.

You’ll be able to add cats to its database, remove cats from it and list them.

Why cats hostel? Because as long as you know how to implement basic operations, you can build it for any kind of entities you need: supermarket orders, auction items, taxis, you name it. So, why not cats?

Why Kotlin?

  • Modern, productive and highly pragmatic language
    • Type safe
    • Null-safe
    • Generics that actually make sense
    • Intuitive
    • Extensible
  • Highly concurrent: Kotlin uses coroutines on top of best-in-class JIT provided by the JVM, that makes it one of the most efficient and concurrent languages nowadays
  • Rich ecosystem: be it PostgreSQL, Kafka or RabbitMQ, the most solid libraries are written for the JVM. And Kotlin is able to make use of all of them

Why this course?

There are many good tutorials and books about Kotlin programming language nowadays. But most of them make the assumption that you’re either and Android developer or at least familiar with Java programming language and its ecosystem.

This course make no such assumptions. If you’re and experienced PHP, Python, Ruby or NodeJS developer, with zero Java knowledge, this course was build with you in mind.

What you need to know:

Subscribe to latest coupons on our Telegram channel.

Some kind of web technology, be it JavaScript, PHP, Ruby or Python. I expect you to be familiar with terms like Request, Response, JSON and HTTP headers at the very least.

Familiarity with Git. I’ll provide you with a link to the relevant branch on GitHub after most of the videos, and I’ll show you commands that I use, but I won’t dive deep into what they do.

Basic SQL and Docker knowledge is useful, but not mandatory.

What this course covers:

  • Basics of Kotlin programming language
  • Dependency management with Gradle
  • Ktor web framework
  • Testing with Kotlin
  • Working with databases using Exposed DSL
  • Running Kotlin inside Docker container and Docker Compose
  • Deploying Kotlin to Heroku
  • Exposing GraphQL API with Kotlin

What this course doesn’t cover:

  • Coroutines
  • Building UI in Kotlin
  • CI tools
  • Security

Each of them is a large topic by itself, and I wanted to keep this course as focused as possible, so you’ll be able to produce a working and well tested application in an hour or two.



Hello World in Kotlin
Dependency management with Gradle
Ktor Web Framework
Refactoring for Tests
Basics of Testing in Kotlin
Supporting CRUD
Database bootstraping
Populating the database
Fetching all entities from DB
Making tests stable
Completing CRUD
Dockerizing microservice
Using Docker Compose
Deploying to Heroku
Optimising container memory
Finalising the project