A Progressive Web App for tracking work hours by project. Built with HTML, CSS, and vanilla JavaScript.
- ⏱️ Track time entries with date, start time, end time, and description
- 📊 View time summary by project
- 🔍 Filter entries by date range and project
- 💾 Data stored locally in browser (localStorage)
- 📱 Installable as a Progressive Web App
- 🔌 Works offline after initial load
The app needs to be served over HTTPS (or localhost) for PWA features to work.
Option 1: Using Python (if installed)
# Python 3
python -m http.server 8000
# Python 2
python -m SimpleHTTPServer 8000Option 2: Using Node.js (if installed)
# Install http-server globally
npm install -g http-server
# Run server
http-server -p 8000Option 3: Using VS Code
- Install "Live Server" extension
- Right-click on index.html and select "Open with Live Server"
Navigate to http://localhost:8000 in your browser.
- Chrome/Edge: Click the install icon in the address bar or use the menu to install
- Safari (iOS): Tap the share button and select "Add to Home Screen"
- Firefox: Click the install icon in the address bar
- Select the date of work
- Enter start and end times
- Enter or select a project name (autocomplete will suggest existing projects)
- Describe what you worked on
- Click "Add Entry"
- Set a date range using the "From Date" and "To Date" fields
- Optionally select a specific project from the dropdown
- Click "Apply Filter"
- Click "Clear Filter" to remove all filters
The summary section shows:
- Time spent on each project (filtered by current filters)
- Total time across all projects
All data is stored in your browser's localStorage. This means:
- ✅ Your data is private and stays on your device
- ✅ No internet connection required (after initial download)
⚠️ Clearing browser data will delete your entries⚠️ Data is not synced across devices
Time Tracker/
├── index.html # Main HTML structure
├── styles.css # Styling
├── app.js # Application logic
├── manifest.json # PWA manifest
├── service-worker.js # Service worker for offline support
├── icon-192.png # App icon (192x192)
├── icon-512.png # App icon (512x512)
└── README.md # This file
- Chrome/Edge: Full support
- Firefox: Full support
- Safari: Full support (iOS 11.3+)
- Opera: Full support
After making changes to the service worker:
- Update the
CACHE_NAMEversion inservice-worker.js - Reload the page
- The service worker will update automatically
If you need to clear the service worker cache:
- Open Developer Tools (F12)
- Go to Application tab (Chrome/Edge) or Storage tab (Firefox)
- Click "Clear Storage" or "Clear Site Data"