How zoey-0314/dayforge works
Dayforge is a Windows desktop productivity widget: users expand a compact heatmap-and-level view to manage tasks, check in habits, run focus sessions, and record sleep. The main UI initializes local storage and daily rewards, then coordinates feature services and displays saved EXP history and level progress. Task, habit, timer, login, and online activity rewards feed a durable EXP ledger; sleep is tracked separately. The Rust/Tauri layer configures the desktop window and SQLite migrations. The README describes capped online/active-app EXP, but the tree excerpt does not establish an active-app detection path.
Main entry points: App.tsx Widget app · database.ts Database access · timerService.ts Focus timer · onlineExperienceService.ts Online EXP
Components 18
Widget interface
- Widget app
src/app/App.tsx - EXP heatmap
src/features/heatmap/Heatmap.tsx - Sleep panel
src/features/sleep/SleepPanel.tsx - EXP effects
src/features/experience/ExperienceEffects.tsx
Product features
- To-do service
src/features/todo/todoService.ts - Habit service
src/features/habits/habitService.ts - Focus timer
src/features/timer/timerService.ts - Sleep records
src/features/sleep/sleepService.ts
Experience progress
- Daily login reward
src/features/experience/dailyLoginService.ts - Online EXP
src/features/experience/onlineExperienceService.ts - EXP and levels
src/features/experience/experienceService.ts
Desktop and storage
- Database access
src/db/database.ts - Local SQLite
- Frontend entry
src/main.tsx - Desktop lifecycle
src/services/desktopLifecycle.ts - Tauri backend
src-tauri/src/lib.rs
Other components
- User
- Active-app source
Connections 25
- User → Widget app: uses widget
- Frontend entry → Widget app: renders
- Frontend entry → Desktop lifecycle: initializes
- Widget app → Database access: opens storage
- Widget app → Daily login reward: checks login reward
- Widget app → Focus timer: recovers and lists sessions
- Widget app → To-do service: manages tasks
- Widget app → Habit service: manages check-ins
- Widget app → Sleep panel: shows sleep panel
- Widget app → EXP heatmap: passes EXP history
- Widget app → EXP effects: shows progress effects
- Sleep panel → Sleep records: reads and saves
- To-do service → Database access: reads and writes
- Habit service → Database access: reads and writes
- Focus timer → Database access: reads and writes
- Focus timer → EXP and levels: grants timer EXP
- Daily login reward → Database access: writes login reward
- Online EXP → Database access: reads daily total
- Online EXP → EXP and levels: grants capped EXP
- EXP and levels → Database access: records EXP
- Widget app → Database access: queries daily EXP
- Database access → Local SQLite: executes SQL
- Tauri backend → Local SQLite: migrates schema
- Tauri backend → Widget app: hosts window
- Active-app source → Online EXP: verified time input