Anchor
Anchor is a cross-platform desktop application (macOS and Windows) designed for real-time, privacy-first focus tracking. By leveraging gaze detection and screen context, it helps users stay on task while providing session-level analytics, feature gating, and subscription-based access to premium functionality.
Project Details
Anchor uses gaze estimation and screen activity monitoring to determine user attention. If a user looks away from the screen or engages with unrelated applications, Anchor triggers custom in-app notifications. All data is stored locally during a session, and cloud sync occurs at session end, preserving user privacy.
The architecture separates system-level tasks (handled in Rust) from UI logic (React/TypeScript), connected through Tauri's secure bridge. A robust state layer built with Zustand ensures synchronized behavior between gaze tracking, screen awareness, and UI feedback.
Technologies Used
- Tauri – Desktop shell with Rust backend + WebView frontend
- Rust – Gaze detection, screen tracking, session logic
- React (TypeScript) – Frontend UI
- TailwindCSS – UI styling
- Zustand – State management
- Radix UI – Headless component primitives
- Framer Motion – UI animation and transitions
- SQLite – Local storage for sessions and analytics
- Supabase – User authentication, cloud sync, profile data
- Stripe – Subscription payments, billing portal
- Sentry – Optional error/crash monitoring (Rust + React)
Focus Tracking
- MediaPipe (C++ or WASM) – Real-time gaze estimation
- Rust subprocess/plugin – Bridges MediaPipe with UI state
Screen Monitoring
- macOS: CGWindowListCopyWindowInfo
- Windows: GetForegroundWindow, EnumWindows
Authentication & Licensing
- Supabase Auth – Sign-in and role management
- Stripe Webhooks – Updates subscription roles
- Offline License Token – Optional for local-only usage
Payments
- Stripe Checkout – Subscription purchases
- Stripe Billing Portal – User-managed billing
Analytics
- SQLite – Tracks session duration, distractions, productivity blocks
- React Dashboard – In-app visualization (no 3rd-party tracking)
Build & Deployment
- GitHub Actions – CI/CD for building macOS & Windows binaries
- Tauri Updater – Auto-updates via GitHub Releases
- Code Signing – Apple Developer ID, optional Windows EV Cert
Outcome
Anchor demonstrates how privacy-first apps can deliver real-time behavioral insight without compromising user data. Its offline-first architecture, advanced native integrations, and clean UI make it ideal for individual users, educators, and focus-driven professionals.