kotlin-ktor-patterns
Ktor server patterns including routing DSL, plugins, authentication, Koin DI, kotlinx.serialization, WebSockets, and testApplication testing. Use when building a Ktor server — routing, plugins, auth, DI, serialization, or tests.
Target: Software development & testing. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original English text
Topics in the source
- Ktor Server Patterns
- When to Activate
- Application Structure
- Standard Ktor Project Layout
- Application Entry Point
- Routing DSL
- Basic Routes
- Route Organization with Authenticated Routes
Comprehensive Ktor patterns for building robust, maintainable HTTP servers with Kotlin coroutines. Building Ktor HTTP servers Configuring Ktor plugins (Auth, CORS, ContentNegotiation, StatusPages) Implementing REST APIs with Ktor Setting up dependency injection with Koin Writing Ktor integration tests with testApplication Working with WebSockets in Ktor | Pattern | Description | |---------|-------------| | route("/path") { get { } } | Route grouping with DSL | | call.receive () | Deserialize request body | | call.respond(status, body) | Send response with status | | call.parameters["id"] | Read path parameters | | call.request.queryParameters["q"] | Read query parameters | | install(Plugin) { } | Install and configure plugin | | authenticate("name") { } | Protect routes with auth | | by inject () | Koin dependency injection | | testApplication { } | Integration testing | Remember: Ktor is designed around Kotlin coroutines and DSLs. Keep routes thin, push logic to services, and use Koin for dependency injection. Test with testApplication for full integration coverage.
- Source repository
- affaan-m/ECC
- Source file
- pi/core/skills/kotlin-ktor-patterns/SKILL.md
- Fixed revision
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T15:01:43.063Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.