# benji377/timety architecture

> Architecture diagram of the GitHub repository benji377/timety, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/benji377/timety
- Repository: https://github.com/benji377/timety

## Overview

Timety is an offline-first Android productivity app: people manage tasks, habits, focus sessions, goals, and daily ratings through a single Compose activity, with local Room storage and device notifications. Its broader documented capabilities include calendar views, analytics, tags, and backup/restore. The principal entry and timer paths are supported by excerpts; many feature screens and repository interactions are represented from the tree and README, so their internal call links are omitted where source evidence was not shown.

Main entry points: [`app/src/main/java/io/github/benji377/timety/ui/screens/MainScreen.kt`](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/MainScreen.kt) (Main navigation), [`app/src/main/java/io/github/benji377/timety/MainActivity.kt`](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/MainActivity.kt) (Main activity), [`app/src/main/java/io/github/benji377/timety/services/BackupService.kt`](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/services/BackupService.kt) (Backup and restore), [`app/src/main/java/io/github/benji377/timety/ui/screens/focus/FocusScreen.kt`](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/focus/FocusScreen.kt) (Focus sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_activity["Main activity<br/>[MainActivity.kt]"]
  node_mainui["Main navigation<br/>[MainScreen.kt]"]
end

subgraph group_work["Productivity workflows"]
  node_tasks["Task management<br/>[TaskListScreen.kt]"]
  node_recurring["Recurring tasks"]
  node_habits["Habit tracking<br/>[HabitListScreen.kt]"]
  node_goals["Goals<br/>[GoalsScreen.kt]"]
  node_focus["Focus sessions<br/>[FocusScreen.kt]"]
  node_focusvm["Focus state<br/>[FocusViewModel.kt]"]
  node_tags["Tags<br/>[TagsScreen.kt]"]
end

subgraph group_insights["Calendar and insights"]
  node_calendar["Unified calendar<br/>[CalendarScreen.kt]"]
  node_mood["Mood calendar<br/>[MoodCalendar.kt]"]
  node_stats["Analytics"]
end

subgraph group_storage["Local data"]
  node_database[("Room database<br/>[TimetyDatabase.kt]")]
  node_repositories["Repositories"]
  node_settings["Preferences"]
end

subgraph group_device["Device services"]
  node_timer["Timer engine"]
  node_reminders["Reminder scheduling"]
  node_notifications["Notifications"]
  node_backup["Backup and restore<br/>[BackupService.kt]"]
end

node_person(("App user"))

node_person -->|"opens"| node_activity
node_activity -->|"displays"| node_mainui
node_mainui -.->|"offers"| node_tasks
node_mainui -.->|"offers"| node_recurring
node_mainui -.->|"offers"| node_habits
node_mainui -.->|"offers"| node_goals
node_mainui -.->|"offers"| node_focus
node_mainui -.->|"offers"| node_calendar
node_mainui -.->|"offers"| node_mood
node_mainui -.->|"offers"| node_stats
node_mainui -.->|"offers"| node_tags
node_focus -.->|"uses state"| node_focusvm
node_focusvm -.->|"controls"| node_timer
node_database -.->|"persists data"| node_repositories
node_activity -->|"reads settings"| node_settings
node_reminders -.->|"schedules"| node_notifications
node_backup -->|"exports and restores"| node_database
node_backup -->|"restores preferences"| node_settings

click node_activity "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/MainActivity.kt"
click node_mainui "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/MainScreen.kt"
click node_tasks "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/task/TaskListScreen.kt"
click node_recurring "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/task/RecurringTasksScreen.kt"
click node_habits "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/habit/HabitListScreen.kt"
click node_goals "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/goal/GoalsScreen.kt"
click node_focus "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/focus/FocusScreen.kt"
click node_timer "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/services/FocusTimerManager.kt"
click node_focusvm "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/viewmodel/FocusViewModel.kt"
click node_calendar "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/CalendarScreen.kt"
click node_mood "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/components/mood/MoodCalendar.kt"
click node_stats "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/stats/StatsTasksScreen.kt"
click node_tags "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/TagsScreen.kt"
click node_database "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/data/local/TimetyDatabase.kt"
click node_repositories "https://github.com/benji377/timety/tree/main/app/src/main/java/io/github/benji377/timety/data/repository"
click node_settings "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/data/repository/SettingsRepository.kt"
click node_reminders "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/services/ReminderScheduler.kt"
click node_notifications "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/services/NotificationService.kt"
click node_backup "https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/services/BackupService.kt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_activity,node_mainui,node_person toneBlue
class node_tasks,node_recurring,node_habits,node_goals,node_focus,node_focusvm,node_tags toneAmber
class node_calendar,node_mood,node_stats toneMint
class node_database,node_repositories,node_settings toneRose
class node_timer,node_reminders,node_notifications,node_backup toneIndigo
```

## Components

### App shell

- [Main activity](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/MainActivity.kt): `app/src/main/java/io/github/benji377/timety/MainActivity.kt`
- [Main navigation](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/MainScreen.kt): `app/src/main/java/io/github/benji377/timety/ui/screens/MainScreen.kt`

### Productivity workflows

- [Task management](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/task/TaskListScreen.kt): `app/src/main/java/io/github/benji377/timety/ui/screens/task/TaskListScreen.kt`
- [Recurring tasks](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/task/RecurringTasksScreen.kt): `app/src/main/java/io/github/benji377/timety/ui/screens/task/RecurringTasksScreen.kt`
- [Habit tracking](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/habit/HabitListScreen.kt): `app/src/main/java/io/github/benji377/timety/ui/screens/habit/HabitListScreen.kt`
- [Goals](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/goal/GoalsScreen.kt): `app/src/main/java/io/github/benji377/timety/ui/screens/goal/GoalsScreen.kt`
- [Focus sessions](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/focus/FocusScreen.kt): `app/src/main/java/io/github/benji377/timety/ui/screens/focus/FocusScreen.kt`
- [Focus state](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/viewmodel/FocusViewModel.kt): `app/src/main/java/io/github/benji377/timety/ui/viewmodel/FocusViewModel.kt`
- [Tags](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/TagsScreen.kt): `app/src/main/java/io/github/benji377/timety/ui/screens/TagsScreen.kt`

### Calendar and insights

- [Unified calendar](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/CalendarScreen.kt): `app/src/main/java/io/github/benji377/timety/ui/screens/CalendarScreen.kt`
- [Mood calendar](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/components/mood/MoodCalendar.kt): `app/src/main/java/io/github/benji377/timety/ui/components/mood/MoodCalendar.kt`
- [Analytics](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/ui/screens/stats/StatsTasksScreen.kt): `app/src/main/java/io/github/benji377/timety/ui/screens/stats/StatsTasksScreen.kt`

### Local data

- [Room database](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/data/local/TimetyDatabase.kt): `app/src/main/java/io/github/benji377/timety/data/local/TimetyDatabase.kt`
- [Repositories](https://github.com/benji377/timety/tree/main/app/src/main/java/io/github/benji377/timety/data/repository): `app/src/main/java/io/github/benji377/timety/data/repository`
- [Preferences](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/data/repository/SettingsRepository.kt): `app/src/main/java/io/github/benji377/timety/data/repository/SettingsRepository.kt`

### Device services

- [Timer engine](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/services/FocusTimerManager.kt): `app/src/main/java/io/github/benji377/timety/services/FocusTimerManager.kt`
- [Reminder scheduling](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/services/ReminderScheduler.kt): `app/src/main/java/io/github/benji377/timety/services/ReminderScheduler.kt`
- [Notifications](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/services/NotificationService.kt): `app/src/main/java/io/github/benji377/timety/services/NotificationService.kt`
- [Backup and restore](https://github.com/benji377/timety/blob/main/app/src/main/java/io/github/benji377/timety/services/BackupService.kt): `app/src/main/java/io/github/benji377/timety/services/BackupService.kt`

### Other components

- **App user**

## Connections

- App user → Main activity: opens (evidence: `app/src/main/java/io/github/benji377/timety/MainActivity.kt`)
- Main activity → Main navigation: displays (evidence: `app/src/main/java/io/github/benji377/timety/MainActivity.kt`)
- Main navigation → Task management: offers
- Main navigation → Recurring tasks: offers
- Main navigation → Habit tracking: offers
- Main navigation → Goals: offers
- Main navigation → Focus sessions: offers
- Main navigation → Unified calendar: offers
- Main navigation → Mood calendar: offers
- Main navigation → Analytics: offers
- Main navigation → Tags: offers
- Focus sessions → Focus state: uses state
- Focus state → Timer engine: controls (evidence: `app/src/main/java/io/github/benji377/timety/ui/viewmodel/FocusViewModel.kt`)
- Room database → Repositories: persists data
- Main activity → Preferences: reads settings (evidence: `app/src/main/java/io/github/benji377/timety/MainActivity.kt`)
- Reminder scheduling → Notifications: schedules
- Backup and restore → Room database: exports and restores (evidence: `app/src/main/java/io/github/benji377/timety/services/BackupService.kt`)
- Backup and restore → Preferences: restores preferences (evidence: `app/src/main/java/io/github/benji377/timety/services/BackupService.kt`)
