# ywwynm/everythingdone architecture

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

- Interactive diagram: https://gitdiagram.com/ywwynm/everythingdone
- Repository: https://github.com/ywwynm/everythingdone

## Overview

1. **Overall shape**
   This is a multi-module Android app written in Java, centered on a single offline personal-productivity domain: managing “things” such as notes, reminders, habits, goals, and doing sessions. There is no backend or network boundary; nearly everything flows through local storage, Android lifecycle components, alarms, notifications, and widgets.

2. **Modules in the repo**
   The main application lives in `app/`. Two embedded library modules support it: `swirl/` provides the animated fingerprint view/graphics used for private-item authentication, and `timelytextview/` provides animated numeric text rendering. These are UI support libraries, not separate products.

3. **UI layer: activities and fragments**
   The app’s primary screens are in `activities/`, with each screen handling a major workflow: browsing things, editing details, running a thing in “doing” mode, viewing statistics, settings, help/about, image viewing, and authentication. `fragments/` contains reusable dialogs and modal editors for date/time selection, choosers, checklist editing, attachments, pattern lock, habit details, and alerts. The architecture is classic Android UI-driven, with a lot of logic embedded in activity/controller code.

4. **Domain model**
   Core concepts live in `model/`: `Thing` is the central entity, with specialized types such as `Reminder`, `Habit`, `DoingRecord`, `HabitRecord`, `ThingAction`, `ThingBackground`, and widget metadata. The model indicates the app tracks both content and behavior over time, not just static notes.

5. **Persistence boundary**
   Local data is handled by `database/`, with `DBHelper` plus DAO classes for things, reminders, habits, doing records, and widget configuration. This is the main persistence boundary: UI and helpers read/write through the DAOs rather than talking to storage directly. The app’s architecture is therefore strongly stateful and SQLite-centered.

6. **Domain coordination**
   `managers/` contains higher-level orchestration, especially `ThingManager` and `ModeManager`. These likely sit above DAOs and below activities, coordinating current item state, list filtering/modes, and cross-screen behavior. They form the main “application logic” boundary between raw data access and user-facing screens.

7. **Background execution and OS events**
   Background behavior is split across `receivers/` and `services/`. Receivers respond to boot, locale changes, user-present events, daily scheduling, reminder/habit notifications, widget actions, and app update events. Services handle longer-running or scheduled work such as the doing countdown and alarm health maintenance. This is where the app connects to Android’s event system.

8. **Reminder, habit, and daily automation flows**
   The app has several automated flows driven by the OS clock: reminder alarms, habit updates, daily todo creation, auto-notify after creating a thing, and start-doing behavior when an alarm fires. These flows depend on `AlarmHelper`, receiver classes, notification utilities, and the DAO layer to load/update the relevant thing records.

9. **Widgets and shortcuts**
   `appwidgets/` contains both single-thing widgets and list widgets, plus their configuration activities and remote views services. Widgets are treated as a first-class presentation surface backed by local DB state. The app also includes Android app shortcuts via `res/xml/shortcuts.xml`, so launcher actions jump directly into common creation or browsing paths.

10. **Attachments, export, and local tooling**
   The app supports images, audio, and video attachments, plus local backup/restore and export/share operations. Helpers like `AttachmentHelper`, `ThingExporter`, `BackupHelper`, `FileUtil`, and `UriPathConverter` indicate the app manages files on-device and uses Android file/URI boundaries rather than remote storage.

11. **Security and private content**
   Private things are protected with pattern lock and fingerprint authentication. `AuthenticationActivity`, the pattern/fingerprint helpers, and the embedded `swirl` library form a dedicated security path that gates access to sensitive content without involving external identity providers.

12. **Custom UI and interaction layer**
   There is a substantial custom view layer in `views/` for richer interactions: pattern lock, revealing panels, custom snackbars, stable recycler views, staggered layouts, color/date-time pickers, audio recording visualization, and animated headers/toolbars. `adapters/` then bind the model objects into these views and list screens.

13. **Utilities and shared helpers**
   Cross-cutting behavior is centralized in `helpers/` and `utils/`: notifications, crashes, screenshots, locale, bitmap/font/cache utilities, sorting, keyboard/display/device helpers, and line spacing/visual polish. This repo uses helpers as its main “service layer,” so architecture diagrams should show them as orchestration utilities consumed by activities, receivers, and widgets.

14. **Resource and product configuration**
   The `res/` tree is extensive and matters architecturally: many layouts exist for different screen sizes and locales, which reflects a UI optimized for phones and tablets, plus Simplified/Traditional Chinese and English. The app is heavily resource-driven, with behavior and appearance spread across layouts, menus, drawables, and localized values.

15. **Net effect**
   The clearest architecture is: Android UI screens and widgets at the top, helpers/managers as orchestration, DAOs/DBHelper as persistence, and receivers/services as the background event bridge into the Android OS. The project is predominantly local, event-driven, and feature-rich, with the main complexity coming from reminders, doing sessions, habits, widgets, and private-item authentication.

Main entry points: [`app/src/main/java/com/ywwynm/everythingdone/activities`](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/activities) (Screens), [`app/src/main/java/com/ywwynm/everythingdone/helpers`](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/helpers) (Helpers), [`app/src/main/java/com/ywwynm/everythingdone/database`](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/database) (Local DB), [`app/src/main/java/com/ywwynm/everythingdone/appwidgets`](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/appwidgets) (Widgets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App"]
  node_app["Everything Done<br/>android app"]
  node_activities["Screens"]
  node_fragments["Dialogs"]
  node_views["Custom views<br/>ui widgets"]
  node_adapters["Adapters<br/>ui binding"]
  node_managers["Managers<br/>app logic"]
  node_model["Domain model<br/>entities"]
  node_database[("Local DB<br/>sqlite persistence")]
  node_helpers["Helpers<br/>orchestration utils"]
  node_appcore["App setup<br/>application entry<br/>[App.java]"]
end

subgraph group_support["Support libs"]
  node_swirl["Swirl<br/>fingerprint lib"]
  node_timelytextview["TimelyText<br/>number animation lib"]
end

subgraph group_platform["OS bridge"]
  node_receivers["Receivers<br/>android broadcast"]
  node_services["Services<br/>background work"]
  node_appwidgets["Widgets<br/>home screen ui"]
end

subgraph group_resources["Resources"]
  node_resources["Resources<br/>res config"]
end

node_appcore -->|"boots UI"| node_activities
node_activities -->|"orchestrates"| node_managers
node_activities -->|"opens dialogs"| node_fragments
node_activities -->|"uses views"| node_views
node_activities -->|"binds lists"| node_adapters
node_activities -->|"uses helpers"| node_helpers
node_activities -->|"reads writes"| node_database
node_activities -->|"shows data"| node_model
node_managers -->|"coordinates data"| node_database
node_managers -->|"tracks state"| node_model
node_helpers -->|"loads updates"| node_database
node_helpers -->|"starts work"| node_services
node_receivers -->|"delegates"| node_helpers
node_receivers -->|"wakes jobs"| node_services
node_receivers -->|"refreshes state"| node_database
node_services -->|"uses helpers"| node_helpers
node_services -->|"updates records"| node_database
node_appwidgets -->|"renders state"| node_database
node_appwidgets -->|"refreshes via helpers"| node_helpers
node_appwidgets -->|"handles actions"| node_receivers
node_appwidgets -->|"launches screens"| node_activities
node_database -->|"maps entities"| node_model
node_swirl -->|"auth UI"| node_helpers
node_activities -->|"private access"| node_swirl
node_timelytextview -->|"animated numbers"| node_activities
node_resources -->|"inflates screens"| node_activities
node_resources -->|"defines widgets"| node_appwidgets
node_resources -->|"styles custom UI"| node_views

click node_app "https://github.com/ywwynm/everythingdone/tree/master/app"
click node_activities "https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/activities"
click node_fragments "https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/fragments"
click node_views "https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/views"
click node_adapters "https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/adapters"
click node_managers "https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/managers"
click node_model "https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/model"
click node_database "https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/database"
click node_helpers "https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/helpers"
click node_receivers "https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/receivers"
click node_services "https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/services"
click node_appwidgets "https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/appwidgets"
click node_resources "https://github.com/ywwynm/everythingdone/tree/master/app/src/main/res"
click node_appcore "https://github.com/ywwynm/everythingdone/blob/master/app/src/main/java/com/ywwynm/everythingdone/App.java"
click node_swirl "https://github.com/ywwynm/everythingdone/tree/master/swirl"
click node_timelytextview "https://github.com/ywwynm/everythingdone/tree/master/timelytextview"

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_app,node_activities,node_fragments,node_views,node_adapters,node_managers,node_model,node_database,node_helpers,node_appcore toneBlue
class node_swirl,node_timelytextview toneAmber
class node_receivers,node_services,node_appwidgets toneMint
class node_resources toneRose
```

## Components

### App

Main Android application and feature code

- [Everything Done](https://github.com/ywwynm/everythingdone/tree/master/app): android app · Top-level Android application module · `app`
- [Screens](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/activities): ui screens · Primary activities for browsing, editing, doing, stats, settings, auth, and viewer flows · `app/src/main/java/com/ywwynm/everythingdone/activities`
- [Dialogs](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/fragments): ui dialogs · Reusable modal fragments for pickers, choosers, alerts, attachment and habit editing · `app/src/main/java/com/ywwynm/everythingdone/fragments`
- [Custom views](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/views): ui widgets · Specialized view layer for pattern lock, reveal panels, pickers, recording, and list behavior · `app/src/main/java/com/ywwynm/everythingdone/views`
- [Adapters](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/adapters): ui binding · Recycler, pager, and chooser adapters that bind models into screens and widgets · `app/src/main/java/com/ywwynm/everythingdone/adapters`
- [Managers](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/managers): app logic · Higher-level orchestration for current thing state and list/mode coordination · `app/src/main/java/com/ywwynm/everythingdone/managers`
- [Domain model](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/model): entities · Core productivity entities such as things, habits, reminders, records, and widget metadata · `app/src/main/java/com/ywwynm/everythingdone/model`
- [Local DB](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/database): sqlite persistence · SQLite helper and DAOs for things, reminders, habits, doing records, and widgets · `app/src/main/java/com/ywwynm/everythingdone/database`
- [Helpers](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/helpers): orchestration utils · Cross-cutting helpers for alarms, attachments, auth, backup, notifications, export, and doing flows · `app/src/main/java/com/ywwynm/everythingdone/helpers`
- [App setup](https://github.com/ywwynm/everythingdone/blob/master/app/src/main/java/com/ywwynm/everythingdone/App.java): application entry · Application bootstrap and global constants/settings · `app/src/main/java/com/ywwynm/everythingdone/App.java`

### Support libs

Embedded UI libraries reused by the app

- [Swirl](https://github.com/ywwynm/everythingdone/tree/master/swirl): fingerprint lib · Embedded animated fingerprint view used for private-item authentication · `swirl`
- [TimelyText](https://github.com/ywwynm/everythingdone/tree/master/timelytextview): number animation lib · Embedded animated numeric text rendering library · `timelytextview`

### OS bridge

Android event, service, and widget integration

- [Receivers](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/receivers): android broadcast · Boot, locale, reminder, habit, update, and user-present event handlers · `app/src/main/java/com/ywwynm/everythingdone/receivers`
- [Services](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/services): background work · Longer-running scheduled work such as doing countdown and alarm health maintenance · `app/src/main/java/com/ywwynm/everythingdone/services`
- [Widgets](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/java/com/ywwynm/everythingdone/appwidgets): home screen ui · Single-thing and list widgets plus their configuration and remote views services · `app/src/main/java/com/ywwynm/everythingdone/appwidgets`

### Resources

Layouts, drawables, values, menus, and XML config

- [Resources](https://github.com/ywwynm/everythingdone/tree/master/app/src/main/res): res config · Layouts, menus, drawables, localized values, animations, and XML declarations · `app/src/main/res`

## Connections

- App setup → Screens: boots UI · Application setup feeds the main screen lifecycle
- Screens → Managers: orchestrates · Screens coordinate current item and mode state through managers
- Screens → Dialogs: opens dialogs · Screens host modal editors, pickers, and alerts
- Screens → Custom views: uses views · Screens compose custom interaction and rendering widgets
- Screens → Adapters: binds lists · Screens render models through adapters
- Screens → Helpers: uses helpers · Screens rely on helper services for alarms, attachments, auth, export, and notifications
- Screens → Local DB: reads writes · UI ultimately persists and loads state through DAOs
- Screens → Domain model: shows data · Screens present the core thing/habit/reminder model
- Managers → Local DB: coordinates data · Managers sit above DAO access and state transitions
- Managers → Domain model: tracks state · Managers operate on domain entities
- Helpers → Local DB: loads updates · Helpers perform domain mutations and schedule-sensitive reads through DAOs
- Helpers → Services: starts work · Helpers trigger or support background jobs and countdown work
- Receivers → Helpers: delegates · Broadcast handlers hand off to helpers for real work
- Receivers → Services: wakes jobs · OS events and alarms launch scheduled background processing
- Receivers → Local DB: refreshes state · Event handlers update reminders, habits, and daily data in local storage
- Services → Helpers: uses helpers · Background services reuse shared orchestration utilities
- Services → Local DB: updates records · Services persist doing/alarm maintenance changes
- Widgets → Local DB: renders state · Widgets are backed by local thing and widget configuration data
- Widgets → Helpers: refreshes via helpers · Widget actions and updates are coordinated through shared helpers
- Widgets → Receivers: handles actions · Widget interaction routes through broadcast receivers
- Widgets → Screens: launches screens · Widget configuration and actions jump into the app UI
- Local DB → Domain model: maps entities · DAOs persist and hydrate domain objects
- Swirl → Helpers: auth UI · Fingerprint animation supports authentication flows
- Screens → Swirl: private access · Authentication screens use the embedded fingerprint view
- TimelyText → Screens: animated numbers · Statistics and other UI surfaces use animated numeric text
- Resources → Screens: inflates screens · Layouts and menus define the visible app surfaces
- Resources → Widgets: defines widgets · Widget layouts and info XML configure home screen presentation
- Resources → Custom views: styles custom UI · Drawables, attrs, and animations support custom controls and polish
