Skip to content

hadpadrahul/worklog-app

Repository files navigation

WorkLog App

Desktop work log tracker with hourly task prompts, optional screenshots, and Supabase sync. Built as a simple, single-file Python app.

Features

  1. Check-in / check-out with daily session tracking
  2. Hourly task popups (with snooze and auto-submit)
  3. Screenshot capture (toggleable) and admin preview
  4. Local SQLite storage + Supabase sync
  5. Admin/user roles with member management
  6. System tray minimize (pystray)

Requirements

  1. Windows 10/11
  2. Python 3.9+ (3.10+ recommended)

Setup

  1. Create and activate a virtual environment:
    python -m venv .venv
    .venv\Scripts\activate
    
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. Configure Supabase in .env:
    SUPABASE_URL=https://<your-project>.supabase.co
    SUPABASE_KEY=<your-anon-or-service-key>
    
    You can copy .env.example to .env.
  4. Run the app:
    python worklog_app.py
    

Supabase Tables

Create these tables in your Supabase project (column names must match exactly):

  1. work_sessions
    • session_id (text, primary key)
    • user (text)
    • check_in_time (text)
    • check_out_time (text, nullable)
    • synced (int)
  2. hourly_entries
    • id (int, primary key)
    • session_id (text)
    • hour_slot (text)
    • task_title (text)
    • task_desc (text)
    • synced (int)
  3. screenshots
    • id (int, primary key)
    • session_id (text)
    • capture_time (text)
    • file_name (text)
    • image_data (bytea)
    • synced (int)
  4. users
    • id (int, primary key)
    • username (text, unique)
    • password (bytea)
    • role (text)
    • created_at (text)
    • synced (int)

Usage

  1. Log in.
    • Default users (change these after first login):
      • admin / admin123
      • user / user123
  2. Click Check In to start the day.
  3. Fill the hourly popup when it appears.
  4. Use Break / End Break as needed.
  5. Click Check Out to end the day.
  6. Use Sync to push entries to Supabase and clear local synced data.

Settings

Open the Settings tab to adjust screenshot interval, break window, popup padding, and toggle screenshots. Settings are saved to settings.json.

Data & Logs

  1. Local DB: worklog.db (SQLite) in the app folder
  2. Logs: worklog.log (rotating)

Build a Windows .exe

See EXE_BUILD.md for PyInstaller steps (uses the included WorkLogApp.spec).

About

Python desktop app for hourly work logging, screenshots, authentication, and Supabase sync.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages