A Windows-only screen tracking system that captures screenshots every 5 minutes, analyzes them with local AI, and provides productivity insights through a web dashboard.
- Automated Screenshot Capture: Takes screenshots every 5 minutes on Windows
- Privacy Protection: Auto-blurs sensitive content (passwords, credit cards, emails)
- AI-Powered Analysis: Uses local Ollama with vision models for activity categorization
- Daily Summaries: Automatic generation of daily activity summaries
- Time Allocation Statistics: Detailed breakdown of time spent by app and category
- Productivity Suggestions: AI-generated recommendations for time management improvement
- Web Dashboard: Beautiful interface for viewing all tracked data
- Node.js + TypeScript
- Express.js (API server)
- node-screenshots (Windows screenshot capture)
- active-win (active window detection)
- node-cron (scheduling)
- better-sqlite3 (embedded database)
- sharp (image processing)
- Tesseract.js (OCR for privacy detection)
- ollama (local AI integration)
- Next.js 15 with App Router
- React 19
- Tailwind CSS
- Lucide React (icons)
- Node.js (v18 or higher)
- Ollama with a vision model installed (e.g.,
llavaorbakllava)
# Download Ollama from https://ollama.ai
# Pull a vision model
ollama pull llava- Clone the repository and navigate to the project directory:
cd "D:\Zhuobin Vide Coding\【review screen】"- Install all dependencies:
npm run install:all- Configure environment variables:
# Copy the example .env file
cp backend/.env.example backend/.env
# Edit backend/.env with your settings
# Default values should work for most casesStart both backend and frontend in development mode:
npm run devThis will start:
- Backend API server on
http://localhost:3001 - Frontend dashboard on
http://localhost:3000
- Build the project:
npm run build- Start the production server:
npm start- Pause: Click "Pause" button in the dashboard
- Resume: Click "Resume" button in the dashboard
- Manual Capture: Click "Capture Now" to take an immediate screenshot
# Via API
POST http://localhost:3001/api/analysis/generate/YYYY-MM-DDEdit backend/.env to customize:
# Server
PORT=3001
# Scheduling
CAPTURE_INTERVAL_MINUTES=5
IDLE_THRESHOLD_MINUTES=10
# Screenshot Quality
SCREENSHOT_QUALITY=85
# Data Retention
MAX_SCREENSHOT_AGE_DAYS=90
# Ollama
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=llava
# Privacy Features
PRIVACY_BLUR_PASSWORDS=true
PRIVACY_BLUR_CREDIT_CARDS=true
PRIVACY_BLUR_EMAILS=true
PRIVACY_AI_DETECTION=true- Today's activity overview
- Screenshot count and productivity score
- Time allocation by category
- Top applications used
- Daily summary text
- AI-generated suggestions
GET /api/screenshots- List screenshotsGET /api/screenshots/:id- Get single screenshotGET /api/screenshots/:id/image- Get screenshot imageGET /api/screenshots/today- Get today's screenshots
GET /api/analysis/:date- Get analysis for dateGET /api/analysis/times/:startDate/:endDate- Get time allocationPOST /api/analysis/generate/:date- Generate daily summary
GET /api/dashboard/today- Today's dashboard dataGET /api/dashboard/stats- Quick statisticsGET /api/dashboard/suggestions- Productivity suggestions
GET /api/system/status- System statusPOST /api/system/pause- Pause trackingPOST /api/system/resume- Resume trackingPOST /api/system/capture- Manual capture
All data is stored locally in the data/ directory:
data/
├── screenshots/
│ ├── original/ # Original screenshots
│ ├── blurred/ # Privacy-blurred versions
│ └── thumbnails/ # Gallery thumbnails
└── exports/ # Exported reports
Database: backend/database/screen-tracker.db (SQLite)
- Local-Only: All data stored locally, never uploaded
- Automatic Blur: Sensitive content detected and blurred before storage
- OCR Detection: Text detection for passwords, emails, credit cards
- Pattern Matching: Regex patterns for API keys, SSNs, etc.
- Window Title Detection: Blur known sensitive windows
If Ollama is not running:
- Start Ollama:
ollama serve - Verify model is installed:
ollama list - System will use fallback rule-based analysis
- Check system status in dashboard
- Verify backend is running on port 3001
- Check logs in
logs/directory
- Ensure
backend/database/directory exists - Check file permissions
- Delete
.dbfile and restart to recreate
screen-tracker/
├── backend/ # Node.js backend
│ ├── src/
│ │ ├── core/ # Screenshot, privacy, Ollama, scheduler
│ │ ├── storage/ # Database and file system
│ │ ├── analysis/ # Summarizer, time tracker
│ │ ├── api/ # Express routes
│ │ ├── config/ # Settings and constants
│ │ └── utils/ # Logger, helpers
│ └── database/ # SQLite database
├── frontend/ # Next.js dashboard
│ └── app/ # Pages and components
├── data/ # Screenshot storage
└── logs/ # Application logs
MIT
This is a personal project for time management and productivity tracking.