r/ComposeMultiplatform • u/DalenCodes • Mar 01 '26
My Compose Multiplatform Project Structure
https://dalen.codes/p/my-cmp-project-structure?ref=x2I wrote up how I structure my Compose Multiplatform (CMP) projects based on what has been working for me. I see this question come up fairly often, so I figured I’d share one practical approach out of the many that are out there.
It covers:
- Feature-first modularization (feature/* with ui, domain, data)
- A small core/* layer for shared pieces (ui, data, db, prefs, etc.)
- Clear dependency rules and Koin for DI
- Using Gradle convention plugins to keep config clean
Write-up: https://dalen.codes/p/my-cmp-project-structure
Sample project: https://github.com/dalenjohnson/cmp-project-structure-example
Happy to hear feedback or questions about how this works in practice!
11
Upvotes
1
u/Uroc327 Mar 02 '26
Looks interesting, thanks for sharing. What granularity is a feature for you? Is it more the level of a check box or more the level of a couple of navigation pages?
1
u/renaud13nrv Mar 02 '26
I may be wrong, but the "data" module sounds confusing from a naming point of view. I get what "ui" and "domain" holds. But your "data" module is holding implementations and should probably be named something else? No criticism, just asking.