Skip to content

Ktor

Ktor is the Kotlin HTTP framework used by every Arda backend service (operations, accounts-component, and other future components). It runs the public HTTP API, the internal RPC surface, and the metrics / health endpoints.

  • Version: 3.1.1.
  • Engine: Netty in production; Jetty in tests.
  • Repositories: operations/, accounts-component/, common-module/.
  • One Ktor application module per service. Modules compose plugins rather than configure the application globally.
  • Content negotiation: kotlinx-serialization JSON. Custom serializers live in common-module.
  • Status pages: errors are mapped from the AppError sealed hierarchy — see Exception Handling.
  • Authentication: JWT validation via Cognito JWKS. Realms and scopes are documented in Realms, Scopes, Permissions.
  • Routing: typed routes; URL conventions in API Design.
  • Testing: testApplication { ... } for end-to-end route tests; ContainerizedPostgres test fixture for database-backed tests (see unit-tests-infra skill).
  • The kotlin-coding skill — language conventions that apply to all Ktor handlers (Result handling, AppError, formatting).
  • operations/CLAUDE.md — repo-specific conventions for the largest Ktor service.