Show HN: Mosaic – A Kotlin framework for cleaner back end code
21 hours ago
- #Kotlin
- #Backend Development
- #Composable Architecture
- Mosaic is a Kotlin framework for backend development using composable tiles.
- Tiles handle caching, concurrency, and dependency resolution automatically.
- Features include type-safe composition, zero duplication, and out-of-the-box concurrency.
- Supports natural testability with isolated tile testing.
- Response-first design focuses on building what you need.
- Gradle dependency: `org.buildmosaic:mosaic-core:0.2.0`.
- Example tiles include `CustomerTile`, `OrderSummaryTile`, and `PaymentProcessorTile`.
- Canvas provides hierarchical dependency injection for clean separation of concerns.
- MultiTile abstracts batching strategies for efficient data fetching.
- Testing is simplified with mock tiles and isolated composition testing.
- Integration examples provided for Spring Boot, Ktor, and Micronaut.
- Ideal for high-performance APIs, complex backend orchestration, and microservices.