English | 简体中文
A Windows desktop productivity tool that combines a todo list, a Pomodoro timer, foreground-app tracking and focus analytics — all data stored locally, no cloud required.
SentryNeko is a personal productivity and time-tracking app built for Windows. It puts task management and where the time actually went in the same place: you plan work with the todo list and Pomodoro timer while the app keeps tracking the foreground application and window title in the background. Heatmaps and charts then answer one question — where did my time go?
- Local-first: SQLite storage, no account, no network required
- Always-on but light: runs in the system tray and starts with Windows, the collector works silently
- Real-time feedback: Pomodoro completion, alarm firing and app switches are pushed to the UI via Tauri events
- Bilingual UI: both the interface and backend error messages support multiple languages
Windows 10 / 11 (x64) only.
This project has no cross-platform abstraction layer. It calls Win32 APIs directly (GetForegroundWindow, GetWindowText, GetTickCount64, …) and relies on Windows-specific features such as Toast notifications plus registry / Task Scheduler entries for auto-start. macOS and Linux are out of scope, and building on other platforms is not supported.
Runtime requirement: WebView2 Runtime (bundled with Windows 11, must be installed separately on Windows 10).
| Layer | Choice |
|---|---|
| Desktop framework | Tauri 2.x |
| Backend | Rust (Win32 FFI, SQLite, scheduling, Toast notifications) |
| Frontend | React + TypeScript + Vite |
| Charts | Recharts (stacked bars, areas) |
| Database | SQLite via rusqlite, r2d2 connection pool, one idempotent schema script |
| i18n | i18next / react-i18next (Simplified Chinese, English) |
| State management | Frontend stores + Tauri event subscriptions |
Status legend: ✅ Planned (implemented in the current scope); 🚧 Reserved (future release, models and interfaces are stubbed out now).
| Feature | Description | Status |
|---|---|---|
| Todo list | Create, read, update, delete; toggle completion; filter (all / active / completed); remaining count | ✅ Planned |
| Pomodoro timer | 25-minute focus countdown, break countdown, custom durations, start / pause / reset | ✅ Planned |
| Heatmap | Aggregate focus time and completed tasks by day / week / month, GitHub-style rendering | ✅ Planned |
| Alarms | One-off or repeating alarms, custom time, Windows Toast notification plus in-app ringtone | ✅ Planned |
| Feature | Description | Status |
|---|---|---|
| Foreground app monitoring | Track the current foreground app name and window title in real time, record switch timestamps, browse history | ✅ Planned |
| Uptime | Record system boot time and compute today's total uptime | ✅ Planned |
| System info | CPU usage, memory usage, disk space (reserved) | 🚧 Reserved |
| Feature | Description | Status |
|---|---|---|
| Tauri event push | Push foreground app switches, Pomodoro completion and alarm triggers to the frontend in real time | ✅ Planned |
| System notifications | Windows Toast notifications (alarm ringing, Pomodoro completion reminder) | ✅ Planned |
| Feature | Description | Status |
|---|---|---|
| Hourly breakdown | A day's foreground hours stacked per app, or its focus minutes; day and chart kind switchable | ✅ Planned |
| Focus and usage trends | 30-day / 12-week / 12-month focus and screen time trends with an axis and a hover readout | ✅ Planned |
| Day summary | Focus time, screen time and the busiest app of the chosen day | ✅ Planned |
| Feature | Description | Status |
|---|---|---|
| Multi-language support | Simplified Chinese, English, Japanese (reserved) | ✅ Planned |
| Language switching | Switch the language on the settings page, persisted locally | ✅ Planned |
| Feature | Description | Status |
|---|---|---|
| Mutual supervision | Friends / rooms to see each other's online status and focus time | 🚧 Reserved |
| Sharing | Public profile page / share card showing heatmap and stats | 🚧 Reserved |
| Feature | Description | Status |
|---|---|---|
| Auto-start with Windows | A settings switch writes the per-user run key, so the app starts at login and waits in the tray | ✅ Planned |
| System tray | Close to tray with a right-click menu (start Pomodoro, view today's stats); launching again restores the existing window | ✅ Planned |
| Global shortcuts | Custom shortcuts to start / pause the Pomodoro timer and show / hide the main window | 🚧 Reserved |
| Feature | Description | Status |
|---|---|---|
| Pomodoro settings | Focus duration, break duration, long-break interval, daily goal | ✅ Planned |
| Alarm defaults | Default ring duration and notification method | ✅ Planned |
| Language settings | Switch the interface language | ✅ Planned |
| Data management | Export / import data, clear history | 🚧 Reserved |
| Category | Count |
|---|---|
| ✅ Planned | 17 |
| 🚧 Reserved | 5 |
| Total | 22 |
Note: the tree below is the planned structure, not the current state of the repository.
SentryNeko/
├── src-tauri/ # Tauri Rust backend
│ ├── Cargo.toml
│ ├── Cargo.lock
│ ├── build.rs # Tauri build script (generates the permission schemas)
│ ├── tauri.conf.json # Tauri config (window, permissions, bundling)
│ ├── capabilities/
│ │ └── default.json # Capability config (commands allowed over IPC)
│ ├── app-icon.svg # Icon source consumed by `pnpm icons`
│ ├── icons/ # App icons (generated, not tracked)
│ └── src/
│ ├── main.rs # Entry point: starts the Tauri app
│ ├── lib.rs # Module registration + Tauri command registration
│ ├── config.rs # Config loading (database path, language, …)
│ ├── db/
│ │ ├── mod.rs # Database module entry
│ │ ├── connection.rs # SQLite connection pool setup
│ │ ├── schema.rs # Schema creation script (idempotent)
│ │ └── repository.rs # Generic data access layer (CRUD)
│ ├── models/
│ │ ├── mod.rs # Models module entry
│ │ ├── todo.rs # Todo model
│ │ ├── tag.rs # Tag model (reserved: labels for tasks)
│ │ ├── pomodoro.rs # Pomodoro model
│ │ ├── heatmap.rs # Heatmap data model
│ │ ├── alarm.rs # Alarm model
│ │ ├── user.rs # User model (reserved, for sharing / supervision)
│ │ └── app_event.rs # Foreground app event model
│ ├── commands/ # Tauri command layer
│ │ ├── mod.rs # Commands module entry
│ │ ├── todo_commands.rs # Todo CRUD commands
│ │ ├── tag_commands.rs # Tag commands (reserved)
│ │ ├── pomodoro_commands.rs # Pomodoro commands
│ │ ├── heatmap_commands.rs # Heatmap data commands
│ │ ├── alarm_commands.rs # Alarm commands
│ │ ├── app_event_commands.rs # Foreground app event query commands
│ │ ├── event_commands.rs # Event bus commands
│ │ ├── settings_commands.rs # Settings commands
│ │ └── system_commands.rs # System info commands (uptime)
│ ├── collectors/ # Windows system collection layer
│ │ ├── mod.rs # Collectors module entry
│ │ ├── foreground_app.rs # Foreground app collector (GetForegroundWindow + GetWindowText)
│ │ └── system_info.rs # System info collection (uptime, CPU, memory, …)
│ ├── services/
│ │ ├── mod.rs # Services module entry
│ │ ├── scheduler.rs # Timed task scheduler (alarm triggering)
│ │ ├── notification.rs # Windows notification push (Toast)
│ │ ├── event_bus.rs # Event bus (collector → frontend push)
│ │ └── i18n.rs # Backend i18n (localized error messages)
│ └── utils/
│ ├── mod.rs # Utils module entry
│ ├── time.rs # Time handling helpers
│ ├── windows.rs # Windows-specific API wrappers (Win32 FFI)
│ └── response.rs # Unified command response format
│
├── src/ # React frontend (Tauri frontend)
│ ├── main.tsx # Entry point
│ ├── App.tsx # Root component + router config
│ ├── i18n/ # Internationalization
│ │ ├── index.ts # i18n setup (i18next / react-i18next)
│ │ ├── locales/
│ │ │ ├── zh-CN.json # Simplified Chinese
│ │ │ ├── en-US.json # English
│ │ │ └── ja-JP.json # Japanese (reserved)
│ │ └── config.ts # Language config
│ ├── hooks/
│ │ ├── useTodos.ts # Todo data hook
│ │ ├── usePomodoro.ts # Pomodoro hook
│ │ ├── useHeatmap.ts # Heatmap data hook
│ │ ├── useAlarms.ts # Alarm hook
│ │ ├── useAppEvents.ts # Foreground app event hook
│ │ ├── useI18n.ts # Language switching hook
│ │ ├── useTauriEvent.ts # Tauri event listener wrapper
│ │ └── useWindowControls.ts # Window controls for the custom title bar
│ ├── components/
│ │ ├── TodoList.tsx # Todo list component
│ │ ├── TodoItem.tsx # Single todo item
│ │ ├── AddTodoForm.tsx # Add-todo form
│ │ ├── PomodoroTimer.tsx # Pomodoro timer
│ │ ├── PomodoroSettings.tsx # Phase duration form
│ │ ├── HeatmapChart.tsx # Heatmap component
│ │ ├── AlarmList.tsx # Alarm list
│ │ ├── AppEventLog.tsx # Foreground app event log list
│ │ ├── LanguageSwitcher.tsx # Language picker used by the settings page
│ │ ├── TitleBar.tsx # Custom title bar: drag, minimize, maximize, close
│ │ ├── ToastHost.tsx # In-app toast for a refused system notification
│ │ ├── I18nProvider.tsx # i18n provider component
│ │ └── ui/ # Shared component library
│ │ ├── NumericInput.tsx # Validated numeric input with wheel and arrow stepping
│ │ └── SegmentedControl.tsx # Segmented switch with a sliding highlight
│ ├── pages/
│ │ ├── Dashboard.tsx # Main dashboard
│ │ ├── TodosPage.tsx # Todos page
│ │ ├── PomodoroPage.tsx # Pomodoro page
│ │ ├── HeatmapPage.tsx # Heatmap page
│ │ ├── AlarmsPage.tsx # Alarms page
│ │ ├── SettingsPage.tsx # Settings page
│ │ ├── EventsPage.tsx # Event stream page
│ │ └── AnalyticsPage.tsx # Analytics page
│ ├── stores/
│ │ ├── todoStore.ts # Todo state
│ │ ├── pomodoroStore.ts # Pomodoro state
│ │ ├── appEventStore.ts # Foreground app event state
│ │ └── i18nStore.ts # Language state
│ ├── styles/
│ │ ├── tokens.css # Design tokens and the light theme
│ │ └── global.css # Reset and the classes that cross a module
│ └── types/
│ ├── index.ts # Global type definitions
│ ├── todo.ts # Todo types
│ ├── tag.ts # Tag types (reserved)
│ ├── pomodoro.ts # Pomodoro types
│ ├── heatmap.ts # Heatmap types
│ ├── alarm.ts # Alarm types
│ ├── appEvent.ts # Foreground app event types
│ └── i18n.ts # i18n type definitions
│
├── docs/ # Documentation (English + Simplified Chinese)
│ ├── screenshots/ # Screenshots shown in this README
│ ├── commands.md # Tauri command reference
│ ├── database.md # Schema and the connection pool
│ ├── events.md # Tauri event definitions
│ ├── i18n.md # i18n guide
│ └── architecture.md # Architecture notes
│
├── scripts/
│ ├── dev.ps1 # One-command dev environment (PowerShell)
│ └── check_locales.mjs # Locale key parity check, run by `pnpm lint`
│
├── package.json
├── pnpm-lock.yaml
├── vite.config.ts
├── tsconfig.json
├── index.html
├── .gitignore
├── README.md # English docs (default)
├── README.zh-CN.md # Simplified Chinese docs
├── TODO.md # English task breakdown (default)
├── TODO.zh-CN.md # Simplified Chinese task breakdown
├── CONTRIBUTING.md # English contribution guide (default)
└── CONTRIBUTING.zh-CN.md # Simplified Chinese contribution guide
| Dependency | Version |
|---|---|
| Windows | 10 1903+ / 11 (x64) |
| Node.js | 20 LTS or later |
| Package manager | pnpm (recommended) or npm |
| Rust | stable (MSVC toolchain) |
| Visual Studio Build Tools | with the "Desktop development with C++" workload |
| WebView2 Runtime | latest |
# 1. Install frontend dependencies
pnpm install
# 2. Generate the application icons (they are generated artifacts, only app-icon.svg is tracked)
pnpm icons
# 3. Start the dev environment (frontend HMR + Rust backend; the tables are created on first run)
pnpm tauri dev
# or use the convenience script
powershell -ExecutionPolicy Bypass -File scripts/dev.ps1
# 4. Build the Windows installer (msi / nsis)
pnpm tauri buildThe packaged app stays light: the installer asks for about 4.8 MB of disk space.
The collector reads foreground window information and runs inside the app, under your own account. If antivirus software blocks it, allow the SentryNeko executable in that tool; there is nothing to register separately. Starting with Windows is a switch on the settings page, which writes one value under
HKCU\Software\Microsoft\Windows\CurrentVersion\Run.
| Document | Contents |
|---|---|
| docs/architecture.md | Layered architecture, data flow and module responsibilities |
| docs/commands.md | Tauri command signatures and response format |
| docs/database.md | Schema, migrations and the connection pool |
| docs/events.md | Tauri event definitions and trigger points |
| docs/i18n.md | How copy is organized and how to add a language |
| docs/tray.md | System tray: close-to-tray, menu entries and the live today line |
| TODO.md | Task breakdown, priorities and dependencies |
| CONTRIBUTING.md | Branching, commit conventions and the definition of done |
Files under
docs/are bilingual: each one has a Simplified Chinese counterpart named<name>.zh-CN.md, for example docs/commands.zh-CN.md.
Apache License 2.0 © 2026 haloneko







