Ktor Tutorial #5: Serialization — JSON with kotlinx.serialization

In the previous tutorial, we built routes that return plain text. But real APIs use JSON. Clients send JSON requests and expect JSON responses. In this tutorial, you will add JSON serialization to your Ktor API using kotlinx.serialization — the official Kotlin serialization library. What is Content Negotiation? When a client sends a request, it tells the server what format it wants using the Accept header. When it sends data, it uses the Content-Type header. ...

June 5, 2026 · 8 min

Ktor Tutorial #4: Routing — Handling HTTP Requests

Routing is the core of any backend framework. It maps URLs to code that handles requests and sends responses. In this tutorial, you will learn how to define routes in Ktor, handle different HTTP methods, use path and query parameters, group routes, and handle errors properly. How Routing Works in Ktor Every Ktor route has three parts: HTTP method — GET, POST, PUT, DELETE, etc. Path — The URL pattern like /api/users/{id} Handler — The code that runs when a request matches routing { get("/hello") { // method + path call.respondText("Hi") // handler } } When a client sends GET /hello, Ktor finds the matching route and runs the handler. ...

June 4, 2026 · 8 min

Ktor Tutorial #3: Project Setup — Your First Ktor Application

In the previous tutorials, we learned what Ktor is and how it compares to Spring Boot. Now it is time to build a real project. We will set up a proper Ktor application with the right project structure, plugins, error handling, and configuration. This is the foundation for everything we build in this series. Project Structure Here is the project structure we will create: ktor-tutorial/ ├── build.gradle.kts ├── settings.gradle.kts ├── gradle.properties ├── src/ │ ├── main/ │ │ ├── kotlin/ │ │ │ └── com/kemalcodes/ │ │ │ ├── Application.kt │ │ │ └── plugins/ │ │ │ ├── Routing.kt │ │ │ └── StatusPages.kt │ │ └── resources/ │ │ └── logback.xml │ └── test/ │ └── kotlin/ │ └── com/kemalcodes/ │ └── ApplicationTest.kt This follows the standard Kotlin/Gradle layout. Source code goes in src/main/kotlin, resources in src/main/resources, and tests in src/test/kotlin. ...

June 4, 2026 · 7 min

Ktor Tutorial #2: Ktor vs Spring Boot — Which Kotlin Backend?

You decided to build a backend with Kotlin. Good choice. But now you face another decision: Ktor or Spring Boot? Both are great frameworks. Both support Kotlin. But they are very different in philosophy, design, and use cases. Let’s compare them honestly. The Big Picture Ktor is a lightweight, modular framework built by JetBrains. It is Kotlin-native, coroutine-based, and you add features as plugins. Spring Boot is a full-featured, batteries-included framework from VMware (now Broadcom). It started as a Java framework and added Kotlin support later. ...

June 4, 2026 · 7 min

Ktor Tutorial #1: What is Ktor? — Kotlin's Modern Backend Framework

You know Kotlin. You build Android apps, maybe KMP apps. But what about the backend? Every app needs a server. An API to fetch data from. A backend to store users, handle payments, send notifications. You could learn Node.js and Express. Or Python and FastAPI. Or Java and Spring Boot. Or you could use the Kotlin you already know — and build your backend with Ktor. What is Ktor? Ktor is a backend framework built by JetBrains — the same company that created Kotlin. It lets you build web servers, REST APIs, microservices, and web applications using Kotlin. ...

June 3, 2026 · 7 min
Android Development in 2026 — What Actually Matters

Android Development in 2026: What Actually Matters Now

Android development has changed a lot in the past few years. The ecosystem is no longer centered on XML layouts and basic CRUD apps. In 2026, Android development is shaped by AI-native features, Kotlin-first tooling, multiplatform code, and performance engineering. Many developers are still learning patterns that teams are already moving away from. So the real question is no longer: “How do I build Android apps?” The real question is: ...

May 15, 2026 · 5 min

KMP Tutorial #20: Migrating an Existing Android App to KMP — Step-by-Step Guide

You have an existing Android app. It works. Users like it. Now the team wants an iOS version. Rewriting from scratch in Swift takes months. Kotlin Multiplatform lets you share the business logic and add iOS on top, without rewriting everything. In this final tutorial, we cover how to migrate an existing Android app to KMP. This is not a “rewrite from scratch” approach. It is a gradual migration — move one layer at a time, keep the Android app working at every step, and add iOS when the shared module is ready. ...

April 7, 2026 · 11 min

KMP Tutorial #19: KMP for Desktop and Web — Compose Multiplatform Beyond Mobile

So far, our notes app runs on Android and iOS. The shared module handles business logic, networking, and database. The UI is platform-specific: Compose on Android, SwiftUI on iOS. But KMP can go further. With Compose Multiplatform, you can build desktop apps for Windows, macOS, and Linux. With Kotlin/Wasm, you can run Kotlin in the browser. In this tutorial, we explore both options — what they look like, how to configure them, and when they make sense. ...

April 7, 2026 · 8 min

KMP Tutorial #18: Publishing Your KMP App — Android APK, iOS IPA, and CI/CD

Your notes app works on both Android and iOS. The data layer syncs, the UI layer has navigation and editing, and the shared ViewModel handles all business logic. Now it is time to publish. In this tutorial, you will learn how to build a release APK for Android, archive an IPA for iOS, set up GitHub Actions CI/CD, and prepare for the Play Store and App Store. What We Are Covering Android release build — signing, APK, AAB iOS release build — Xcode archive, IPA export GitHub Actions CI/CD — automated builds on every push Signing basics — keystores and provisioning profiles Store submission overview — Play Store and App Store requirements Android: Building a Release APK Debug vs Release So far, we have been building debug APKs with ./gradlew :composeApp:assembleDebug. Debug builds are not optimized and include debugging tools. For publishing, you need a release build. ...

April 6, 2026 · 9 min

KMP Tutorial #17: Building the UI Layer — Compose + SwiftUI with Shared ViewModel

In the previous tutorial, we built the shared data layer with Ktor, SQLDelight, and offline-first sync. The data layer works, but the UI is basic. You can only see a list of notes with a “+” button that creates placeholder notes. In this tutorial, we build a proper UI layer. You will add navigation between screens, a note editing screen with a color picker, pull-to-refresh sync, and loading and error states. All of this works on both Android (Compose) and iOS (SwiftUI). ...

April 6, 2026 · 14 min