Android Werewolf game narrator app built with Kotlin, Jetpack Compose, Hilt, and a clean architecture approach. The app guides a full game of Loup-Garou with spoken narration in French.
- End-to-end game flow: setup, role reveal, night, day, vote, hunter revenge, and game over
- French text-to-speech narration for all phases
- Role assignment and night actions (voyante, loups-garous, sorciere)
- Voting and win condition resolution
- Offline persistence via Room (game state + players)
- Modern Compose UI with animated transitions and themed visuals
Clean architecture with a strict dependency chain:
ViewModel -> Use Cases -> Repository -> Local Data Source (Room)
Key elements:
domain/contains game models, use cases, and domain services (GameNarrator)data/contains Room entities/DAO, mappers, andGameStateLocalDataSourcerepository/persists and exposes the currentGameStateasStateFlowui/holds Compose screens and viewmodels- Narration layering:
NarrationTextsProvider(domain) ->NarrationTextsLocalDataSource(data)GameNarratorbuilds narration from stateNarrator(domain) ->NarrationService(Android TTS)
State is split for clarity:
GameState.day(DayState): day number, votes, hunter revenge flagGameState.night(NightState): current night step, werewolf target
./gradlew assembleDebugInstall the APK:
app/build/outputs/apk/debug/app-debug.apk
- Add players on the setup screen.
- Configure roles and confirm.
- Reveal roles one by one.
- Night phase: handle seer, werewolves, and witch actions.
- Day phase: announcement, debate, vote, and possible hunter revenge.
- Repeat night/day until a win condition is reached.
- Start a new game from the game over screen.
./gradlew assembleDebug # Build debug APK
./gradlew test # Run unit tests
./gradlew connectedAndroidTest # Run instrumented tests
./gradlew lint # Run Android lint- Kotlin 2.0, Jetpack Compose, Material 3
- Hilt for DI
- Room for local persistence
- Kotlinx Serialization for role persistence
- Coroutines + StateFlow
- Android TextToSpeech (French locale)