Skip to content
Logo of the Codersee

Codersee

My Learning
Start learning

Become Ktor Server PRO

Learn everything you need to know to create backends using Kotlin and Ktor. From the very basics- like configuring the environment and setting up a new project- to real-time chats with WebSockets.

Start learning
> 15 h

Over 15 hours of practical, video lectures

120

120 concise and practical lessons divided into modules for better learning experience

19

19 theoretical lessons to understand advances topics, like JWT tokens, or SSE

4

Services simulating real-life scenarios

Why Should You Learn Ktor?

01

Easy to Get Started

By design, Ktor has less framework overhead, making it excellent choice if you want to start your backend jouney. Especially compared to opinionated frameworks, like Spring Boot.

02

Performant

It is built from the ground up using Kotlin and Coroutines. It makes it not only a great choice if you are an Android dev but also helps create efficient, fully async applications without complicated code.

03

Great for Microservices

Thanks to lightweight, modular architecture, and minimal overhead, Ktor is an excellent choice for building highly scalable and maintainable microservices.

04

Flexible

Ktor provides a minimal โ€œtoolkitโ€ that you can shape to your needs and extend using both the official and your custom plugins. It gives you the freedom to define how your application is organized and what libraries it uses.

Why Choose Ktor Server PRO?

Hands-on Approach

This is not a course, in which we walk through each topic separately. Together, we will create a comprehensive project combining various aspects and exposing actual APIs.ย 

This way, you will gain knowledge and a blueprint that you can immediately use in real projects.

Extensive

This course is probably the most comprehensive Ktor server course available on the market.

During this course, you will learn plenty of desired backend skills. Starting from scratch, through database integration, like PostgreSQL, MySQL, and MongoDB, up to exposing APIs with REST, Server-Sent Events, and WebSockets.

Up-to Date

Ktor, just like other technologies evolves and some areas become outdated quickly. And I am more than sure that you at least once in your life spent your time on something that could help you with your problem, but simply didn’t work.

You don’t need to worry about it here. The course uses Ktor 3.0.3 and will be updated on a regular basis.

Structured, Video Contentโ€‹

The course is divided into parts dedicated to particular services. Each part contains modules that gather together video lessons related to the particular topic so that the learning process is even smoother.

Practical Challenges

Throughout this course, you will work not only with a standard, follow-along approach. Additionally, the course contains a lot of challenges– exercises that will solidify your knowledge.

Dedicated Discord

After joining, you get access to a dedicated Discord channel, where you can ask questions and surround yourself with other passionates of Ktor server-side development!

Explore top technologies

Image presents Ktor logo / icon
Image presents MongoDB logo / icon
Image presents Redis logo / icon
Image presents JWT (JSON Web Token) logo / icon
Image presents PostgreSQL logo / icon
Image presents MySQL logo / icon
Image presents Testcontainers logo / icon
Image Presents Kotlin Logo
Image presents JetBrains Exposed framework logo / icon

Course Curriculum

Ktor Server Pro consists of 120 practical and 19 theoretical lessons, divided into 5 parts- an introduction and parts dedicated to particular service. And each part contains several modules with lessons.

Part "0" - Course Introduction

Lessons

ย  – Welcome To The Course

Module 1 โ€“ Before We Start

ย  – Prerequisites & Required Tools
ย  – Course Structure
ย  – How To Take This Course?

Module 2 โ€“ Preparation

ย  – Git Installation
ย  – IntelliJ IDEA (IDE) Installation
ย  – Docker Installation
ย  – Postman Installation
ย  – Cloning Repository
ย  – Theory: What is Ktor?

What you will learn?

In this part, we are going to prepare ourselves for the rest of the course.

We will learn what exactly Ktor is and configure the necessary tools, like Git, IntelliJ, Postman, and Docker.

Additionally, I will show you how to work with a ready-to-go GitHub repository for this course.

Part 1 - User Service

Lessons

ย  – Introduction to user-service part

Module 1 โ€“ Getting Started

ย  – Theory: Understanding PostgreSQL
ย  – Running PostgreSQL Instance with Docker
ย  – Visualizing the Database with DBeaver
ย  – Creating The Database Schema For user-service ย  – Creating a New Ktor Project For user-service
ย  – Working with application.yaml

