nicusX/kotlin-event-sourcing-example
59.1
Adequate · 21 September 2026
1.1k
lines of production code
Kotlin
primary language
4
measurements over time
What this system is
This system is a Kotlin-based Spring Boot application that implements an event-sourced architecture for managing training classes and students. It exposes a REST API to handle student registration, class scheduling, and enrollment operations, enforcing business rules like email uniqueness and capacity limits. The implementation relies on an in-memory event store and read models to support both command and query operations, with comprehensive test coverage for the controllers.
Features
Initial implementation of the event-sourcing domain and API layer
The application now supports managing training classes and students through a command-driven, event-sourced architecture. Users can register new students, schedule new classes, and enroll or unenroll students in classes via REST controllers. The system enforces business rules such as email uniqueness and class capacity limits, using an in-memory event store and message bus for internal communication. Read models for students and classes are maintained to support query operations.
src/main · high confidence
Initial project scaffolding and build configuration
The repository now includes standard project configuration files to support development and continuous integration. A .gitignore file is added to exclude IDE-specific files, build artifacts, and OS-specific metadata. A .travis.yml file configures the Travis CI pipeline to run Java 8 tests using Gradle. Additionally, the Gradle wrapper scripts (gradlew and gradlew.bat) are included to ensure consistent build execution across environments.
(repo-wide) · high confidence
Behavioural changes
Added Gradle wrapper configuration
The project now includes a Gradle wrapper configuration file (gradle-wrapper.properties) that specifies Gradle version 5.4.1. This ensures consistent build environments by allowing the project to download and use a specific version of the Gradle build tool automatically.
gradle · high confidence
Test coverage
Added tests for student and training class command and read controllers
Added integration and unit tests for the Student and TrainingClass command and read controllers, including end-to-end scenarios for student registration, class scheduling, enrollment, and unenrollment. The tests verify correct HTTP status codes (202, 404, 409, 422, 422), header values, and JSON response bodies for both happy and unhappy paths, including duplicate email and concurrent change detection.
src/test · high confidence
Dependencies
Initial project setup with Spring Boot, Kotlin, and Arrow-KT
The project is initialized with a new build configuration using Spring Boot 2.1.6 and Kotlin 1.3.41. The setup includes dependencies for Spring Web, Jackson Kotlin support, and Kotlin coroutines (version 1.3.0-RC). Additionally, the Arrow-KT library (version 0.9.0) is added to the classpath, and the project is named 'kotlin-event-sourcing-example'.
(dependencies) · medium confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 66 → 59 (-6.5)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 96 (-4.4)
- Architecture 69 → 69 (+0.0)
- Maturity 77 → 77 (+0.0)
- Readiness 50 → 39 (-10.3)
- Security 100 → 100 (+0.0)
- Domain Modelling 100 → 80 (-20.2)
Resolved (6)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- No exposed public API
- Test reliability not included
- early-stage repository — too little history to judge knowledge freshness
- single-maintainer — knowledge-concentration (bus factor) risk
New (19)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Documentation: no contributor guidance (README.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no licence statement (README.md)
- Documentation: no usage examples (README.md)
- No dependency advisory monitoring
- Repeated repair: src/main/kotlin/eventsourcing/readmodels/trainingclasses/TrainingClassProjection.kt (src/main/kotlin/eventsourcing/readmodels/trainingclasses/TrainingClassProjection.kt)
- TodoComment (src/main/kotlin/eventsourcing/api/StudentCommandController.kt)
- TodoComment (src/main/kotlin/eventsourcing/api/StudentReadController.kt)
- TodoComment (src/main/kotlin/eventsourcing/api/TrainingClassCommandController.kt)
- TodoComment (src/main/kotlin/eventsourcing/api/TrainingClassReadController.kt)
- TodoComment (src/main/kotlin/eventsourcing/domain/Commands.kt)
- TodoComment (src/main/kotlin/eventsourcing/domain/Commands.kt)
- TodoComment (src/main/kotlin/eventsourcing/domain/Events.kt)
- TodoComment (src/main/kotlin/eventsourcing/domain/RegisteredEmailsIndex.kt)
- TodoComment (src/main/kotlin/eventsourcing/domain/Student.kt)
- TodoComment (src/main/kotlin/eventsourcing/readmodels/studentdetails/StudentDetailsReadModel.kt)
- TodoComment (src/main/kotlin/eventsourcing/readmodels/trainingclasses/TrainingClassProjection.kt)
- TodoComment (src/test/kotlin/eventsourcing/end2end/BaseE2EJourneyTest.kt)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
nicusX/kotlin-event-sourcing-example was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 0a231308eb6bd9ad04abbe14aea30e710d075012 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.