Kvrt
✦ ✦ ✦
Case study · Nº 02 · Personal management

LifeOS

My life-management system: tasks, notes, calendar, money and memory in a dashboard I host myself, with an MCP server so AI can read and write in it. It exists in two versions: one on Supabase at zero cost, and one on Laravel on my own server.

I · The problem

My life was out of the AI’s reach.

LifeOS is a personal system: the person with the problem was me. I use AI all day, but my tasks, notes, calendar and money lived in places it could not reach.

Problem 1access

The AI couldn’t read anything

To ask “what have I already written about this?” I had to copy and paste. No off-the-shelf tool let an AI read and write my data under rules.

Problem 2memory

Memory was locked in

Whatever an AI learns about me lives inside one client or one model. Switching models meant starting from zero.

Problem 3money

Credit cards were counted wrong

A credit purchase does not leave the account today: it becomes a bill. Typical apps treat it as an immediate expense, and the month’s balance is fiction.

Then came the second problem: v1 solved all of that at zero cost, but it had caveats it documents itself: plain-text passwords, a GitHub token in the browser, no limit on password attempts and no trail of what the AI changed. v2 was built to close those gaps without changing a single screen.

II · What I built

A dashboard the AI operates too.

I use it every day, often just by talking to Hermes on Telegram: “spent 80 at the grocery store” becomes a transaction, a lesson becomes a memory.

Areathe day

Hub and organisation

  • A hub with the calendar, a timeline and a summary of every area
  • Kanban tasks; every task belongs to a project
  • Markdown notes linked to one or more projects, with Mermaid diagrams
Areamoney

Finance with real rules

  • A credit purchase becomes a projected bill, and early payments are understood
  • Savings reserve: move money in and out without counting it as spending or income
  • Log an expense from the phone through a shortcut that calls a webhook
AreaAI

My own MCP server

  • 24 tools to search, create and edit (never delete)
  • The month’s finance summary, already computed with the credit and reserve rules
  • Long-term memory that survives switching models
Arearoutine

What runs on its own

  • A daily backup by e-mail, scheduled in Hermes
  • A public archive (blog) and gallery published from the dashboard
  • An end-of-day voice log that becomes a record
Fig. 1 · The hub: shortcuts to every area and a random quote each time it opens. Fictional data from dev mode.
Fig. 2 · Calendar and timeline; each event type has its own colour. Fictional data.
Fig. 3 · Finance: income, spending, the month’s balance and a reserve kept apart from spendable money. Fictional data.
Fig. 4 · Kanban tasks, filtered by project and type. Fictional data.
III · Two versions

The same LifeOS, two back ends.

The screens are identical in both versions. The migration rule was: the browser must not notice that the server changed. What changes is where data lives, how passwords are stored and how the rules are organised.

v1 × v2only the back end changes
v1 · Supabasev2 · Laravel
Runs onGitHub Pages for the screens and Supabase’s free tier for the dataDocker on my own server: nginx, PHP-FPM and PostgreSQL 16, exposed through a Cloudflare Tunnel
Back end18 Edge Functions in TypeScript plus database functions17 Laravel modules; each Edge Function became a module with its own Actions
ContractPOST {token, action, …} → {ok: true, …}The same envelope, on the same /functions/v1/lifeos-* paths
Screens14 pages of plain HTML, CSS and JS, no framework, no build stepThe same pages, served by Laravel; only the config, the login and the publish screen changed
PasswordsStored in plain text (v1 documents this)Hashed passwords, encrypted secrets and rate limits on password routes
Publishing the blogA GitHub commit using a personal token kept in the browserDone on the server, with no token in the browser
AuditNoneEvery change lands in audit_logs, an insert-only table
MCPOne TypeScript Edge Function with 24 toolsA hand-rolled JSON-RPC server in PHP with the same 24 tools, checked against a reference file
InstancesOne Supabase project per personMulti-tenant: each instance is an entity, created with lifeos:nova-instancia
CostZeroA server of my own
IV · Architecture decisions

Migrating without it looking migrated.