Module 2 โ€“ Working with JDBC and Postgres

ย  – Theory: What is JDBC?
ย  – Connecting to Postgres with HikariCP
ย  – Saving New User
ย  – Finding User by ID
ย  – Challenge: Finding User by Email
ย  – Challenge: Finding User by Email and Password
ย  – Updating User
ย  – Introducing Repository for Confirmation Code
ย  – Challenge: Saving Confirmation Code
ย  – Challenge: Checking If Confirmation Code Exists
ย  – Challenge: Deleting Confirmation Code

Module 3 โ€“ Working with Transactions and Passwords

ย  – Theory: Calling Blocking Code From Coroutines โ€“ Dispatchers.IO
ย  – Creating New User
ย  – Introducing Transactions in JDBC
ย  – Theory: Password Hashing, Salt & Argon2id
ย  – Hashing User Password
ย  – Challenge: Implementing Search Functions
ย  – Challenge: Implementing User Confirmation Logic

Module 4 โ€“ Routing Fundamentals

ย  – Theory: Understanding REST
ย  – Setting Up Routing Skeleton
ย  – Defining First Route & Reading JSON with kotlinx
ย  – Creating New Users & Returning HTTP Status Codes
ย  – Custom UUID Serialization
ย  – Returning Custom Headers
ย  – Challenge: Expose Email Confirmation Endpoint
ย  – Postman Tip: Using Variables
ย  – Returning Custom Error Responses
ย  – Reading Path Variables
ย  – JSON Response with Custom Serializer

Module 5 โ€“ Security With JWT

ย  – Theory: Understanding JWT
ย  – Theory: Private vs Public Keys
ย  – Generating Keys in Kotlin
ย  – Preparing Config For JWT Generation
ย  – Generating JWT Token
ย  – Exposing Login Endpoint
ย  – Postman Tip: Reuse Data From Response
ย  – Creating JWT Token Verifier
ย  – Securing Endpoints with authenticate
ย  – Custom JWT Validation
ย  – Theory: Authorization vs Authentication
ย  – RBAC with JWTPrincipal

Module 6 โ€“ Testing Fundamentals & Unit Testing

ย  – Theory: Introduction to Testing
ย  – Writing Your First Test with JUnit 5
ย  – Using MockK for Mocking
ย  – Verifying Interactions
ย  – Challenge: Testing findActiveByEmailAndPassword
ย  – Handling Exceptions in Tests

Module 7 โ€“ Integration Testing with Testcontainers

ย  – Theory: What is Testcontainers?
ย  – Getting started with Testcontainers
ย  – Testing User Persistence
ย  – Running Tests in Isolation
ย  – Challenge: Testing If User Found by ID

Module 8 โ€“ Integration Testing REST Endpoints

ย  – Preparing Test Environment
ย  – Testing User Creation withย ย  testApplication
ย  – Challenge: Testing User Creation & Confirmation
ย  – User-Service Part Summary

What you will learn?

This part will be the most important service in the whole course. And after user-service, you will be able to handle most real-life cases in your project.

We will see how to:

  • Configure a new Ktor project from scratch
  • Run PostgreSQL instance with Docker
  • Connect our application to Postgres
  • Work with blocking code and JDBC
  • Hash passwords and work with JWT tokens
  • Expose REST APIs
  • Test Ktor server with JUnit 5 and MockK
  • Test apps using Testcontainers
Part 2 - Product Service

Lessons

– Introduction to product-service part

Module 1 โ€“ Getting Started With product-service

– Theory: Understanding MongoDB
– MongoDB Compass Installation
– Running MongoDB Instance with Docker
– New Ktor Project for product-service
– Connecting to MongoDB

Module 2 โ€“ MongoDB CRUD Operations

– Creating Collections in MongoDB
– Saving Products to DB
– Finding Products by ID
– Searching by Regex
– Sorting Results
– Paginating Results
– Updating Documents
– Deleting Documents

Module 3 โ€“ Exposing Product REST Endpoints

– Challenge: Setting up ProductService
– Challenge: Organizing Product Routes
– Challenge: Exposing GET /products/{id}
– Challenge: Exposing PUT /products/{id}
– Challenge: Exposing DELETE /products/{id}
– Challenge: Exposing POST /products
– Implementing Search Endpoint

