Skip to content

feat: add storm-ktor-koin module bridging repositories into Koin#171

Merged
zantvoort merged 1 commit into
mainfrom
feat/ktor-koin-module
Jul 4, 2026
Merged

feat: add storm-ktor-koin module bridging repositories into Koin#171
zantvoort merged 1 commit into
mainfrom
feat/ktor-koin-module

Conversation

@zantvoort

Copy link
Copy Markdown
Collaborator

Summary

New optional module storm-ktor-koin for Ktor applications that use Koin for dependency injection.

  • Application.stormModule() returns a Koin Module exposing the ORMTemplate and every repository the Storm plugin auto-registered from the compile-time index, each bound under its own interface type.
  • Services declare repositories as plain constructor parameters and wire with Koin's constructor DSL: install(Koin) { modules(stormModule(), module { singleOf(::OrderService) }) }.
  • Depends on koin-core 4.0.4 (Kotlin 2.0-compatible); koin-ktor is test-scope only, so the module does not impose the Koin Ktor plugin flavor on consumers.
  • Registered in the parent aggregator and the BOM.

Docs

  • docs/ktor-integration.md: the Koin section now leads with stormModule(); installation section mentions the artifact.
  • Skills (storm-setup, storm-repository-kotlin, storm-demo) and the Exposed/Ktor tutorial updated; llms-full.txt regenerated.
  • The storm-example-kotlin-ktor example project has been converted to Koin wiring and verified live against PostgreSQL (all routes 200).

Tests

StormKoinTest verifies repository resolution by interface type, constructor-DSL service wiring, and direct ORMTemplate access, against H2 with a kapt-generated type index.

stormModule() returns a Koin module exposing the ORMTemplate and every
repository auto-registered by the Storm plugin, each bound under its own
interface type, so services declare repositories as constructor parameters
and wire with Koin's constructor DSL (singleOf).

Includes docs, skills, and tutorial updates.
@zantvoort zantvoort merged commit ea5b52b into main Jul 4, 2026
7 checks passed
@zantvoort zantvoort deleted the feat/ktor-koin-module branch July 4, 2026 14:38
@zantvoort zantvoort added this to the 1.12.0 milestone Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant