A native Android study companion with uninterruptible focus sessions, intelligent app blocking, and detailed productivity analytics.
MindVault is an Android app designed for students who need enforced focus during study sessions. Once a focus session starts, it locks the device into a distraction-free state that cannot be interrupted until the timer completes. The app pairs this core mechanic with detailed study analytics, smart notifications, and cloud backup via Firebase.
| Feature | Description |
|---|---|
| Uninterruptible Focus Mode | Full-screen lock with foreground service, wake lock, and overlay protection. Once started, a session cannot be bypassed. |
| App Blocking | Accessibility service monitors and blocks distracting apps during active sessions |
| Smart Scheduling | Configurable study/sleep windows with automatic session availability detection |
| Productivity Analytics | Pie charts, weekly screen-time breakdowns, streak tracking, and session history |
| Achievement System | Gamified milestones to reward consistent study habits |
| Cloud Sync | Firebase Auth + Firestore for cross-device backup and profile management |
| Daily Motivation | Scheduled motivational notifications via WorkManager |
| Security | App-level password protection and developer settings guard |
graph TB
subgraph Presentation["UI Layer β Jetpack Compose"]
MA[MainActivity]
FM[FocusModeSetupActivity]
SA[StatisticsActivity]
PA[ProfileActivity]
LA[LoginActivity]
end
subgraph Domain["ViewModel + Logic"]
VM[FocusModeSetupViewModel]
SM[StatisticsManager]
PM[PermissionManager]
AM[AppManager]
end
subgraph Data["Data Layer"]
DS[FocusDataStore β Preferences]
RM[Room Database β Sessions]
FS[Firebase Auth + Firestore]
APM[AppPasswordManager]
end
subgraph Services["Background Services"]
FG[FocusAccessibilityService]
NL[NotificationListenerService]
WM[WorkManager β Reminders & Backup]
BR[BootReceiver]
end
MA --> VM --> DS
MA --> SM --> RM
SA --> SM
PA --> FS
LA --> FS
FM --> VM
VM --> AM
FG --> AM
WM --> FS
BR --> WM
| Layer | Technology |
|---|---|
| Language | Kotlin |
| UI | Jetpack Compose, Material Design 3 |
| Architecture | MVVM with ViewModel + StateFlow |
| Local Storage | Room (sessions), DataStore (preferences) |
| Cloud | Firebase Auth, Firestore (sync & backup) |
| Background | Foreground Service, AccessibilityService, WorkManager |
| Auth | Google Sign-In via Credential Manager |
| Image Loading | Coil |
| Serialization | Gson |
| Build | Gradle KTS with version catalogs |
mindvault/
βββ app/src/main/java/com/example/mindvault/
β βββ MainActivity.kt # Main entry, home screen, navigation
β βββ MindVaultApplication.kt # Application class, dependency setup
β βββ AppBlockedActivity.kt # Overlay shown when blocked app is opened
β βββ BootReceiver.kt # Re-schedule workers on device restart
β β
β βββ data/
β β βββ FocusDataStore.kt # DataStore preferences wrapper
β β βββ FocusSession.kt # Room entity + DAO
β β βββ StatisticsManager.kt # Aggregation logic for analytics
β β βββ AuthManager.kt # Firebase Auth wrapper
β β βββ UserManager.kt # Firestore user profile CRUD
β β βββ AppPasswordManager.kt # Encrypted app lock
β β βββ BackupSyncWorker.kt # Periodic Firestore sync via WorkManager
β β
β βββ model/
β β βββ FocusModels.kt # Domain models and enums
β β
β βββ notifications/
β β βββ NotificationHelper.kt # Channel setup + notification builder
β β βββ FocusReminderScheduler.kt # Schedule daily study reminders
β β βββ FocusReminderWorker.kt # WorkManager worker for reminders
β β βββ MotivationScheduler.kt # Schedule motivational quotes
β β βββ DailyMotivationWorker.kt # WorkManager worker for motivation
β β
β βββ services/
β β βββ FocusAccessibilityService.kt # Monitors and blocks apps
β β βββ FocusNotificationListenerService.kt # Manages notification suppression
β β
β βββ ui/
β β βββ FocusModeSetupActivity.kt # Session configuration screen
β β βββ FocusModeSetupViewModel.kt # ViewModel for focus setup
β β βββ LockScreenActivity.kt # Full-screen lock during sessions
β β βββ StatisticsActivity.kt # Analytics dashboard
β β βββ ProfileActivity.kt # User profile management
β β βββ LoginActivity.kt # Firebase auth flow
β β βββ AchievementsActivity.kt # Gamified milestones
β β βββ SecurityActivity.kt # App lock settings
β β βββ PieChartComponents.kt # Custom Compose chart components
β β βββ PremiumAnalyticsComponents.kt # Analytics card composables
β β βββ WeeklyComponents.kt # Weekly breakdown UI
β β βββ WeeklyScreenTimeChart.kt # Screen time visualization
β β βββ theme/ # Material 3 color, type, theme
β β
β βββ utils/
β βββ AppManager.kt # App list and blocking logic
β βββ OverlayBlocker.kt # System overlay protection
β βββ PermissionManager.kt # Runtime permission handling
β βββ UsageStatsHelper.kt # Android UsageStats API wrapper
β
βββ build.gradle.kts # App-level build config
βββ settings.gradle.kts # Project settings
βββ gradle/ # Gradle wrapper + version catalog
- Android Studio Ladybug (2024.2) or newer
- JDK 11+
- Android SDK 36 (compile) / 28 (min)
- A Firebase project with Auth and Firestore enabled
git clone https://github.com/WelcomeLegend-Git/mindvault.git
cd mindvault- Create a Firebase project at console.firebase.google.com
- Add an Android app with package name
com.example.mindvault - Download
google-services.jsonand place it inapp/ - Enable Authentication (Google Sign-In) and Firestore Database
./gradlew assembleDebugOr open the project in Android Studio and click Run.
| Permission | Purpose |
|---|---|
SYSTEM_ALERT_WINDOW |
Overlay to block apps during focus sessions |
FOREGROUND_SERVICE |
Persistent focus session timer |
WAKE_LOCK |
Prevent device sleep during sessions |
ACCESSIBILITY_SERVICE |
Monitor and intercept app launches |
NOTIFICATION_LISTENER |
Suppress distracting notifications |
USAGE_STATS |
Screen time analytics |
RECEIVE_BOOT_COMPLETED |
Reschedule workers after restart |
This project is licensed under the MIT License.