v2 was the first real system built on my modular Laravel template. These are the decisions that mattered most.

  1. Decision 01

    Freeze the contract and swap only what sits behind it

    Why

    v1 was already client/server with a single contract. Keeping the paths, envelope, error codes and HTTP statuses meant the screens I use daily did not need rewriting.

    The trade-off

    The new back end carries Supabase-named routes and a Resource per model that maps prefixed columns back to the old keys.

  2. Decision 02

    Prove parity with tests, not faith

    Why

    The MCP tools/list is compared with a reference file. The PHP finance summary is compared with the original Node version, backed by a mutation test. Screens were checked by hash.

    The trade-off

    The suite runs against real PostgreSQL (arrays and partial indexes), not in-memory SQLite. It is slower.

  3. Decision 03

    A hand-rolled JSON-RPC MCP server, not the official package

    Why

    laravel/mcp did not allow dynamic instructions. In LifeOS, the index of long-term memories goes into the server instructions on every connection.

    The trade-off

    I maintain the transport myself: auth through the URL path, response shapes and errors.

  4. Decision 04

    Self-contained pages, no framework

    Why

    In v1 no page imports a function from another. Touching one screen never breaks its neighbour, and an AI can write a whole page, because it is just HTML.

    The trade-off

    Repetition. The reserve rule, for example, lives in three places that must move together: the PHP service, financas.js and lifeos.js.

  5. Decision 05

    A synchronous queue, no Redis or Horizon

    Why

    Nothing in LifeOS is slow. An extra worker and Redis would just be more to run on the server.

    The trade-off

    It is a declared deviation from my own template. If heavy work shows up, the queue comes back.

V · What went wrong

Four real failures from daily use.

Because I use the system every day, bugs surface fast. Nearly all were about caching, environment or network, not business rules.

Case 01cache · finance

A reload showed different numbers

Symptom
Reloading the Finance page showed a different opening reserve and some different totals from what the ↻ button showed.
Cause
The path that painted the screen from cache did not restore the whole month’s state: the vocabulary and the opening reserve were missing.
Fix
Since Dec 2026, a reload paints the cache immediately and then runs the same revalidation as ↻ (vocabulary and current month). A Playwright test with a fake host reproduces the bug on the old version and passes on the new one.

LessonEvery path that paints from cache must restore all of the state. No boot shortcut that skips the network.

Case 02environment · production

A test password broke the production database login

Symptom
After a rebuild, the production app could no longer log in to its database.
Cause
To run the test suite, a test password had been exported in the shell (export DB_PASSWORD=…). The production compose file reads ${DB_PASSWORD} from the environment, so the rebuild carried the wrong password into the container.
Fix
Tests now run with env DB_PASSWORD=… command, which only applies to that process. The rule is written into the project skill.

LessonAn exported variable leaks into everything that runs later in the same shell.

Case 03network · backup

The daily backup came back 403

Symptom
The e-mail backup script failed with HTTP 403 and error code: 1010, while the same request worked with curl.
Cause
Cloudflare in front of the domain blocks Python’s default urllib User-Agent.
Fix
The script sends an explicit User-Agent. The job was created paused, tested for real, and only then switched on.

LessonError 1010 comes from Cloudflare, not the app. Before debugging the server, check who actually answered.

Case 04cache · notes

A note opened from the hub landed on the list

Symptom
Clicking a note on the hub opened the Notes screen on the list, not on the note.
Cause
The hub and the Notes screen had separate caches. A note only the hub knew about, such as one created through MCP, did not exist in the Notes cache.
Fix
The hub’s ↻ now also writes the other screens’ caches, and the Notes screen asks the server once before giving up.

LessonWhen an AI writes into the system, a screen cannot trust only what it has already seen.

VI · Numbers

What you can check.

Counts from the code, the test runs and the migration document. No personal data.

250v2 tests, all passingPest on PostgreSQL 16 · 2,013 assertions · Dec 2, 2026
24MCP tools, identical in both versionsdocs/dominio/MIGRACAO_LIFEOS.html
17modules in v2 (16 in the public template)app-modules · template README
18Edge Functions in v1counted in the v1 code · migration doc
14dashboard pages carried over to v2migration doc
37images (41 MB) moved off Supabase Storagev2 report v0.1.0
9themes, in light and dark variantsv1 public README
$0to run v1v1 public README

The v2 suite reports 37 passed tests and 213 with an environment warning (no .env file in the checkout), none failing.