Module 4 โ€“ Securing product-service

– Setting Up JWT Properties
– Adding JWTService
– Authentication Configuration
– Theory: Plugins in Ktor
– Creating a Custom RBAC Plugin
– product-service part summary

What you will learn?

In this part, we will introduce our second service- the product service.

The primary focus of this part will be to learn how to work with MongoDB- a modern, NoSQL database. Additionally, you will have a chance to recap and strengthen your Ktor REST knowledge thanks to the challenges.

And on top of that, additionally, you will learn how to:

  • Create MongoDB instance with Docker
  • Work with MongoDB Kotlin async driver
  • Work with Ktor plugins and implement custom ones
  • Secure services with JWT and public key
Part 3 - Order Service

Lessons

– Introduction to order-service part
Module 1 โ€“ Getting Started with order-service
– Theory: Understanding MySQL
– Creating a New Ktor Project For order-service
– Configuring Project
– Running MySQL Instance with Docker
– Creating Database Schema For order-service
– Connecting to MySQL

Module 2 โ€“ Introduction to Exposed
– Theory: What is Exposed?
– Theory: Exposed. DSL or DAO?
– Defining Tables
– Implementing OrderRepository

Module 3 โ€“ Exposed DSL
– Persisting Orders
– Persisting OrderItems
– Replace Multiple INSERTS with One
– SELECT with WHERE clause
– Joining Tables
– Limit & Offset

Module 4 โ€“ Exposed DAO
– Defining Entities
– Saving Orders
– Finding with where Clause
– Limit & Offset

Module 5 โ€“ Exposed Transactions
– Implementing OrderService
– Important Thing About Transactions

Module 6 โ€“ Server-sent Events (SSE)
– Theory: What are Server-Sent Events (SSE)?
– Retrieving Order Status with SSE
– Testing SSE with Postman
– Better Error Handling with Event Types
– Authentication & JWT

Module 7 โ€“ Exposing Order REST Endpoints
– Challenge: Organizing Routes
– Challenge: Implementing Endpoint For Getting Order by Id
– Challenge: Adding Endpoint To Retrieve All Orders
– Challenge: Introducing Endpoint To Add New Order
– Challenge: Securing Previously Added Endpoint
– order-service part summary

What you will learn?

In this part, we will introduce a third service- the order service.

In this one, we will see how easily we can work with relational databases in Ktor using a more high-level approach, Exposed DAO, and how to introduce real-time functionalities with SSE.

Eventually, after this part you will know how to:

  • Create MySQL instance with Docker
  • Connect to MySQL with Kotlin Exposed framework
  • Operate using both Exposed DSL and DAO approaches
  • Implement Server-Sent Events (SSE)
Part 4 - Chat Service

Lessons

– Introduction to chat-service part

Module 1 โ€“ Getting Started with chat-service
– Theory: Understanding WebSockets
– New Ktor Project For chat-service
– Configuring WebSockets Plugin
– Implementing Echo Endpoint
– Parameters & Connection Closing
– Sending Serialized Messages

Module 2 โ€“ Working With Multiple Users in WebSockets
– Broadcasting Messages
– Introducing Closed Chats (Rooms)
– Theory: Problems with WebSockets in Microservices

Module 3 โ€“ Implementing Chat With Redis Pub/Sub
– Theory: What is Redis Pub/Sub?
– Running & Connecting to Redis Docker Instance
– Publishing Messages
– Observing Channels
– Implementing Chat WebSocket Endpoint
– Unsubscribing From Redis
– Authentication & JWT
– Chat-service part summary
– Course Outro

– Ktor Server Pro summary

What you will learn?

In this part, we will introduce the last service- the chat service.

In this service, you will learn how easily (with appropriate knowledge), you can implement real-time, two-way communication in Ktor with WebSockets.

Eventually, after this one, you will know how to:

  • Create Redis instance with Docker
  • Create broadcasting functionality
  • Introduce closed, in-memory chat rooms
  • Work with Redis Pub/Sub
  • Fix the issue with WebSockets in microservices using Pub/Sub approach

