I’ve spent part of my career working with enterprise systems like Oracle, SAP, 1C.
One thing they all have in common: you create a table, and if you don’t need heavy customization — you already get working forms for:
browsing lists
adding and editing records
marking for deletion
deleting or copying items
That always felt natural. You focus on your data and business logic, not on infrastructure.
The Android pain
When I switched to Android development, I ran into a wall.
Every time I wanted to try out a simple idea, I first had to:
define entities
write a DAO
add repositories
create a ViewModel
build forms in Compose
wire up navigation
It felt like I was writing scaffolding for days before I could even see my idea in action.
My attempt at solving this
That’s why I started working on a framework I call Compose Entity.
The concept is simple:
you define an entity,
and everything else — the SQLite table, DAO, repository, default form and navigation — is generated for you.
You can still customize forms with your own Composables if you want, but you don’t have to.
Example
@CeEntity(tableName = "person")
@CeGenerator(type = GeneratorType.Reference, generationLevel = GenerationLevel.UI,
hasDetails = true, detailsEntityClass = DetailsPersonInfo::class)
@CeCreateTable(tableName = "person")
data class RefPersones(
override var id: Long,
override var date: Long,
override var name: String,
override var isMarkedForDeletion: Boolean,
@CeField(type = FieldTypeHelper.NUMBER, label = "Age", placeHolder = "Select Age")
var age:Int,
@CeField(related = true, relatedEntityClass = RefGroupes::class, type = FieldTypeHelper.SELECT, extName = "groupe",
label = "Groupe", placeHolder = "Select Groupe of the person")
var groupeId: Long
): CommonReferenceEntity(id, date, name, isMarkedForDeletion){
override fun toString(): String {
return "$id: $name"
}
}
From just this definition, I immediately get a database table, DAO, repository, and a working UI form for add/edit/delete.
Migrations
This part was important to me.
In systems like Room, migrations can feel unpredictable.
So Compose Entity works like this:
new tables are created automatically,
changes to existing tables (adding/removing fields) require you to write your own ALTER TABLE.
It may sound like less automation, but the benefit is:
no surprises,
full control over how data evolves,
compile-time checks that entities always match the DB schema.
Why I’m sharing this
For me, this cuts down boilerplate by ~90%.
I can test an idea in minutes, not days.
It feels much closer to the workflow I loved in Oracle, SAP, and 1C.
I’m sharing it here because I want to hear feedback:
Do you think this approach makes sense?
Would you find it useful in your Android projects?
Or do you prefer writing everything manually for maximum control?
Create Android project with yours name and packaje: https://cetempl.homeclub.top/
Full example of Compose Entity based app: https://github.com/SergeyBoboshko/CePowerPaymentBook
Top comments (0)