This roadmap is the single source of truth for building FlowWatcher from scratch. Each phase is self-contained with full context so that a human developer or an agentic AI can follow it sequentially without needing to reference other documents.
⚠️ MANDATORY: ReadStrategic_shift.mdbefore starting ANY phase. The entire Rust backend must follow the Trigger Engine + Condition Engine + Action Engine trait-based architecture. Network monitoring is the FIRST implementation, not the ONLY one. Code that hardcodes network-specific logic into the engine layer will be rejected. SeeStrategic_shift.mdfor full details, enforcement rules, and a per-phase checklist.
Each phase follows this structure:
- Why: The strategic reason this phase exists.
- What: Exact deliverables and tasks.
- Context Source: Which planning document(s) informed this phase.
- Skills to Use: Which installed agent skills to activate before starting this phase.
- Expected Result: What a completed phase looks like.
- Depends On: Which prior phase(s) must be finished first.
The following skills are installed in .agent/skills/ and .agents/skills/. Before starting each phase, read the SKILL.md of every skill listed for that phase so the agent has the correct patterns, rules, and anti-patterns loaded.
| Skill | Location | When to Use |
|---|---|---|
tauri-v2 |
.agents/skills/tauri-v2/ |
Phases 0, 4, 10, 11 — Tauri commands, IPC, capabilities, config, plugins. |
understanding-tauri-architecture |
.agents/skills/understanding-tauri-architecture/ |
Phase 0, 4 — Core/Shell pattern, security model, webview integration. |
rust-best-practices |
.agents/skills/rust-best-practices/ |
Phases 1, 2, 3 — Borrowing, error handling, clippy, testing, traits, type-state. |
rust-async-patterns |
.agents/skills/rust-async-patterns/ |
Phases 1, 2, 3 — Tokio, channels, graceful shutdown, async traits, streams. |
shadcn-ui |
.agents/skills/shadcn-ui/ |
Phases 0, 5, 6, 7, 8, 9, 10 — Component installation, forms, dialogs, tables, theming. |
vite |
.agents/skills/vite/ |
Phase 0, 5 — Vite config, plugins, dev server, build. |
eslint-prettier-config |
.agents/skills/eslint-prettier-config/ |
Phase 0, 13 — ESLint/Prettier setup, TypeScript rules, CI linting. |
typescript-advanced-types |
.agents/skills/typescript-advanced-types/ |
Phase 4 — Generics, mapped types, discriminated unions for Tauri type defs. |
vercel-react-best-practices |
.agents/skills/vercel-react-best-practices/ |
Phases 5, 6, 7, 14 — React performance, component patterns, rendering optimization. |
i18n-localization |
.agents/skills/i18n-localization/ |
Phase 12 — Detecting hardcoded strings, locale files, translation management. |
semantic-versioning |
.agents/skills/semantic-versioning/ |
Phase 13, 15 — Conventional commits, semantic-release, version bumping. |
Every professional open-source project begins with a clean, scalable repository structure. Without this, future phases will create disorganized code that is painful to refactor. The strategic shift document explicitly states: "If we design it correctly now, you will not rewrite everything later."
Create the top-level project directory with the following structure (from OpenSource_Repo_Setup.md):
/FlowWatcher
├── apps/
│ └── desktop/ # Tauri desktop app
│ ├── src/ # React frontend (Vite + TypeScript)
│ ├── src-tauri/ # Rust backend (Tauri 2.0)
│ └── tauri.conf.json
├── core/
│ ├── engine/ # Automation engine (pure Rust, no Tauri dependency)
│ ├── triggers/ # Trigger modules (network idle, process exit, etc.)
│ ├── actions/ # Action modules (shutdown, sleep, alarm, etc.)
│ ├── conditions/ # Condition evaluation (threshold + duration logic)
│ └── platform/ # OS abstraction layer (Windows first, then macOS/Linux)
├── docs/ # Architecture docs, contribution guides
├── scripts/ # Build helpers, release scripts
├── .github/
│ ├── workflows/ # CI/CD (GitHub Actions)
│ ├── ISSUE_TEMPLATE/
│ └── PULL_REQUEST_TEMPLATE.md
├── CHANGELOG.md
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
├── LICENSE # MIT License
├── README.md
└── ROADMAP.md
Inside apps/desktop/src/:
- Scaffold with
npm create vite@latest ./ -- --template react-ts. - Install Tailwind CSS v3+, configure
tailwind.config.ts. - Install and configure ShadCN UI (
npx shadcn-ui@latest init). - Install Zustand for state management.
- Install
i18next+react-i18nextfor future internationalization readiness (do NOT hardcode any UI strings). - Set up ESLint + Prettier with TypeScript rules.
Inside apps/desktop/src-tauri/:
- Run
npm create tauri-app@latestorcargo install tauri-cliandcargo tauri init. - Configure
tauri.conf.jsonfor window size (~800×600), title "FlowWatcher", and custom titlebar if desired. - Verify
cargo buildsucceeds for the Rust backend. - Verify
npm run tauri devlaunches a blank window with the React frontend inside.
Inside core/:
- Create a Rust workspace crate (
Cargo.tomlwith members:engine,triggers,actions,conditions,platform). - Each sub-crate starts with a
lib.rscontaining a placeholderpub fn init() {}. - Critical rule: The
core/crate must NEVER depend on Tauri. It is pure Rust logic. Tauri only calls intocore/fromapps/desktop/src-tauri/.
- Write initial
README.md(project name, one-line description, "Under Development" badge). - Add
LICENSE(MIT). - Add
CODE_OF_CONDUCT.md(Contributor Covenant). - Add
CONTRIBUTING.md(dev setup instructions, branch naming:feature/xxx,fix/xxx). - Set up
.gitignorefor Rust (target/), Node (node_modules/,dist/), and OS files. - Initialize Git, create
mainanddevbranches. All work happens ondev.
OpenSource_Repo_Setup.md (sections 1–5, 7, 10), Project_Development_Overview.md (section 2–3), Strategic_shift.md (modular architecture requirement).
Running npm run tauri dev from apps/desktop/ opens a blank Tauri window rendering the default Vite React page. The Rust backend compiles. The core/ crate compiles independently. The repository is clean, professional, and ready for contributions.
tauri-v2— For correcttauri.conf.jsonconfiguration,Cargo.tomlsetup, and avoiding common Tauri v2 init pitfalls.understanding-tauri-architecture— To understand the Core/Shell separation pattern before setting up thecore/crate independently from Tauri.shadcn-ui— For propernpx shadcn@latest initsetup, Tailwind config, and component path aliases.vite— Forvite.config.tsbest practices, plugin setup (@vitejs/plugin-react), and dev server config.eslint-prettier-config— For setting up ESLint + Prettier with TypeScript rules from the start.
Nothing. This is the starting phase.
The entire product revolves around accurately detecting when network activity drops below a threshold. This is the brain of the application. It must be built first, in pure Rust, independent of any UI, so it can later be reused by the CLI and headless modes.
- Define a
NetworkInterfacetrait:list_interfaces() -> Vec<InterfaceInfo>get_default_interface() -> Option<InterfaceInfo>get_stats(interface_id) -> NetworkStats { bytes_sent, bytes_received, timestamp }
- Implement
WindowsNetworkProviderusing Windows performance counters or thesysinfo/netstat2Rust crate. - Design the trait so macOS/Linux implementations can be added later without touching any calling code.
⚠️ Strategic Shift Enforcement: The network monitor must be implemented as aTriggertrait implementation (NetworkIdleTrigger), not as standalone hardcoded logic. TheTriggertrait (start(),stop(),evaluate()) must be defined incore/triggers/first, andNetworkIdleTriggerimplements it. This allowsCpuIdleTrigger,ProcessExitTrigger, etc. to be added later without touching the engine. SeeStrategic_shift.md.
- Implement a
SpeedMonitorstruct that:- Polls
get_stats()at a configurable interval (default: 1 second). - Calculates delta bytes between polls to derive download/upload speed in bytes/sec.
- Exposes
current_download_speed()andcurrent_upload_speed(). - Smooths short spikes using a rolling average (e.g., 3-sample window) to prevent false triggers from momentary traffic pauses.
- Polls
- Implement a
ThresholdConditionstruct:- Configurable
threshold_bytes_per_sec: u64(default: 200 KB/s = 204800). - Configurable
required_duration_secs: u64(default: 120 seconds). - Configurable
monitor_mode: DownloadOnly | UploadOnly | Both. - Method
evaluate(current_speed) -> ConditionState { Waiting, BelowThreshold(elapsed), Triggered }. - Uses internal timer: only transitions to
Triggeredafter speed stays below threshold for the fullrequired_duration_secs. - Resets timer if speed goes back above threshold (handles fluctuation).
- Configurable
- Test speed calculation with mock data.
- Test threshold logic: confirm it does NOT trigger during brief dips.
- Test threshold logic: confirm it DOES trigger after sustained low speed.
- Test mode filtering (download-only ignores upload traffic).
Feature_and_capability_defination.md (section 1A — Network Interface Monitoring, Edge Handling), Project_Overview.md (section 3A), MyOwn_thinking.md (Speed Monitor, Interface Selector), Strategic_shift.md (Trigger Engine design).
A pure Rust library that can be called with speed_monitor.start() and emits speed data + trigger state. Fully testable with cargo test inside core/. No UI dependency. No Tauri dependency.
rust-best-practices— For idiomatic trait design, borrowing patterns, error handling withthiserror, clippy enforcement, and testing conventions.rust-async-patterns— For async polling loops with Tokio, channel-based event emission, and graceful shutdown patterns for the speed monitor.
Phase 0 (project scaffolding).
Once the monitoring engine detects idle network, it must execute a system action safely. This action engine is the second pillar of the product and must be modular so new action types can be added by contributors without modifying existing code.
- Define an
Actiontrait:validate() -> Result<(), ActionError>— checks if the action is possible (e.g., hibernate supported?).execute() -> Result<(), ActionError>— performs the action.name() -> &str— human-readable name.
⚠️ Strategic Shift Enforcement: TheActiontrait is the extensibility point for the Action Engine. Future contributors can addRunScriptAction,WebhookAction,CustomCommandActionby implementing this trait. The engine must dispatch actions through the trait, never through direct function calls. SeeStrategic_shift.md.
ShutdownAction— calls WindowsExitWindowsExor equivalent viawindows-syscrate.RestartAction— same API with restart flag.SleepAction— callsSetSuspendState(false, ...).HibernateAction— callsSetSuspendState(true, ...)after checkingIsPwrHibernateAllowed().SignOutAction— callsExitWindowsExwith logoff flag.LockScreenAction— callsLockWorkStation().PlayAlarmAction— plays an audio file (default embedded alarm + custom user file path). Userodiocrate for cross-platform audio.
- Implement
ActionScheduler:- Accepts an
Action+ delay configuration. - Emits events:
PreWarning(60s before),CountdownStarted(30s),CountdownTick(remaining),Cancelled,Executed. - Exposes
cancel()andexecute_now()methods. - Prevents duplicate triggers (internal state machine:
Idle -> Pending -> Countdown -> Executed | Cancelled).
- Accepts an
- Test each action's
validate()(mock OS calls where needed). - Test
ActionSchedulerstate transitions. - Test cancellation during countdown.
- Test
execute_nowduring countdown.
Feature_and_capability_defination.md (section 2 — Action Engine, Safety Features, System Checks), Project_Overview.md (section 3C), MyOwn_thinking.md (User Action Selection, 30-sec warning delay).
Calling action_scheduler.schedule(ShutdownAction, delay: 5min) starts a countdown pipeline that emits events. Calling action_scheduler.cancel() stops it. All actions validate OS capability before executing. Fully testable with cargo test.
rust-best-practices— For trait-based action architecture,Result<T, E>patterns, type-state pattern for theActionSchedulerstate machine, and testing best practices.rust-async-patterns— For async countdown timers,tokio::select!for cancellation, and channel-based event emission to frontend.
Phase 0.
Global bandwidth monitoring can be inaccurate (e.g., Windows Update downloading in background). Process-level monitoring lets users say "only watch Steam.exe" for much higher accuracy. This is the key differentiator of FlowWatcher vs competitors.
- Implement
list_running_processes() -> Vec<ProcessInfo { pid, name, path }>. - Implement
get_process_network_usage(pid) -> NetworkStatsusing ETW (Event Tracing for Windows) or WMI on Windows. - Mark processes with high network usage for "smart suggestion" feature.
- Implement
ProcessTriggeras aTriggertrait implementation (same trait asNetworkIdleTriggerfrom Phase 1):- Accepts a list of selected process PIDs/names.
- Polls each process's network usage.
- Evaluates: ALL selected processes must be below threshold for the required duration.
- Supports an exclusion list (processes to always ignore).
- Combined logic mode: global network idle AND selected processes idle (both must be true if process monitoring is enabled).
⚠️ Strategic Shift Enforcement:ProcessTriggeris the SECONDTriggertrait implementation. If Phase 1 was designed correctly, adding this trigger requires zero changes to the engine — just a new struct implementing the existing trait. If this requires engine changes, Phase 1's trait design was wrong and must be fixed first. SeeStrategic_shift.md.
- Sort process list by current network usage descending.
- Mark top network-consuming processes as "suggested".
- Test process enumeration returns valid data.
- Test combined trigger logic (global + process).
- Test exclusion list filtering.
Feature_and_capability_defination.md (section 1B — Process-Based Monitoring, Accuracy Logic), MyOwn_thinking.md (Process based monitoring, Smart Process Mode, Exclude Processes), Project_Overview.md (section 3B).
The engine can monitor specific processes' network activity and only trigger when ALL selected processes are idle. Smart suggestions automatically float high-traffic apps to the top.
rust-best-practices— For trait design (ProcessProvider), clean error handling, and unit testing with mocks.rust-async-patterns— For concurrent per-process polling, stream-based process data collection, and JoinSet for managing multiple monitoring tasks.
Phase 1 (network monitoring foundation).
The React frontend cannot directly access OS-level APIs. Tauri provides a secure bridge (#[tauri::command]) between the Rust backend and the JavaScript frontend. This phase wires everything together.
Create Tauri command functions that call into core/:
get_network_interfaces()→ returns list of interfaces.get_current_speed()→ returns{ download_bps, upload_bps }.start_monitoring(config)→ starts the engine with a generic trigger/condition/action config (not hardcoded network params).stop_monitoring()→ stops monitoring.pause_monitoring()/resume_monitoring().get_monitoring_status()→ returns current state (Idle,Monitoring,TriggerPending,Countdown(remaining_secs),Executed).cancel_action()→ cancels pending action during countdown.execute_action_now()→ immediately executes during countdown.get_running_processes()→ returns process list sorted by network usage.get_available_triggers()→ returns list of registered trigger types (network, process, future: CPU, timer, etc.).get_available_actions()→ returns list of registered action types.get_activity_logs()→ returns log entries.get_settings()/save_settings(config).
⚠️ Strategic Shift Enforcement: Thestart_monitoring(config)command must accept a genericMonitoringConfigthat specifies which trigger type to use, which condition parameters apply, and which action to execute. Do NOT accept hardcodedthreshold_kbpsandduration_secsparameters directly. Wrap them inside a trigger-specific config variant. SeeStrategic_shift.md.
Use Tauri's event system (app.emit()) to push real-time data to the frontend:
speed-updateevent every 1 second with{ download_bps, upload_bps }.monitoring-state-changeevent when state transitions.countdown-tickevent every second during the 30-second countdown.pre-warningevent 60 seconds before action.
Create shared TypeScript types in the frontend (src/types/) mirroring all Rust structs:
NetworkInterface,SpeedData,MonitoringState,MonitoringConfig,ProcessInfo,LogEntry,AppSettings.
Configure capabilities in tauri config to allow:
- System power commands (shutdown, restart, sleep, hibernate).
- Process enumeration.
- File system access (for config + custom alarm sounds).
- System tray.
- Auto-start registration.
- Audio playback.
Project_Development_Overview.md (section 3 — Communication Layer), Project_Overview.md (section 4 — Communication Layer), Tauri 2.0 IPC documentation.
The frontend can call invoke('get_current_speed') and receive real-time speed data. Events stream from Rust to React. All types are shared and type-safe.
tauri-v2— Critical for this phase. Follow command registration patterns (generate_handler!), event emission (app.emit()), channel streaming, state management (Mutex<T>), and capability/permission configuration.understanding-tauri-architecture— To ensure thecore/→src-tauri/bridge follows the correct IPC security model.typescript-advanced-types— For creating discriminated union types (MonitoringState), generic invoke wrappers, and type-safe event listeners.
Phase 0, Phase 1, Phase 2.
Before building any feature screens, we need the visual foundation: color tokens, typography, component primitives, and the app shell (navigation layout). The UI_UX_Plan mandates a matte aesthetic with strict color discipline.
In tailwind.config.ts, define the custom FlowWatcher palette:
slate-base: #1A1C23(dark bg),slate-surface: #22252E(card bg),slate-light: #F0F2F5(light bg).accent: #3ABAB4(matte cyan) — used for active states, buttons, selected items.warning: #E57373— used for countdown, cancel states.text-primary,text-secondary: #A0AEC0,text-muted.border-subtle: rgba(255,255,255,0.05)for dark mode surface separation.
- Import Inter or Geist from Google Fonts.
- Set as default font family in Tailwind config.
- Define heading sizes:
text-2xl font-boldfor page titles,text-lg font-semiboldfor section heads,text-smfor secondary info.
- Custom titlebar (optional via Tauri
decorations: false) with app name + status badge + window controls. - Top Pill Tab Navigation:
Dashboard|Advanced|Logs|Settings. - Content area below navigation with smooth 150ms fade transitions between tabs.
- Responsive padding and max-width constraints to keep content centered.
Install only the components we need:
Button,Card,Badge,Select,Switch,Tabs,Dialog,Popover,Input,Slider,Table,Toast,Tooltip,DropdownMenu,Separator,ScrollArea.
- Implement a
ThemeProviderusing React Context. - Auto mode: detect OS preference via
window.matchMedia('(prefers-color-scheme: dark)'). - Store preference in Zustand + persist to config.
- Apply theme class to
<html>element (dark/light).
UI_UX_Plan.md (sections 1, 2), Project_Overview.md (section 3D — UI Principles), Project_Development_Overview.md (section 2 — ShadCN + Tailwind).
The app opens showing a clean, empty shell with navigation tabs, correct matte color palette, proper typography, and working dark/light theme toggle. No functional features yet — just the visual foundation.
shadcn-ui— For installing and configuring components (Tabs, Button, Card, Badge, Switch, etc.), Tailwind CSS variable theming, and dark mode setup.vite— For dev server config, path aliases, and plugin setup.vercel-react-best-practices— For React component structure, performance patterns (memo, lazy loading), and rendering optimization.
Phase 0.
The Dashboard is the heart of the user experience. It's where users configure monitoring and start it — ideally in one or two clicks. The UI_UX_Plan defines a "Natural Language Trigger Builder" approach that makes the app feel premium.
- Two
Cardcomponents showing live download and upload speeds. - Speed values update every 1 second via Tauri
speed-updateevents. - Format speeds intelligently:
KB/s,MB/s,GB/swith auto-scaling. - Subtle animated sparkline graph (use a lightweight chart lib like
rechartsmini or a custom SVG path). - Small badge: "Interface: Wi-Fi" (auto-detected).
- Render as a readable sentence with inline interactive dropdowns:
- "When [Download ▾] is below [200 ▾] [KB/s ▾] for [2 ▾] [min ▾], then [Shutdown ▾] the PC."
- Each
[▾]element is aPopoverorSelectfrom ShadCN. - Options:
- Monitor mode:
Download Only,Upload Only,Both. - Threshold value: number input.
- Threshold unit:
KB/s,MB/s. - Duration: number input.
- Duration unit:
seconds,minutes. - Action:
Shutdown,Restart,Sleep,Hibernate,Sign Out,Lock Screen,Play Alarm.
- Monitor mode:
- All values are stored in Zustand and persisted.
⚠️ Strategic Shift Enforcement: The sentence builder and all config dropdowns must be driven by the available trigger/condition/action types from the backend (viaget_available_triggers()andget_available_actions()commands). When a new trigger type is added in the backend, the frontend should render its config options automatically — no frontend code changes needed. Currently only "Network" trigger exists, but the rendering logic must be generic. SeeStrategic_shift.md.
- Large accent-colored button: "Start Monitoring".
- On click: invokes
start_monitoring(config)via Tauri. - Button transforms to "Stop Monitoring" (secondary style) when active.
- Subtle pulsing dot indicator when monitoring is active.
- Status badge in the header area:
Idle(gray) →Monitoring(accent/green pulse) →Trigger Pending(yellow) →Countdown Active(warning/red pulse) →Action Executed(gray).
- Create
useMonitoringStorewith:config: MonitoringConfig(threshold, duration, mode, action).status: MonitoringState.currentSpeed: SpeedData.actions: startMonitoring(), stopMonitoring(), updateConfig().
UI_UX_Plan.md (section 3A — The Dashboard), MyOwn_thinking.md (Core Features, General Features), Feature_and_capability_defination.md (sections 1A, 3).
User opens the app, sees live speeds, reads the natural language sentence, optionally tweaks values via dropdowns, and clicks "Start Monitoring". The status indicator changes. The monitoring engine runs in Rust. The UI reflects the state in real-time.
shadcn-ui— For Card, Select, Popover, Button components with proper variant styling.vercel-react-best-practices— For efficient real-time updates (avoiding unnecessary re-renders from 1-second speed events), Zustand store patterns.
Phase 4 (Tauri bridge), Phase 5 (design system).
Process-based monitoring is the key differentiator. This UI must be accessible but not overwhelming — hidden behind a toggle so casual users never see it.
- Master toggle switch at the top: "Monitor specific applications".
- When disabled: the tab shows explanatory text ("Enable to select specific apps to monitor").
- When enabled: reveals the process selection interface.
- Fetch process list via
invoke('get_running_processes'). - Display as a searchable, scrollable checklist.
- Each row:
[checkbox] [app icon placeholder] Process Name (PID) — 2.3 MB/s ↓. - Auto-sort: highest network usage first.
- Smart suggestion badge on top processes:
Suggestedin accent color.
- Separate section or tab within Advanced: "Always Ignore These Apps".
- Users can add processes to a permanent exclusion list (e.g.,
svchost.exe,WindowsUpdate).
- When processes are selected, the Dashboard sentence updates: "When [3 selected apps] are below..."
- Clicking the "[3 selected apps]" text navigates to the Advanced tab.
UI_UX_Plan.md (section 3B), Feature_and_capability_defination.md (section 1B), MyOwn_thinking.md (Process based monitoring, Smart Process Mode, Exclude Processes).
Users can toggle on process monitoring, search/select specific apps, see smart suggestions, and the dashboard reflects their choices seamlessly.
shadcn-ui— For Switch toggles, ScrollArea, searchable checklists, Badge components.vercel-react-best-practices— For virtualized lists if process count is large, and efficient search/filter patterns.
- [From Phase 2] PlayAlarmAction — Audio playback via
rodiocrate. TheActiontrait is ready; needsrodiodependency +PlayAlarmActionimplementation incore/platform/src/actions.rs. - [From Phase 3] Combined trigger logic (global network idle + per-process idle) — The
ProcessTriggerandThresholdConditionexist independently; they need orchestration into a single monitoring loop.
Phase 3 (process monitoring engine), Phase 6 (dashboard).
This app controls system power. An accidental shutdown would destroy user trust permanently. The safety UI is non-negotiable and must be impossible to miss.
- When the engine emits
pre-warningevent, show a Tauri native notification or a custom slide-in toast. - Message: "Network idle detected. Action will execute in 1 minute."
- If app is minimized to tray, also show an OS-level notification.
- When
countdown-startedevent fires, bring the app window to the front via Tauri. - Display a prominent fullscreen-style dialog (ShadCN
Dialogwith overlay):- Large countdown number: "29..." updating every second.
- The chosen action name: "Shutting down..."
- "Cancel" button — large, obvious, primary style.
Esckey also triggers cancel. - "Execute Now" text button — subtle, secondary.
- The countdown ticks down via
countdown-tickevents from Rust.
- If cancelled: toast notification "Action cancelled. Monitoring paused."
- If executed: log the event (timestamp, action, trigger reason).
- In Settings: "Wait [X] minutes after threshold met before starting countdown" (default: 0).
- This adds a delay between detection and the 1-minute pre-warning.
UI_UX_Plan.md (section 3C), Feature_and_capability_defination.md (section 2 — Safety Features), MyOwn_thinking.md (30 sec warning, Notify user 1 minute before).
When the trigger fires, the user gets a 1-minute warning, then a highly visible 30-second countdown with clear cancel/execute options. No silent shutdowns. Ever.
shadcn-ui— For Dialog (overlay countdown), Toast (pre-warning notifications), Button variants (cancel/execute).tauri-v2— For bringing the window to front, native OS notifications.
- [From Phase 4] Event streaming runtime (
app.emit()) — Background polling loop that emitsspeed-update,monitoring-state-change,countdown-tick,pre-warningevents via Tauri. TheActionScheduleralready produces events; they need wiring toapp.emit()+ a tokio background task insetup(). - [From Phase 1]
NetworkIdleTriggerstruct — Concrete trigger combiningSpeedMonitor+ThresholdConditioninto a singleTriggertrait impl. Building blocks exist; needs the orchestration loop.
Phase 2 (action scheduler), Phase 6 (dashboard).
Users need transparency. They need to see what the app did, when, and why. Logs also help debug false triggers and build trust for an app that controls system power.
- Implement
ActivityLogger:- Log entry struct:
{ timestamp, interface_used, processes_monitored, trigger_reason, threshold_used, action_executed, was_cancelled, error }. - Store in a local JSON file (in Tauri's app data directory).
- Configurable log retention (default: 30 days / 1000 entries).
- Methods:
add_entry(),get_all(),clear(),export(format: TXT | JSON).
- Log entry struct:
- Display logs in a
Table(ShadCN) with columns:Date/Time | Trigger Reason | Action | Status. - Status column:
✅ Executed,❌ Cancelled,⚠️ Error. - Filter/search bar.
- Footer buttons: "Clear Logs", "Export as JSON", "Export as TXT".
- Toggle: "Enable/Disable Logging".
Feature_and_capability_defination.md (section 5), MyOwn_thinking.md (Task Logging, Activity Logs tab), Project_Overview.md (section 7).
Every monitoring session is logged. Users can view, filter, export, and clear their activity history from a clean table UI.
shadcn-ui— For Table component (log display), Input (search/filter), Button (export actions).rust-best-practices— For clean serialization patterns (serde) and file I/O in the Rust logging engine.
- [From Phase 4]
get_activity_logsTauri command — Requires the persistence layer. Skeleton TypeScript types (LogEntry) are already defined insrc/types/index.ts.
Phase 4 (Tauri bridge), Phase 5 (design system).
Users need to customize the app, and their preferences must persist between sessions. The app must also support auto-start on boot and screen management.
- Store settings as JSON in Tauri's
app_data_dir. - Saved preferences: last interface, threshold values, selected processes, action type, delay settings, theme, language, startup behavior, alarm sound path.
- Auto-save toggle (when enabled, saves on every change).
- Reset to defaults function.
- Import/export config file.
Organized in clean sections with ShadCN components:
- Appearance: Theme selector (Dark / Light / Auto), Language selector (future, placeholder for now).
- Behavior: Start on Boot toggle (uses Tauri
autostartplugin), Keep Screen On during monitoring toggle, Auto-save settings toggle. - Network: Manual interface selection dropdown (defaults to "Auto-detect"). Hidden in accordion.
- Delays: "Wait [X] minutes after detection before countdown" — number input with slider.
- Audio: Default alarm sound preview + "Choose custom sound" file picker (
.mp3,.wav). - Data: Clear all logs button, Reset settings to default button.
- About: App version, link to GitHub repository, license info.
- Use Tauri's
tauri-plugin-autostartto register/unregister the app with the OS startup.
Feature_and_capability_defination.md (section 6), MyOwn_thinking.md (Save Settings, Auto Start on Boot, Custom Alarm, Action Delay), Project_Overview.md (section 8).
All user preferences persist across sessions. The Settings tab is clean and organized. Auto-start works on Windows.
shadcn-ui— For Switch, Select, Slider, Input, Accordion, and Dialog components in the settings UI.tauri-v2— Fortauri-plugin-autostart,tauri-plugin-fs(file picker for custom alarm), andtauri-plugin-store(key-value persistence).
- [From Phase 4]
get_settings/save_settingsTauri commands — Requires JSON file persistence in Tauri'sapp_data_dir. Skeleton TypeScript types (AppSettings) are defined insrc/types/index.ts. - [From Phase 6] Play Alarm action in UI — The action dropdown currently shows 6 system actions.
PlayAlarmActionneedsrodiobackend (see Phase 7 deferred) + an entry inget_available_actions()+ optional custom sound file picker. - [From Phase 0] ShadCN UI components — Deferred due to Tailwind v4 incompatibility. Use
shadcn@canaryor continue with custom components. Decision needed here.
Phase 4, Phase 5.
A monitoring tool is useless if it must stay in the foreground. Users need the app running silently in the background while they game or work.
- Use Tauri's tray plugin to create a system tray icon.
- Tray icon shows a small FlowWatcher logo.
- Tooltip on hover:
FlowWatcher: D: 5.2 MB/s | U: 0.1 MB/s | Monitoring.
- Right-click menu items:
Start Monitoring,Stop Monitoring,Open Dashboard,---,Exit.
- When user clicks the window close (X) button:
- First time: show a dialog — "Do you want to minimize to tray and keep monitoring, or exit completely?" with a "Don't ask again" checkbox.
- Subsequent times (if preference saved): silently minimize to tray.
- Clicking the tray icon (single click) or "Open Dashboard" menu item restores the window.
- When countdown triggers, the window automatically restores and comes to front.
Feature_and_capability_defination.md (section 4 — System tray icon, Minimize-to-tray), MyOwn_thinking.md (System Tray Mode), UI_UX_Plan.md (section 4 — Silent Background Operation).
User clicks "Start Monitoring", closes the window. The app minimizes to the system tray. Monitoring continues. The tray icon shows live status. When a trigger fires, the app restores itself to show the countdown.
tauri-v2— For system tray plugin, tray menu configuration, window show/hide commands, and close-intercept behavior.
- [From Phase 5] Custom Titlebar (
decorations: falsein Tauri config) — Replace default OS decorations with a custom titlebar that includes window minimize/maximize/close buttons. The Tauri drag region is already set up inAppShell.tsx. - [From Phase 4] Tauri tray capabilities — Permission plugins for system tray need to be added to the Tauri capabilities config.
- [From Phase 10] Auto-Start Plugin —
tauri-plugin-autostartneeds to be installed and wired to the existing Settings toggle. The UI toggle exists but is currently non-functional. - [From Phase 8] OS-level notifications — Tauri notification plugin for pre-warning alerts when app is minimized to tray.
Phase 6 (dashboard must exist to restore to).
The project targets global users and open-source contributors worldwide. Hardcoding English strings now would require a painful rewrite later.
- Configure
i18nextwithreact-i18nextin the frontend. - Create
/locales/en.jsonwith ALL UI strings extracted from components. - Wrap every user-facing string in
t('key')calls. - Set up language detection (browser/OS locale) with English fallback.
- Dropdown in Settings tab: initially just "English".
- Structure allows contributors to add
bn.json,es.json, etc.
- Add
docs/TRANSLATION_GUIDE.mdexplaining how to add a new language.
Feature_and_capability_defination.md (section 7), Project_Development_Overview.md (section 7), OpenSource_Repo_Setup.md (section 11).
All UI strings are externalized. Adding a new language requires only adding a JSON file.
i18n-localization— For detecting hardcoded strings, setting up locale files, translation management patterns, and RTL support preparation.
- [From Phase 10] Language selector wiring — Settings page has a language placeholder dropdown. Needs to be connected to i18next locale switching once translations are set up.
Phase 5, Phase 6 (components must exist to wrap strings).
Professional open-source projects enforce quality automatically. This prevents regressions, ensures consistent code style, and makes contributors confident their PRs meet standards.
- Rust CI:
cargo build,cargo test,cargo clippy -- -D warnings,cargo fmt --check. - Frontend CI:
npm run type-check,npm run lint,npm run build. - Tauri Build: Build Windows
.msi/.exeinstaller onmainbranch pushes. - Fail PR if any check fails.
- Bug report template: OS, version, expected vs actual behavior, logs.
- Feature request template: problem, proposed solution, alternatives.
- PR template: what changed, why, how to test.
- Enforce conventional commits:
feat:,fix:,docs:,chore:,refactor:. - Optionally use
commitlintin CI.
OpenSource_Repo_Setup.md (sections 8, 9), Project_Development_Overview.md (section 11).
Every push and PR is automatically validated. Contributors get clear feedback. The main branch is always in a buildable, passing state.
eslint-prettier-config— For configuring ESLint CI checks, Prettier formatting enforcement, and TypeScript-specific lint rules.semantic-versioning— For conventional commit enforcement (commitlint), automated changelog generation, and version bumping strategy.
Phase 0 (repository must exist).
A system utility that consumes excessive resources or crashes on edge cases will be immediately uninstalled. This phase hardens the product for real-world use.
- Profile Rust backend CPU/memory usage during long monitoring sessions.
- Target: <50MB RAM, near-zero CPU when idle (from
Project_Overview.md). - Optimize polling intervals (configurable, default 1s).
- Debounce frontend UI updates (don't re-render sparkline 60 times/sec).
- Lazy-load Advanced and Logs tabs.
- Network adapter disconnects mid-monitoring → pause, notify user, wait for reconnection.
- Selected process exits mid-monitoring → treat as "idle", continue monitoring others.
- Hibernate not supported → disable option, show tooltip explaining why.
- User has no admin privileges → show clear error for actions requiring elevation.
- App crash during countdown → on restart, check if action was pending and ask user what to do.
- Ensure all interactive elements have proper ARIA labels.
- Keyboard navigation for all controls.
- Focus management in the countdown dialog.
- High contrast ratios (WCAG AA minimum).
- When enabled and monitoring is active, prevent the screen from sleeping.
- Use Tauri or platform API to set/reset display keep-alive.
Feature_and_capability_defination.md (section 9 — Performance Controls), Project_Development_Overview.md (section 8 — Performance Strategy), Project_Overview.md (section 5, 6), MyOwn_thinking.md (Keep screen on toggle).
The app runs for hours without memory leaks or CPU spikes. Edge cases are handled gracefully with clear user feedback.
rust-best-practices— For performance profiling patterns, memory-safe cleanup, and clippy perf lints.vercel-react-best-practices— For React render optimization, lazy loading, debouncing UI updates, and bundle analysis.tauri-v2— For platform API calls (keep screen on, window management edge cases).
- [From Phase 3] True per-process network usage via ETW — Currently using disk I/O as a proxy. Event Tracing for Windows (ETW) would provide accurate per-process network bytes. Complex to implement; evaluate if the proxy is "good enough" or upgrade is needed.
- [From Phase 4] Tauri auto-start capability — Permission plugin for
tauri-plugin-autostartneeds to be registered in capabilities config. - [From Phase 4/8] Event streaming runtime (
app.emit()) — Background polling loop emittingspeed-update,monitoring-state-change,countdown-tick,pre-warningevents via Tauri. Currently usingsetInterval/invoke()polling. TheActionSchedulerproduces events; they need wiring toapp.emit()+ a tokio background task. - [From Phase 1/8]
NetworkIdleTriggerstruct — Concrete trigger combiningSpeedMonitor+ThresholdConditioninto a singleTriggertrait impl with a real orchestration loop. - [From Phase 3/8] Combined trigger logic — Orchestrate global network idle + per-process idle into a single monitoring loop.
- [From Phase 10] Keep Screen On — OS API call to prevent screen sleep during active monitoring. The Settings toggle exists but is not wired to backend.
- [From Phase 10] Custom Alarm Sound — File picker for
.mp3/.wavusingtauri-plugin-dialog. RequiresPlayAlarmActionto be implemented first. - [From Phase 10] Network Interface Selection — Manual interface dropdown in settings. Auto-detect works well; this is low priority.
- [From Phase 10] Import/Export Config — Allow users to export and import their settings as a JSON file.
- [From Phase 9] File persistence for logs — Logs are currently in-memory only (1000 entry cap). Saving to Tauri
app_data_dirwould enable persistence across restarts. - [From Phase 9] Log retention by date — 30-day retention policy. Requires file persistence to be implemented first.
- [From Phase 9] Enable/Disable logging toggle — Settings toggle to turn off activity logging.
- [From Phase 7] Process list auto-polling — Process list is manually refreshed; could auto-refresh on interval.
- [From Phase 2/7] PlayAlarmAction — Audio playback via
rodiocrate. TheActiontrait is ready; needsrodiodependency +PlayAlarmActionimplementation + UI dropdown entry. - [From Phase 0/5/10] ShadCN UI components — Deferred due to Tailwind v4 incompatibility. Evaluate
shadcn@canaryor continue with custom components. - [From Phase 8] Configurable delay in Settings —
pre_warning_secsconfig field exists and is used; the Settings UI has a number input for it. Verify end-to-end wiring.
All prior phases.
The first release defines public perception. A polished v0.1.0 with clear documentation, a working installer, and professional branding will attract contributors and early adopters.
- Design app icon (clean, minimal, recognizable at 16×16 for tray).
- Create README banner image.
- Take clean screenshots (dark + light mode) for README.
- Clear description of what problem FlowWatcher solves.
- Screenshots / demo GIF.
- Installation instructions (download
.msifrom releases). - Quick start guide.
- Feature list with status badges (✅ Done, 🚧 In Progress, 📋 Planned).
- Contribution invitation.
- Configure Tauri bundler for
.msiand portable.exe. - Generate checksums for release artifacts.
- Tag version
v0.1.0. - Create GitHub Release with release notes, installer, checksums.
- Write public roadmap with milestones:
v0.1.0— Basic network monitoring + actions (current release).v0.5.0— Process-based monitoring.v0.8.0— Advanced action engine, CLI preparation.v1.0.0— Stable Windows release.
- Follow SemVer strictly (
0.x.xfor pre-stable). - Maintain
CHANGELOG.mdwith every release.
OpenSource_Repo_Setup.md (sections 4, 5, 6, 13, 14), Project_Development_Overview.md (sections 5, 12).
A professional GitHub repository with a working Windows installer, clear documentation, clean branding, and an inviting contribution process. Users can download, install, and use FlowWatcher v0.1.0.
semantic-versioning— For SemVer tagging, release notes generation, andCHANGELOG.mdmanagement.tauri-v2— For Tauri bundler configuration (.msi,.exe, icons, signing).
All prior phases.
Phase 0 (Scaffolding)
├── Phase 1 (Network Monitoring) ──┐
├── Phase 2 (Action Engine) ───────┤
│ └── Phase 3 (Process Monitor) ─┤
├── Phase 5 (Design System) ───────┤
│ │
├── Phase 13 (CI/CD) ─────────────(independent)
│ │
└── Phase 4 (Tauri Bridge) ────────┤ (depends on 1, 2)
│
Phase 6 (Dashboard UI) ────────┤ (depends on 4, 5)
├── Phase 7 (Advanced UI) ─────┤ (depends on 3, 6)
├── Phase 8 (Safety UI) ───────┤ (depends on 2, 6)
├── Phase 9 (Logs) ────────────┤ (depends on 4, 5)
├── Phase 10 (Settings) ───────┤ (depends on 4, 5)
├── Phase 11 (System Tray) ────┤ (depends on 6)
└── Phase 12 (i18n) ──────────(depends on 5, 6)
│
Phase 14 (Polish) ─────────────┤ (depends on all)
Phase 15 (Release) ────────────┘ (depends on all)
| Version | Includes Phases | Description |
|---|---|---|
v0.1.0 |
0, 1, 2, 4, 5, 6, 8, 13 | Core network monitoring, actions, dashboard UI, safety countdown, CI/CD. |
v0.3.0 |
+ 9, 10, 11 | Activity logging, settings persistence, system tray background mode. |
v0.5.0 |
+ 3, 7 | Process-based monitoring with smart suggestions. |
v0.7.0 |
+ 12, 14 | Internationalization foundation, performance hardening, edge cases. |
v1.0.0 |
+ 15 | Stable public release with full documentation and Windows installer. |
Note to the builder (human or AI): Always complete and verify each phase before moving to the next. Run
cargo testafter every Rust phase. Runnpm run build+npm run lintafter every frontend phase. Runnpm run tauri devafter integration phases. Never skip testing.