A beautiful, lightweight Android app built with 100% Kotlin and Jetpack Compose that displays motivational quotes and lets you save your favorites.
- Modern UI - Built with Jetpack Compose and Material Design 3
- Offline Support - Works without internet using Room database
- Favorites System - Save and manage your favorite quotes
- Share Functionality - Share quotes via email, messaging apps, and more
- Dark/Light Theme - Automatic theme support based on system settings
- Clean Architecture - MVVM pattern with proper separation of concerns
- Language: Kotlin
- UI Framework: Jetpack Compose
- Architecture: MVVM (Model-View-ViewModel)
- Database: Room Persistence Library
- Async: Kotlin Coroutines & Flow
- Minimum API Level: 24 (Android 7.0+)
- Target API Level: 34 (Android 14)
src/main/
├── kotlin/com/example/dailymotivation/
│ ├── MainActivity.kt # App entry point and navigation
│ ├── ui/
│ │ ├── screens/
│ │ │ ├── HomeScreen.kt # Quote display screen
│ │ │ └── FavoritesScreen.kt # Favorites list screen
│ │ └── theme/
│ │ ├── Color.kt
│ │ ├── Theme.kt
│ │ └── Type.kt
│ ├── viewmodel/
│ │ └── QuoteViewModel.kt # Business logic & state management
│ └── data/
│ ├── model/
│ │ └── Quote.kt
│ ├── database/
│ │ ├── QuoteEntity.kt
│ │ ├── QuoteDao.kt
│ │ └── QuoteDatabase.kt
│ └── repository/
│ └── QuoteRepository.kt # Data layer abstraction
- Displays today's quote (selected by day of year)
- Shows quote text and author attribution
- Heart button to toggle favorite status
- Share button to send quote via system intent
- Fallback to random quote selection
- Displays all saved quotes in a scrollable list
- Each quote shown in a Material Card
- Delete button to remove quotes from favorites
- Empty state message when no favorites exist
- Room Database: Persists quotes and favorite status locally
- DAO: Direct access objects for database queries
- Repository: Abstraction layer for data access
- Seed Data: Pre-loaded with 10 motivational quotes
- StateFlow: Reactive state management
- ViewModel: Survives configuration changes
- Coroutines: Async database operations on IO dispatcher
- Android Studio (2023.1 or later)
- Android SDK 34
- Kotlin 1.9+
- Gradle 8.0+
-
Clone the repository:
git clone https://github.com/DEVE123-dev/Daily-Motivation-App.git cd Daily-Motivation-App -
Open in Android Studio:
- File → Open → Select the project directory
- Wait for Gradle sync to complete
-
Build the project:
./gradlew build
-
Run on emulator or device:
./gradlew installDebug
- View Today's Quote: Open the app to see a featured quote
- Save to Favorites: Tap the heart icon to save the quote
- Share a Quote: Tap the share button to send the quote to others
- View Favorites: Tap the "Favorites" tab to see all saved quotes
- Remove from Favorites: In the Favorites tab, tap the delete icon
Edit src/main/kotlin/com/example/dailymotivation/ui/theme/Color.kt:
val Purple80 = Color(0xFFD0BCFF) // Change these color values
val PurpleGrey80 = Color(0xFFCCC2DC)Edit src/main/kotlin/com/example/dailymotivation/data/repository/QuoteRepository.kt:
private val seedQuotes = listOf(
Quote(11, "Your new quote here.", "Author Name"),
// Add more quotes...
)- androidx.core:core-ktx:1.12.0
- androidx.lifecycle:lifecycle-runtime-ktx:2.6.2
- androidx.activity:activity-compose:1.8.1
- androidx.compose.material3:material3
- androidx.room:room-runtime:2.6.1
- androidx.navigation:navigation-compose:2.7.5
- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3
Basic test dependencies included:
- JUnit 4 for unit testing
- Espresso for UI testing
- Compose test utilities
- Daily notifications with new quotes
- API integration for fresh quotes
- Screen transitions and animations
- Quote categories/filtering
- Search functionality
- Export favorites as PDF
- Quote of the Day widget
- Cloud sync with Firebase
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
For issues and questions, please open a GitHub Issue.
Built using Kotlin and Jetpack Compose