Architecture
Contracts split from implementations, a platform built from independently-versioned modules, wiring written at compile time, and infrastructure you reach through interfaces — not products. The same shape, in every subsystem.
Core & implementation
Every domain is a pair. core-<name> holds the interfaces and models — pure contracts, nothing infrastructural. <name> holds the repositories, controllers, and services that implement them. Anything downstream depends only on the core, so subsystems talk to each other through service interfaces, never each other's internals.
core-content/ # contracts
ContentService.kt # interface
Content.kt # model
content/ # implementation
ContentServiceImpl.kt
ContentRepository.kt
ContentController.ktModular & versioned
Bosca is a set of independently-versioned modules, published as artifacts. A running service is composed from the ones it needs. Each module carries its own repositories, services, and controllers, and their wiring is generated at build time — you add your feature as a module in the same shape, depending on the contracts you build against.
dependencies {
implementation("io.bosca:core-content")
implementation("io.bosca:core-workops")
}Code generation
Annotation processors read your repositories, services, controllers, and jobs and emit real Kotlin into the build output — the JDBC calls, the dependency graph, the controller dispatch, the route handlers. It's generated by the build and never checked in, so what runs is ordinary code with no runtime reflection.
TaskRepositoryImpl.kt # JDBC
TaskControllerWiring.kt # GraphQL
RouteHandlers.kt # REST
JobExecutors.kt # jobsInfrastructure
Domain code never names a cache, a broker, or a queue product. It uses an interface; configuration decides the backend. Operational data lives in PostgreSQL, on a bounded pool that runs JDBC on virtual threads — and because job enqueueing is tied to the transaction, work is only queued once the data that triggered it has committed.
One codebase, many roles
The same platform runs as more than one service — a GraphQL and REST API, a background runner for jobs and events, the analytics collector and processor, the Git server, the artifacts registry, and the Kubernetes controller. Each runs only the part of the platform its role needs, from the one shared codebase.
Keep exploring