Time tracking that knows when you're in flow.
On your desk, in your browser, in your editor and in your pocket.
LifePete (the codebase is called Beats) gives you one place for the hours you put in. Start a timer with one click, or let the daemon notice that you've been deep in a repo for twenty minutes and offer to start one for you. At the end of the week you know where the time went, whether the day job's hours add up, and when you do your best work.
- Hosted, at lifepete.com. Sign in with a passkey and start
a timer; there is nothing to install or run. The Mac and phone apps, the daemon and the
VS Code extension pair with your account from Settings. It runs this repository's
main, and using it is what keeps the project going. - Self-hosted. Everything lifepete.com runs is here, under MIT. One
docker composefile brings up the database, the API and the web app on a single port; see Deployment.
- One-click timers, weekly goals. Per-project targets and caps, a ring for today, and a week that tells you what the rest of it needs.
- Day-job contracts. Hours as a percentage of full time, your region's public holidays, absences, and a running overtime balance you can trust.
- Flow Score. A local daemon measures how focused a session is, from the active app, idle time and context switches. Raw content never leaves your machine.
- Auto-timer and distraction shield. It suggests a timer when you're clearly working, and gives you a nudge when you drift during one.
- An AI coach. A morning brief and a chat that know your week, your flow and your recovery.
- Body data. Fitbit, Oura, HealthKit and Health Connect, with sleep set beside the next day's flow, plus chronotype detection.
- Insights. Contribution heatmap, daily rhythm, streaks, tags derived from flow signals, monthly retrospectives and a year in review.
- Painted, not plain. Two hours, afternoon and dusk: a sky over green hills behind every screen, in three densities.
- Yours to keep. Passkey sign-in, full JSON backup and restore, CSV export, webhooks, and a privacy dashboard to audit and delete signals.
| Surface | What it does |
|---|---|
Web app (ui/) |
The full experience: projects, contracts, insights, coach, settings. Installable as a PWA, with an offline timer. |
Desktop app (companion/) |
A native Mac window and menu bar item: the timer, flow, coach and body. Quick start, start the last project, stop and add to the note from any app, on keys you choose; a focus mode; and logging time you forgot. Also builds for iOS and Android, where it bridges HealthKit and Health Connect. |
Daemon (daemon/) |
beatsd, which runs in the background on macOS and Linux to compute the Flow Score, plus a CLI to query it from the terminal. |
VS Code (integrations/vscode-beats/) |
Tags flow windows with your repo, branch and language, and shows the live flow score in the status bar. |
Wall clock (wall-clock/) |
An ESP32 with LEDs and an e-ink display that shows the day's progress on the wall. |
┌─────────────┐
│ FastAPI │ ◄────► MongoDB
│ (Python) │
└──────┬──────┘
┌──────────────────────┼──────────────────────┐
│ ┌────────┼────────┐ │
┌──────┴──────┐ ┌────┴────┐ ┌─┴──────┐ ┌─────────┐ ┌─┴────────┐
│ React UI │ │ Flutter │ │ beatsd │ │ VS Code │ │ ESP32 │
│ (Vite/TS) │ │ app │ │ daemon │ │ ext │ │ clock │
└─────────────┘ └─────────┘ └───┬────┘ └────┬────┘ └──────────┘
│ │
└─heartbeat─┘
| Component | Stack |
|---|---|
| API | Python 3.14, FastAPI, PyMongo (async MongoDB), Pydantic v2 |
| UI | React 19, TypeScript, Vite, TanStack Query, Tailwind CSS v4 |
| Daemon | Go, macOS/Linux signal collection, Flow Score engine |
| Companion | Flutter (macOS, iOS, Android, Linux, Windows) |
| VS Code extension | TypeScript |
| Wall clock | ESP32 firmware (Arduino/C++), WS2812B LEDs and an e-ink display |
| Infrastructure | Docker Compose for self-hosting; Cloud Run and Firebase Hosting on Google Cloud (Terraform) |
# API: needs Docker, because testcontainers starts MongoDB for you
cd api && uv run --group dev pytest src/ -v
cd api && just run-locally # uvicorn on :7999
# Web app
cd ui && pnpm install && pnpm dev # Vite dev server on :8080
# Desktop app
cd companion && flutter run -d macos --dart-define-from-file=config/local.jsonA devcontainer is included for VS Code and GitHub Codespaces, with every dependency pre-installed.
beatsd pair <code> # pair it with your account
beatsd run --dry-run # see what it would send
beatsd run
beatsd status # paired? running? API reachable? today's flow
beatsd recent --here # the last hour of flow in this repo
beatsd top --here --json # top repos, languages and apps, ready for jq
beatsd open --here # open Insights filtered to this repoEvery read-side command takes --json, and --here stands for the current git repo.
daemon/README.md has the full reference.
api/ Python API (FastAPI + MongoDB)
ui/ React SPA (Vite + TypeScript)
companion/ Flutter desktop and mobile app
daemon/ Go daemon: signal collection + Flow Score
HomebrewFormula/ Homebrew tap for beatsd (this repo is the tap)
integrations/vscode-beats/ VS Code extension
wall-clock/ ESP32 firmware
shared/ Data shared across surfaces: app labels, brand name, logo
scripts/ Codegen that stamps shared/ into each surface
compose.selfhost.yml Self-hosted stack (Mongo + API + SPA on one port)
justfile Stack verbs (build, up, health, logs, backup) and the test sweep
terraform/ Google Cloud infrastructure (lifepete.com)
docs/ Design notes
cd api && uv run --group dev pytest src/ # unit + HTTP contract, against real MongoDB
cd ui && pnpm test # Vitest
cd ui && pnpm e2e # Playwright (needs the API running)
cd daemon && go test ./...
cd companion && flutter analyze && flutter test
cd integrations/vscode-beats && npm testLefthook runs linters and type checks on every commit (Ruff, ty, Biome,
gofmt, flutter analyze) and the full test suites on every push. GitHub Actions runs
the same checks on every pull request.
Self-hosted. compose.selfhost.yml runs MongoDB, the API, and an nginx that serves
the SPA and proxies /api, all on one port (http://localhost:6008). Copy
api/.env.example to api/.env and set its secrets, then name the database password
and the host the browser sees; the stack refuses to start without them:
export BEATS_DB_PASSWORD=<a long random string>
export BEATS_RP_ID=localhost BEATS_ORIGIN=http://localhost:6008
just build # build the images
just up-detached # start Mongo, the API and the SPA
just health # check the API through the same nginx a browser uses
just logs # follow all three
just backup <dir> # mongodump into <dir>lifepete.com runs on Google Cloud: the API on Cloud Run, built by Cloud Build with
Terraform owning its config, and the SPA on Firebase Hosting, shipped from
.github/workflows/ui.yml. That splits the SPA and API across two origins joined by
CORS, which nothing local resembles. Read Infrastructure in CLAUDE.md
before removing anything that looks like dead config.
These documents hold the decisions and designs behind what is built. What is not built yet — the plan behind an epic, drafts awaiting review, and the open work itself: bugs, follow-ups, what each plan still owes — is in roadmaps/. The GitHub issues filed before 2026-11-04 stay open there until they are done.
| Document | What it covers |
|---|---|
| Work Contracts | Day-job contracts: percentage of full time, regional holidays, absences, the overtime balance |
| Project Page | The project page built around where you stand, the week ledger behind it, and the afternoon and dusk theme |
| Billing | Clients a freelancer bills: rates and billable marks, the month's figures, billing budgets and the report links a client reads |
| Organisations | One account, one timeline, many employers: the four rules, the decisions, the data model, employment and scale |
| Pricing | What an organisation pays, decided against the vendors' own pages |
| Data handling | Every field stored, where, and how to get it back out |
| Privacy | What LifePete does with your data, in plain English |
| Architecture | How the API, the web app and the wall clock are put together |
| Companion | The Flutter companion: what it does on a Mac and a phone, its architecture, pairing and the API |
| Daemon | beatsd: the flow score, the auto-timer, and its CLI |
| Homebrew formula | This repo as the beatsd tap, and how a release reaches brew upgrade |
- Questions and ideas go to Discussions, bugs to issues, and vulnerabilities, privately, as SECURITY.md says.
- Contributing: CONTRIBUTING.md covers where to start, the hooks and how commits are split. Everyone is expected to follow the code of conduct.
- Help with your lifepete.com account: SUPPORT.md.
- Supporting the project: use lifepete.com, or sponsor it on GitHub Sponsors or Ko-fi.
MIT. See LICENSE.
