Stage 5 track

Track: Backend/Ktor-adjacent

Who it's for: you've finished Stages 1–3 (comfortable with classes, sealed results, Gradle, coroutines) and want to build the services and REST APIs behind websites and apps on the JVM, as a backend engineer.

Learn (in order): a Ktor project from the official project generator or Gradle plugin → routing and request/response handling (routing { get("/...") { ... } }) → kotlinx.serialization for JSON request/response bodies, replacing the by-hand |-delimited parsing Stages 1–3 used → structured error handling as proper HTTP status codes, the server-side cousin of this course's sealed result types (Stage 2, Part 9) → database access via Exposed, or a plain JDBC driver over the same Connection-handed-in pattern Stage 2's library project used for its flat files → authentication (a JWT or session-based login) → coroutines in a server context, since every Ktor route handler is already a suspend function, the same vocabulary from Stage 3, Part 14, now serving concurrent requests instead of a CLI batch.

Capstone brief (to be written in full): a REST API with user registration/login, authenticated endpoints, and a persisted resource — plausibly a Ktor rebuild of Stage 2's library management system (books/members/loans over HTTP instead of a CLI), backed by a real database instead of flat files. Full user stories, milestones and an acceptance checklist will be added when this track's content wave begins.

What this brief does not claim: no Ktor project template, Gradle plugin, or database was installed or run while writing this course (see ../TOOLING.md) — unlike Stages 1–4, where every snippet was compiled and run for real, including Part 11's Gradle-less JUnit setup. Treat every detail above as a design-time plan, not a tested lesson, until the content wave installs and verifies a working Ktor project the same way TOOLING.md verified kotlinc, including an actual request against a running endpoint.

Official docs to use when this wave starts: https://ktor.io/docs/home.html, https://github.com/Kotlin/kotlinx.serialization, https://www.jetbrains.com/help/exposed/home.html, https://ktor.io/docs/server-authentication.html

Search the guide