Skip to content

Add Casino Engine to CQRS Samples#143

Open
nekzabirov wants to merge 1 commit into
mehdihadeli:mainfrom
nekzabirov:add-casino-engine-cqrs
Open

Add Casino Engine to CQRS Samples#143
nekzabirov wants to merge 1 commit into
mehdihadeli:mainfrom
nekzabirov:add-casino-engine-cqrs

Conversation

@nekzabirov
Copy link
Copy Markdown

Summary

Adds nekzabirov/IGaming-Game-Engine to docs/cqrs.md → Samples.

Why this fits the CQRS section

Casino Engine is a production-grade open-source iGaming/casino engine in Kotlin/Ktor with a real CQRS bus implementation:

  • `ICommand` / `IQuery` interfaces; commands return `Result` (wrapped in `runCatching`), queries return `R` directly
  • Handlers register as Koin beans with a marker `bind CqrsHandler::class`; `BusImpl` calls `getAll()` and resolves the generic type argument with Kotlin reflection — adding a new handler is one Koin line, the bus module never changes
  • Polymorphic handler resolution: a handler `SetImageCommandHandler : ICommandHandler<SetImageCommand, Unit>` automatically serves concrete subtypes via class-hierarchy walk
  • Read-side view types are top-level data classes co-located with their query files (`CollectionView` next to `FindCollectionQuery.kt`) — no separate `projection/` package

The current samples section is .NET-heavy; this adds a non-trivial Kotlin/Ktor CQRS reference.

Production-tested on moonbet.casino and 2k.ua. Apache 2.0.

Checklist

  • Separate PR for this category (hexagonal-architecture is a separate PR)
  • Format matches: `user/repo - Description`
  • Meaningful description

Production iGaming engine in Kotlin/Ktor with CQRS bus and
auto-discovered handlers via Koin reflection.

Link: https://github.com/nekzabirov/IGaming-Game-Engine
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