Tasksv2.1.0
A local-first task manager with Pomodoro focus sessions, categories, reminders, and dynamic theming.
A sleek, modern task manager for Android
Tasks is designed to help you stay organized, focused, and achieve your goals. It features Pomodoro-style focus sessions, category management, smart reminders, and full System, Light, and "Deep Sea" Dark theme support — all wrapped in a polished Material 3 experience. Built entirely with modern Jetpack Compose, backed by a clean MVVM + Repository architecture with Room and DataStore persistence.
Focus Sessions
Pomodoro-style timer with customizable durations (15m, 25m, 45m, 60m) for deep-work productivity.
Category Management
Pre-populated categories (Study, Work, etc.) with the ability to add and safely delete custom ones.
Tasks is engineered around a strict separation of concerns so it stays scalable and testable. StateFlow-driven ViewModels keep a single source of truth, clean repository interfaces abstract the data sources, and Room plus DataStore handle local persistence for tasks and preferences.
Key Features
- Effortlessly create, edit, and delete tasks with a clean UI
- Global search and category-based filtering
- Pomodoro-style Focus Sessions (15m, 25m, 45m, 60m)
- Live profile stats: Created, Completed, Today's Wins
- System, Light, and "Deep Sea" Dark theme support
- Toggleable reminder notifications
- Pre-populated and custom category management
- Floating navigation bar with elevated FAB
- Custom animations and gradient backgrounds
Local-first choices that keep tasks safe
Tasks has no backend in its current source. That makes persistence, category deletion, and dependency wiring the decisions that matter most.
Seed categories in both migration and creation
- Context
- Existing installs and fresh installs both need the default category set before a task can be filed.
- Choice
- The v6 to v7 migration creates the Categories table and inserts Study, Work, Productive, Personal, and Important. Fresh databases run the same inserts in the Room onCreate callback.
- Trade-off
- The defaults are reliable on every install path, but changing them later needs another migration. INSERT OR IGNORE preserves any user edits.
Deleting a category keeps its tasks
- Context
- A category is an organisational label, not the task itself, so deleting one should not silently destroy work.
- Choice
- deleteCategoryAndMoveTasks first updates every task in the removed category to Personal, then deletes the category row.
- Trade-off
- No tasks disappear, but the reassignment is implicit and the task loses its original category.
Manual dependency injection
- Context
- The app is a single module with one Activity and a small repository set.
- Choice
- AppContainer exposes the Room-backed ToDoRepository and PreferenceRepository as lazily created singletons. ViewModels are built through AppViewModelProvider factories.
- Trade-off
- No annotation processor or generated graph, but the wiring is manual and there is no compile-time graph validation.
Local-only persistence
- Context
- The current source has no account system or network data source.
- Choice
- Tasks and categories live in Room. Preferences and focus statistics live in DataStore. Nothing is sent to a server.
- Trade-off
- The app is fast and works offline by construction, but there is no multi-device sync. Cloud sync is listed as roadmap, not shipped.
Flow from Room, StateFlow in ViewModels
- Context
- Task lists and categories change in the database and must update the interface without manual refresh.
- Choice
- DAOs return Flow. Repositories pass them through. ViewModels convert them to StateFlow with stateIn, including the Focus timer state combined with stored preferences.
- Trade-off
- Reactive updates come for free, but lifecycle and subscription management move into ViewModels.
Tasks, categories, and local state
Two Room tables hold the task data. Preferences and focus statistics live in DataStore, and the timer itself is runtime state rather than a database row.
| Entity | Important fields | Responsibility | Note |
|---|---|---|---|
| ToDoItemTasks | Fieldsid (Int, auto PK), title, description, category (default Personal), createdAt (LocalDateTime), isCompleted | ResponsibilityOne task row, ordered by completion state and creation time in the list query. | Notecategory is a string label, not a Room foreign key to Categories. |
| CategoryCategories | Fieldsname (String PK) | ResponsibilityThe available category names shown in the editor and filters. | NoteDeleting a category updates its tasks to Personal before the row is removed. |
| UserPreferencesDataStore | FieldsthemeMode, displayName, totalTasksCreated, smartRemindersEnabled, focusSessionsToday, lastFocusDate | ResponsibilityTheme, profile name, reminder settings, and focus statistics. | NoteStored separately from task data; focus counts reset by date. |
| DateConvertersRoom type converters | FieldsLocalDate, LocalTime, LocalDateTime <-> String | ResponsibilityConverts Java time values for SQLite storage and restores them safely. | NoteParsing is wrapped in runCatching and returns null for malformed values. |
| FocusUiStateruntime state (not persisted) | FieldstotalTimeSeconds, timeLeftSeconds, isRunning, selectedDuration, isSessionCompleted, sessionsCompletedToday | ResponsibilityTimer state exposed to the Focus screen, including the formatted time and progress. | NoteBuilt in FocusViewModel; only the completed-session count is written to DataStore. |