FocusLens
FocusLens is a macOS desktop application that improves eye contact and engagement during video calls. It runs fully locally with no cloud processing, ensuring complete user privacy while providing real-time gaze tracking, active speaker display, smart nudging, and post-call analytics.
- Stars
- 6
- Language
- TypeScript
- License
- MIT
- Updated
FocusLens
Privacy-First Real-Time Eye Contact Assistant
FocusLens is a macOS desktop application that improves eye contact and engagement during video calls. It runs fully locally with no cloud processing, ensuring complete user privacy while providing real-time gaze tracking, active speaker display, smart nudging, and post-call analytics.
Features
Real-Time Gaze Tracking
- Eye contact detection with <15 degree threshold
- Head pose estimation (yaw, pitch, roll)
- Pupil and eye center tracking
- ~60 FPS inference with <30ms latency
Dynamic Overlay System
- Compact Mode: Minimal floating bubble near webcam
- Expanded Mode: Full metrics and controls
- Speaker-Focus Mode: Active speaker prominently displayed
- Analytics Mode: Real-time engagement visualization
Smart Nudging
- Subtle visual cues when gaze drifts
- Directional glow effects
- Non-interruptive guidance during calls
Post-Call Analytics
- Attention timeline visualization
- Gaze heatmaps
- Engagement graphs
- Personalized improvement suggestions
Meeting Detection
- Auto-detects Zoom, Google Meet, Microsoft Teams, Discord, Slack, FaceTime, WebEx, BlueJeans
- Automatic session recording
- Platform-specific metadata
Calibration System
- 9-point grid calibration
- Polynomial regression mapping
- Cross-validation for accuracy
Privacy Controls
- Pause/resume tracking (global hotkey)
- Export and delete telemetry
- Webcam permission management
- 100% local processing
Architecture
Tech Stack
| Layer | Technology |
|---|---|
| Desktop Runtime | Tauri 2.x |
| Backend | Rust |
| Frontend | Next.js 14 + React 18 + TypeScript |
| Styling | Tailwind CSS |
| Animations | Framer Motion |
| Database | SQLite |
| GPU Acceleration | Metal (Apple Silicon) |
Project Structure
FocusLens/
├── apps/
│ └── desktop/ # Tauri desktop application
├── packages/ # Shared packages (future)
├── native/
│ └── rust-core/ # Rust backend modules
├── models/ # ML model files
├── SPEC.md # Detailed specification
└── README.md
Installation
Prerequisites
- macOS 13.0 (Ventura) or later
- Rust 1.70+
- Node.js 18+
Build from Source
# Clone the repository
git clone https://github.com/Manavarya09/FocusLens.git
cd FocusLens
# Install dependencies
npm install
# Build the frontend
cd apps/desktop
npm run build
# Build the Tauri application
cd src-tauri
cargo tauri build
Running in Development
cd apps/desktop
npm run dev
Or use the Tauri CLI:
cd apps/desktop/src-tauri
cargo tauri dev
Usage
- Launch FocusLens - The app opens to the main dashboard
- Grant Permissions - Allow camera and screen recording access
- Start Tracking - Click "Start Tracking" to begin gaze detection
- Join a Meeting - FocusLens auto-detects meeting platforms
- View Analytics - Check the Analytics tab after meetings
Keyboard Shortcuts
Cmd+Shift+P- Pause/Resume trackingCmd+Shift+O- Toggle overlay visibility
Configuration
Settings are stored in ~/Library/Application Support/FocusLens/settings.json:
{
"overlay_mode": "compact",
"overlay_position": { "x": 0.5, "y": 0.05, "monitor": 0 },
"eye_contact_threshold": 15.0,
"nudge_enabled": true,
"auto_start_meetings": true,
"target_fps": 60
}
Data Storage
All telemetry is stored locally in:
- Sessions:
~/Library/Application Support/FocusLens/telemetry.db - Logs:
~/Library/Logs/FocusLens/ - Settings:
~/Library/Application Support/FocusLens/settings.json
Security
- No cloud processing - all inference runs locally
- No data leaves your machine
- Telemetry can be exported or deleted at any time
- Camera access is only used for gaze tracking
Contributing
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
Development Setup
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install Node.js (using nvm)
nvm install 18
nvm use 18
# Install dependencies
npm install
# Run tests
npm test
Code Style
- Rust: Follow
rustfmtconventions - TypeScript: Follow ESLint rules
- Commit messages: Conventional Commits format
License
MIT License - see LICENSE for details.
Acknowledgments
- MediaPipe for face mesh models
- Tauri for the desktop framework
- ONNX Runtime for ML inference