Skip to content

Privacy-focused time tracking system for developers with GitHub integration and local LLM analysis

License

Notifications You must be signed in to change notification settings

OWASP-BLT/Fresh

Repository files navigation

Fresh Time Tracker

Privacy-focused time tracking system for developers with GitHub integration and local LLM analysis

License: MIT Cloudflare Workers TypeScript

Overview

Fresh is a comprehensive time tracking system designed specifically for developers who want to monitor their productivity without compromising privacy. It tracks your work across multiple sources while ensuring all sensitive data processing happens locally on your machine.

✨ Features

πŸ”’ Privacy First

  • Local LLM Processing: All screenshot analysis happens on your machine
  • No 3rd Party Upload: Screenshots and sensitive data never leave your device
  • Encrypted Storage: All data encrypted in Cloudflare KV
  • User Control: You decide what to track and when

πŸ“Š Comprehensive Tracking

  • GitHub Integration: Auto-track commits, PRs, issues, and reviews
  • Activity Monitoring: Track keyboard and mouse activity (privacy-focused)
  • Agent Prompts: Monitor AI assistant usage (Copilot, ChatGPT, etc.)
  • Screenshot Analysis: Optional local analysis for productivity insights

⚑ Modern Architecture

  • Cloudflare Workers: Global edge deployment for low latency
  • Durable Objects: Real-time session management with WebSocket support
  • KV Storage: Persistent, distributed data storage
  • TypeScript: Type-safe codebase

πŸš€ Quick Start

Prerequisites

node >= 18.0.0
npm >= 9.0.0

Installation

# Clone the repository
git clone https://github.com/OWASP-BLT/Fresh.git
cd Fresh

# Install dependencies
npm install

# Start development server
npm run dev

Flutter Desktop App (Linux)

A native Flutter desktop application is available for real-time activity tracking on Linux:

cd flutter_tracker
./run.sh

See flutter_tracker/SETUP.md for detailed setup instructions.

Features:

  • Real-time keyboard and mouse activity tracking
  • Live scrolling charts updated every second
  • Daily activity summaries
  • Compact window design
  • Privacy-focused (no keystroke/position logging)

Basic Usage

import TimeTrackerClient from './client/tracker-client';

const tracker = new TimeTrackerClient({
  apiUrl: 'http://localhost:8787',
  userId: 'your-user-id',
  projectId: 'your-project-id',
  enableKeyboard: true,
  enableMouse: true,
});

// Start tracking
await tracker.startSession();

// Your work happens here...

// End tracking
await tracker.endSession();

πŸ“š Documentation

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Client-Side    β”‚  ← User's Machine (Browser/CLI)
β”‚  Tracker        β”‚     - Activity monitoring
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜     - Local LLM analysis
         β”‚
         β”‚ HTTPS/WebSocket
         β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Cloudflare     β”‚  ← Edge Network
β”‚  Worker         β”‚     - API endpoints
β”‚  + Durable      β”‚     - Session management
β”‚    Objects      β”‚     - Real-time updates
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
    β”‚         β”‚
β”Œβ”€β”€β”€β–Όβ”€β”€β”€β” β”Œβ”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
β”‚  KV   β”‚ β”‚ Durable β”‚
β”‚ Store β”‚ β”‚ Objects β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ” Privacy Guarantees

What We Track βœ…

  • Activity patterns (counts only, no content)
  • GitHub events (public metadata)
  • Agent prompt metadata (lengths, names)
  • High-level activity classification

What We DON'T Track ❌

  • Actual keystrokes or text content
  • Screenshot images (only local analysis results)
  • Specific code content
  • Personal identifiable information

Screenshot Analysis

When enabled (requires explicit consent):

  1. Screenshot captured on your device
  2. Analyzed locally with your own LLM
  3. Screenshot immediately deleted
  4. Only generic classification sent to server (e.g., "coding", "debugging")

πŸ› οΈ Development

Project Structure

Fresh/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ api/              # API routes
β”‚   β”œβ”€β”€ modules/          # Core tracking modules
β”‚   β”œβ”€β”€ types/            # TypeScript types
β”‚   β”œβ”€β”€ durable-objects/  # Durable Objects
β”‚   └── utils/            # Utilities
β”œβ”€β”€ client/               # Client-side tracker
β”œβ”€β”€ examples/             # Example implementations
β”œβ”€β”€ docs/                 # Documentation
└── tests/                # Tests

Available Scripts

# Development
npm run dev              # Start dev server
npm run type-check       # Type checking

# Deployment
npm run deploy           # Deploy to Cloudflare

# Testing
npm test                 # Run tests

πŸ“¦ Deployment

Deploy to Cloudflare Workers

# Login to Cloudflare
npx wrangler login

# Create KV namespaces
npx wrangler kv:namespace create TIME_TRACKING_DATA
npx wrangler kv:namespace create ACTIVITY_DATA

# Update wrangler.toml with KV namespace IDs

# Deploy
npm run deploy

πŸ”§ Configuration

Environment Variables

Create .dev.vars for local development:

GITHUB_CLIENT_ID=your-github-app-client-id
GITHUB_CLIENT_SECRET=your-github-app-secret
ENCRYPTION_KEY=your-secure-encryption-key
LOCAL_LLM_ENDPOINT=http://localhost:11434

Local LLM Setup

For screenshot analysis:

# Option 1: Ollama
curl https://ollama.ai/install.sh | sh
ollama pull llava
ollama serve

# Option 2: LocalAI (Docker)
docker run -p 8080:8080 quay.io/go-skynet/local-ai:latest

🀝 Contributing

Contributions are welcome! Please read our Contributing Guidelines first.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“§ Support

πŸ—ΊοΈ Roadmap

  • Mobile app support (iOS/Android)
  • VS Code extension
  • Browser extension (Chrome/Firefox)
  • Jira/Linear integration
  • Team dashboards
  • Advanced analytics
  • Export functionality (CSV/JSON)
  • Custom reporting

Made with ❀️ by the OWASP-BLT community

About

Privacy-focused time tracking system for developers with GitHub integration and local LLM analysis

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •