GitHub - overshard/timelite: Why is it 5 AM? Isn't there something simple I can use to track what I'm doing with all this time?

3 min read Original article ↗

Timelite Logo

Why is it 5 AM? Isn't there something simple I can use to track what I'm doing with all this time?

https://timelite.bythewood.me/

Why?

I want to casually track the time I spend on things without any overhead of signing into a service or even being online. All data stays in your browser (IndexedDB via localForage), there is no backend, and nothing is tracked or sent anywhere. Once the page has loaded it keeps working offline.

Timelite has been a great companion alongside more aggressive team-management software that sometimes doesn't let me swap between projects quickly and track time easily. I tend to hop from project to project and task to task regularly. Larger solutions carry a lot of overhead for basic time tracking. I track my time here and then enter it into those tools at the end of the day, in increments that make more sense.

For an overview of how to get this project running and why it's useful, check out the DB Tech video on it here: https://www.youtube.com/watch?v=woG6qOmxlOA

Privacy and offline

There is no account, no server, and no network call for your data. Every entry lives in your browser's IndexedDB. That also means your data is tied to that browser on that device: clearing site data wipes it, so use the JSON export if you want a backup or want to move between machines. Timelite is not installable as a PWA; the service worker was removed, but the app still functions offline because the data never leaves the browser.

Features

  • Timer with pause/resume and #hashtag note support
  • Log with per-day grouping, tag filtering, inline edit, manual entry, and import/export (CSV, JSON, Markdown)
  • Summary with charts for hours-per-tag and hours-per-day
  • Keyboard shortcuts, press ? anywhere to see the full map
  • Localized in English, Japanese, and Polish (language picker on the About page)
  • Local-only and offline-capable, all data stays in IndexedDB and never leaves the browser

Tech stack

  • Next.js (Pages Router) and React, plain JavaScript (no TypeScript)
  • Bun as the runtime and package manager
  • localForage for IndexedDB persistence
  • CSS Modules with a single global theme in styles/globals.css
  • chart.js, react-hook-form, react-hotkeys, react-toastify, react-transition-group, react-csv, and react-localization

All app state (timer, log, language, edit mode, and so on) lives in one React Context plus reducer in components/context.js and is saved to IndexedDB on every change, so there is no save button.

Clone

Whichever way you run Timelite, start by grabbing the repo:

git clone https://github.com/overshard/timelite.git

Development

You will need bun installed. If you don't have it yet, see https://bun.sh/ for installation instructions. Then run:

This serves Timelite on port 8000, reachable at http://localhost:8000. To produce a production build, run bun run next:build.

Production

Install Docker and docker-compose, then run the container on any server. restart: unless-stopped is configured so the container comes back up after restarts or crashes. Appending -d runs it detached:

Ports

To change which ports things run on, update the scripts in package.json. If you use Docker, also update docker-compose.yml to publish the new port.

Troubleshooting

Some changes won't automatically trigger a Docker rebuild. To force one:

docker-compose up -d --build

Here up starts the server, --build rebuilds the container, and -d runs it detached so you can set it and forget it.

If you previously used an older version and now see stale service-worker or filesystem errors in the console, the app now unregisters any old service workers on load. A hard refresh (Ctrl+Shift+R) clears them after one visit.