feat: add storm-ktor-koin module bridging repositories into Koin#171
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New optional module
storm-ktor-koinfor Ktor applications that use Koin for dependency injection.Application.stormModule()returns a KoinModuleexposing theORMTemplateand every repository the Storm plugin auto-registered from the compile-time index, each bound under its own interface type.install(Koin) { modules(stormModule(), module { singleOf(::OrderService) }) }.koin-core4.0.4 (Kotlin 2.0-compatible);koin-ktoris test-scope only, so the module does not impose the Koin Ktor plugin flavor on consumers.Docs
docs/ktor-integration.md: the Koin section now leads withstormModule(); installation section mentions the artifact.storm-setup,storm-repository-kotlin,storm-demo) and the Exposed/Ktor tutorial updated;llms-full.txtregenerated.storm-example-kotlin-ktorexample project has been converted to Koin wiring and verified live against PostgreSQL (all routes 200).Tests
StormKoinTestverifies repository resolution by interface type, constructor-DSL service wiring, and directORMTemplateaccess, against H2 with a kapt-generated type index.