Welcome to the ZenFlow project! You have been hired to finish building a mindfulness application. The UI design team has provided the assets, and the System Architect has laid out the structure (Hilt, Room, MVVM), but the core logic and implementation details are missing.
Your goal is to make this app functional, robust, and creative.
- Kotlin
- Jetpack Compose (UI)
- Room (Local Database)
- Hilt (Dependency Injection)
- WorkManager (Background Tasks)
- Coroutines & Flow
- File:
data/JournalDao.kt- Write the SQL query to retrieve all journal entries.
- Write the SQL query to check if an entry exists between two timestamps (
hasEntryBetween).
- File:
data/RoomJournalRepository.kt- Implement
hasEntryForToday(): Calculate the start/end timestamps for the current day and query the DAO. - Implement
addEntry()andgetAllEntries().
- Implement
- File:
di/AppModule.kt- Provide the
ZenFlowDatabaseinstance usingRoom.databaseBuilder. - Provide the
JournalDaoinstance.
- Provide the
- File:
ui/home/HomeScreen.kt- Design a dashboard. It must show a greeting, the date, and navigation buttons.
- Challenge: Make the greeting dynamic based on the time of day.
- File:
ui/breathing/BreathingScreen.kt- Create a custom animation that expands (Inhale), holds, and shrinks (Exhale).
- Use
animateFloatAsStateor similar APIs.
- File:
ui/journal/JournalScreen.kt- Build an Input area (TextField + Button) and a List area (LazyColumn) to display database entries.
- Connect the UI to the
JournalViewModel.
- File:
worker/ReminderWorker.kt- Implement logic to check if the user has journaled today.
- If not, trigger a Notification.
- Note: Handle Android O+ Notification Channels.
- File:
ZenFlowApp.kt- Schedule the
ReminderWorkerto run periodically (e.g., every 24 hours).
- Schedule the
- File:
AndroidManifest.xml&MainActivity.kt- Add the
POST_NOTIFICATIONSpermission. - Request runtime permissions in
MainActivityfor Android 13+.
- Add the
- Clone the repo.
- Open in Android Studio.
- Sync Gradle (Hilt might complain until you fix
AppModule.kt). - Search for
// TODOin the project view to find your tasks.
Good luck!