Time Tracker App is a personal time tracker that runs only locally. It has no account, no cloud dependency and no subscription. All the data stays in one local SQLite file. It is part of the Useful Tools collection.
What it does
- Time tracking. Start a live timer, or log an entry manually. Each entry has one category, any number of tags and an optional comment. You can edit an entry in place, including its start and end time.
- Today, Week and Month. Three views of the tracked time. The Week header shows the ISO calendar week, from
CW 01toCW 53. - Reports. A summary of a week, a month or a quarter: time per category and per tag, a stacked hours-by-category chart, an entry-count line chart, and a written narrative of the period.
- Exports. The report as HTML, Markdown or PDF, every completed entry as CSV, and a copy of the raw SQLite database.
- Settings. The timezone (it sets the day boundaries), the first day of the week, the default entry mode and the default export format.
Why offline-first
A record of how I spend each hour of my day is personal data. I did not want to create an account or send it to a server to see a chart. So the whole application runs on my machine. The SQLite file is the database, the backup and the export at the same time: GET /exports/backup gives a consistent copy of it, made with the SQLite online backup API, even while the app is writing.
How it works
- Backend. FastAPI and SQLite. The HTTP contract was written first, in
app/API_CONTRACT.md, before the implementation. The database has six tables:categories,tags,entries,entry_tags,report_exportsandsettings. One module holds the canonical schema, the idempotent initialization and the migrations. - Frontend. A React single-page application with Vite and TypeScript. It proxies every
/api/*call to the backend. - Days are local. Timestamps are stored in UTC, but a “day” is a local thing. Every daily, weekly and monthly total uses day boundaries from the timezone in Settings. A regression test checks a UTC to Asia/Tokyo day boundary.
- A narrative without an LLM. The written summary of a period is rule-based. It names the top categories and their share, the busiest day, the daily average over the days with entries, and the top tag. There is no model call and no network call.
- One look for the app and the exports. The design tokens live in
design/tokens.css. The HTML and PDF exports use the same values from a Python module, and a test fails if the two drift apart. The charts in the exports are ports of the charts in the app. - Safe exports. The CSV export neutralizes cells that start with
=,+,-or@, so a spreadsheet does not run them as formulas. - Concurrency. SQLite runs in WAL mode with a busy timeout. The Today screen reads everything inside one read snapshot, so a write in the middle can not give an inconsistent answer.
How to use it
You need Python 3.11 or later, uv, Node.js and npm. Start the API with uv sync and uv run uvicorn app.main:app --reload. It answers at http://127.0.0.1:8000.
In a second terminal, run npm install and npm run dev in the frontend/ folder. The interface answers at http://localhost:5173.
Docker Compose is an alternative: one container for the backend and one nginx container for the frontend, with the database file bind-mounted from the host.
To try it without your own data, uv run python -m app.dummy_data generates a deterministic sample database. The generator refuses to overwrite a database that is not marked as dummy data.
How it was built
Every task had its own branch and pull request, and I reviewed and merged each one myself. A Claude Code orchestrator planned each task, specialist agents implemented it, a test agent added tests and a review agent checked the result. The orchestrator ran the quality gates again itself instead of trusting the agents’ reports.
- Backend: 253 pytest tests,
ruffand strictmypy. The first commit had 8 tests. - Frontend: 190 Vitest tests, ESLint and a TypeScript build.
Links
Code: github.com/neiro-data/useful-tools/time-tracker-app
Collection: Useful Tools