Sample — Task Tracker
This sample demonstrates Kiln in a realistic multi-table scenario. It covers entity relationships, reactive observation, cross-table data loading, and DSL queries.
Scenario
A project management app with three tables and two one-to-many relationships:
- A Project is a top-level container.
- A Task belongs to a project. Tasks have a priority, status, and an optional due date.
- A ChecklistItem belongs to a task. A task can have any number of checklist items.
What this sample covers
| Page | Demonstrates |
|---|---|
| Entity Definitions | Three @DbEntity classes with @Column(index = true) on FK columns |
| Initialization | One driver, three repositories, createTable() at startup |
| CRUD Operations | insert, update, delete, findById, findAll |
| Reactive Queries | observeAll() wired into StateFlow via stateIn |
| Cross-table Loading | Store class coordinating multiple repositories |
| DSL Queries | Compound predicates, inList, count, deleteWhere |