Who is This Course For?

Ktor Server Pro is designed to address as many people, as possible.ย 
But it is not for everyone.

โœ… You are Android developer who wants to start creating backends

If you are an Android developer with no prior backend experience, this course will be a great way to leverage your Kotlin knowledge. Given Ktor's lightweight design and my hands-on approach, you will have a chance to focus on learning the backend, not the framework internals.

โœ… You have prior backend experience

If you have prior backend experience, for example with Kotlin, Java, and especially with some sophisticated backend tools, like Spring Boot, then you are going to enjoy this one.
After this course, you will not only add one more, completely different tool to your toolbox. Additionally, you will gain a lot of universal knowledge that you will be able to reuse in other projects, like Postman tips, or Testcontainers.

โœ… You just learned Kotlin and look for backend framework

If you have recently learned, or simply know Kotlin fundamentals and you are looking for a backend tool, then you came to the right place. Ktor by design is lightweight, so we will have a chance to focus on what matters- actual implementation- not the framework itself.
Moreover, you will learn how to combine all the modern approaches, which will save you countless hours of learning.

โœ… You tried learning Ktor but struggled with combining everything together

If you already tried learning Ktor, or even learned particular topics, but still struggle to put them into one working project, then you are in a good place. Together, we will create 4, actual services that combine various aspects. Only this will save you tens, if not hundreds of hours.

โŒ You are a total programming newcomer

If you have never programmed before, you will not benefit from my course. You must understand foundational Kotlin concepts first, before starting with the Ktor framework (or any other framework/library/tool).

Image presents Ktor course instructor- Piotr Wolak

About Me

My name is Piotr and I am the author of this course.

I am a Kotlin Backend Engineer on a daily basis, and the founder of Codersee- a place where you can find quality contentย specialized in Kotlin on the backend.ย 

I’ve been teaching people for almost 5 years, my blog is visited by thousands of people, and my video content is watched thousands of hours every month.ย 

So you don’t have to take my word for it when I talk about quality. Not only you can verify it on your own, but I also have plenty of testimonials to prove that.

Join Now

Only

39 $
  • Access to over 15 hours of video content
  • 120 practical and 19 theoretical lessons about Ktor
  • Access to the closed Discord community
  • Access to private GitHub repository
Start learning

FAQ

What exactly will I get for joining?

Of course, you will get access to the closed course platform.

But additionally, you will receive:

– “Ktor Server Pro: Companion Guide”– a PDF with useful links related to the course content and topics to explore after finishing this course

– access to the private GitHub repository– so that you can get the whole code and updates as fast as possible

– access to the private Discord Channel- where you can ask questions and surround yourself with passionates, just like you

How much Kotlin do I need to know beforehand?

I mentioned that already, but I want to emphasize that you will not benefit from this course if you are a total programming newcomer.

On the other hand, you do not need to be a Kotlin expert with experience in DSL, or coroutines. I truly believe that with the way this course was built, understanding basic Kotlin concepts should be enough.

Also, I you haven’t worked with Kotlin, but have prior experience with other programming languages, especially JVM, then of course you will be able to benefit, too.

Is this course up to date?

At the moment of publishing, the course is using Kotlin 2.1.10 and Ktor 3.0.3.

But you have also my guarantee that I will update the code shared in the private GitHub repository on a regular basis. And whenever the situation requires, I will let you know and add appropriate remarks to the course itself.

This way, you don’t need to worry about outdated content, regardless of when you join.

Do you offer a Black Friday, or any other discounts?

The only way to get this course at a bargain price is to either join as an Early Bird participant or buy it in a package. I want to appreciate regular readers, subscribers, and loyal customers.

And if you have ever bought something before the discount, then you know that it is simply not fair :)

Also, future editions will be more expensive, so I would secure your spot as soon as possible.

Does the course include advanced topics?

Yes, we will tackle various topics. Starting from the very basics, up to the advanced ones, like security, or WebSockets communication.

How does this course differ from other available on the market?

I am convinced that you will not find any Ktor Server course that covers it in such a comprehensive way.

And given the price, I am also convinced this is going to be your best investment this year.

  • 2023 ยฉ Codersee Copyright ยฉ Codersee, All rights reserved.