Cafeina
Cafeina is a local Windows keep-awake utility for long-running jobs (SQL, loads, downloads) — tray-resident, optional start-with-Windows, counts input events (clicks, keys, mouse travel) as totals only. No network, no telemetry. But nested inside it lives a second project: an opt-in, consent-gated collector of behavioral biometrics — keyboard and mouse — for research on human typing and navigation patterns.
What makes it interesting is the governance effort: LGPD (Brazil's
GDPR-equivalent) taken seriously on a personal project. Affirmative
consent before any local collection (TaskDialog with
durable evidence in consent-log.jsonl), a random
research identity (128 bits, not derived from the machine ID), a
separate deletion secret that lets a participant erase all their
cloud data on their own (DELETE /api/v1/user), a
documented data-processing impact assessment (RIPD), and a manual
user-triggered sync gated by 4 distinct consent checkboxes.
Technical invariant: no ordered key sequence longer than 3, no
per-event timestamps, never the typed text — enforced at write
time, not as a promise.
Two pieces. A Windows client in .NET 8 WinForms
(C#), with low-level hooks for timing + Raw Input to
attribute events to the correct physical keyboard (device change
splits the session), custom-drawn controls, runtime i18n
pt-BR/en-US, and local SQLite for aggregates only (bigrams/trigrams
as histograms — never text). Packaged as a self-contained
single-file exe (win-x64, ~157 MB) downloadable directly from the
site. A server in Fastify +
better-sqlite3 in a Docker container on the VPS,
behind nginx + Let's Encrypt, with an idempotent upload endpoint,
watermark, delete-all-by-key, rate limits, and a static homepage
that doubles as the LGPD privacy notice.