Hey everyone :wave: I've been working on Kotauth, ...
# feed
a
Hey everyone 👋 I've been working on Kotauth, a self-hosted identity server (OAuth 2.0 / OpenID Connect, MFA, multi-tenancy, RBAC) built entirely in Kotlin with Ktor. Just hit v1.3.3 and wanted to share it with the community that made the stack possible. GitHub: https://github.com/inumansoul/kotauth Live demo: https://demo.kotauth.com Docs: https://docs.kotauth.com A few things that might interest this community: The domain layer has zero framework imports. Hexagonal architecture taken seriously: models, ports, and services are pure Kotlin. Sealed
Result
types for all business logic,
@JvmInline value class
IDs for type safety (
UserId
,
TenantId
, etc.), and every port has an in-memory
Fake
for testing. Domain tests run in milliseconds with no database, no HTTP, no Docker. The frontend is deliberately simple. The admin console, auth screens, and user portal are all
kotlinx.html
DSL + a BEM design system (~5,500 lines of CSS with custom properties for per-tenant theming). Interactivity is htmx + ~830 lines of vanilla JS. CSS compiled by LightningCSS, JS bundled by esbuild with SRI hashes. No React, no SPA, no hydration, and it still looks modern. I strongly believe auth server UIs don't need to be overcomplicated. Performance first, always. MCP support for AI agents. Recently published
@kotauth/mcp
on npm — a Model Context Protocol server that wraps the REST API with 21 tools for managing users, roles, groups, sessions, and audit logs. This makes Kotauth the first self-hosted IAM that AI agents (Claude, Cursor, etc.) can operate natively. Built in TypeScript since MCP SDK is TS-native, but it talks to the same Kotlin-powered API. What's next — and where KMP comes in. The roadmap includes a Kotlin JVM SDK (
kotauth-sdk-jvm
) that extracts our pure domain models into a typed client library with sealed results. After that, Kotlin Multiplatform to compile the same SDK to JVM, JS, and Native — one codebase, every platform. No auth provider has this today. Long-term, looking at GraalVM native image for sub-100ms cold starts. The whole thing is MIT licensed, runs with a single
docker compose up
, and has 29 Flyway migrations, 22 route files, 27 port interfaces. If you're into Ktor patterns, hexagonal architecture in Kotlin, or just want to poke around a non-trivial Kotlin codebase, I'd love your feedback. Come take a look 🙌
💪 1
s
Is there any particular reason to use outdated versions of Kotlin & Ktor?
a
Not specially, this started as an investigation with a very basic MVP with those versions and by the time I realize I already build may things, but the update plan is on my to-do list already