| Area | Technology |
|---|---|
| Language | Kotlin 2.2.10 |
| UI | Jetpack Compose + Material 3 |
| State | ViewModel + StateFlow + Coroutines |
| Persistence | Room + DataStore |
| Dependency injection | Koin 4.0.2 |
| Background work | WorkManager |
| Tests | JUnit, Robolectric, Compose UI tests, Roborazzi |
CodePet is a single-module Android app under :app. Sources live in app/src/main/java/com/tamagotchi/code and the application id is com.tamagotchi.code.
SplashActivityshows the intro and launchesMainActivity.CodeTamagotchiAppstarts Koin, notification channels, WorkManager jobs and widget updates.MainActivityis Compose-only and callsAppNavigation.
User -> Composable screen -> PetViewModel -> Repository -> DAO -> Room
^ |
+---------- StateFlow ---------+
app/src/main/java/com/tamagotchi/code/
βββ data/ static content, Room, repositories
βββ di/ Koin module
βββ feature/ screens by feature area
βββ navigation/ AppNavigation and route constants
βββ ui/components/ Codey, cards, backgrounds and shared UI
βββ ui/theme/ theme definitions and Material setup
βββ ui/viewmodel/ PetViewModel
βββ util/ calculators, workers and sound helpers
βββ widget/ launcher widget provider and worker
The graph is intentionally small: database, DAO, repositories and PetViewModel are registered in di/AppModule.kt.
PetViewModel owns the persistent game behavior so feature screens stay thin and call into one shared state holder.