DEV Community

Cover image for Building a self-hosted life OS that my AI assistant can actually use
Edris
Edris

Posted on

Building a self-hosted life OS that my AI assistant can actually use

My days used to live in five places: a to-do app, a habit tracker, a budgeting spreadsheet, a Pomodoro timer and a notes app. Each one was fine on its own. None of them knew about the others, so the question I actually cared about ("am I moving toward the life I want?") had no single place to live.

So I built one. Edi Life OS is a self-hosted dashboard for focus, habits, goals, projects and money, and it ships with an MCP server so an AI assistant like Claude can work with my real data. It's open source under the MIT license: github.com/edrisranjbar/lifeos.

This post is about the decisions behind it, including a few that were less obvious than I expected.

What's in it

Ten workspaces share one design, one sign-in and one database:

  • Overview: a daily score built from focus time, habit consistency, goal progress and finished work.
  • Growth: six life areas (spirituality, health, relationships and family, finance, self-growth, fun and rest), each linked to long-term goals, SMART goals, habits and tasks, with guided weekly, monthly and quarterly reviews.
  • Focus: a Pomodoro timer with a built-in soundtrack.
  • Habittify, Goals, Kanban, Calendar, Notepad, Notes.
  • Finance: expenses, income and budgets, plus debts and credits (one-time or recurring) that write straight into the ledger.

The point isn't the number of features. It's that they're connected: a habit can drive a goal's progress, a Kanban card shows up in the calendar, and the Overview turns all of it into one picture of the day.

Growth workspace: six life dimensions with SMART progress

Growth: six life areas, each with its own progress, habits and tasks.

Habittify: daily habit checklist with a seven-day chart

Habittify: small daily habits and a seven-day picture of consistency.

Kanban board with backlog, in progress, review and done columns

Kanban: labels, due dates and checklists.

Focus timer over an illustrated landscape

Focus: a Pomodoro timer with a soundtrack and a landscape that follows the time of day.

Boring stack on purpose

It's plain PHP 8, MySQL and vanilla JavaScript. No framework, no frontend build step.

That was a deliberate choice. I wanted something that runs on cheap shared hosting as easily as on a server, that I can still read in five years, and that has almost nothing to upgrade. Each workspace is a page; there is no bundler.

There are two ways to install it:

  • docker compose up -d with a .env file (PHP 8.3 + Apache and MySQL 8.4, with volumes for the database and attachments).
  • A release zip that matches cPanel-style hosting: extract it into your home directory, and public_html/ becomes the web root while the backend sits above it, out of public reach.

Keeping data safe without a framework

Most workspaces store their state as JSON documents in a single app_state table. That keeps the schema small, but it raises an obvious risk: two tabs (or a tab and an API client) editing the same document and silently overwriting each other.

So every save carries a revision, the SHA-256 of the document the client last saw. The server compares it inside a transaction with the row locked; if it doesn't match, it returns 409 Conflict instead of writing. The browser keeps your unsaved edits and asks you to reload. It's plain optimistic concurrency, and it means no client can quietly overwrite newer data.

Money that doesn't lie

The Finance workspace taught me the most.

Debts and credits are plans, not rows. A monthly rent payment, a loan split into twelve payments, or money a friend owes me once. Dues are derived when you look at a date range rather than created by a cron job, and each due has a stable ID (plan-id:index), so refreshing can never duplicate one.

A few rules turned out to matter:

  • Terms are fixed after creation. If you could edit a plan's amount, every past due would quietly change meaning. You can rename a plan, stop a recurring one from a date, or delete one entered by mistake, but only while nothing on it has been paid.
  • Month-end dates keep their anchor. A plan that starts on 31 January is due on 28 or 29 February and back on 31 March, not drifting to the 28th forever.
  • Paying is atomic. Recording a payment writes the decision and the ledger entry (an expense for a debt, an income for a credit) in one MySQL transaction, with revision checks on every document involved. Undo removes the entry only if you haven't edited it since.
  • Splits are exact. A total divided into N payments uses whole Toman amounts, with the rounding remainder in the last payment.

Letting an AI assistant in, carefully

This is the part I'm most excited about. Edi Life OS has a small HTTP API protected by a dedicated bearer token, and a stdio MCP server with 26 tools on top of it: dashboard, goals, tasks, habits, finance and notes.

That means I can ask Claude things like:

"Show me my dashboard."

"Create a SMART goal called Build a home studio, due in three months, and add Buy acoustic panels as a task."

"Mark Reading complete for today."

…and it reads or updates my real data.

The design rules I followed:

  • The MCP server only talks to the API. It has no database credentials, no SQL tool and no way to touch arbitrary state.
  • Destructive tools are marked as destructive, so the client asks before deleting anything.
  • Secret notes stay hidden unless the server explicitly allows them.
  • Writes are idempotent where possible (completing a habit twice is harmless), and the browser's revision checks mean an AI edit can never be silently overwritten by a stale tab, or the other way round.

Small things I care about

  • Reviews you can share without oversharing. After a weekly review, you can export a 1080×1350 image of your six-area scores. It contains numbers only; your reflections never leave the app.
  • Tehran time everywhere, because "today" should mean my today.
  • Light and dark themes, and layouts that work on a phone.

How it was built

I built Edi Life OS with heavy help from Claude Code: designing, writing and reviewing code, and testing flows in a real browser. I made the decisions; the AI did a lot of the typing and caught a fair number of bugs. Building software this way is a big part of why a one-person project could reach this scope, and the code is open for anyone to review.

Try it, and tell me what's missing

It's designed for a single owner, so it's a personal tool rather than a SaaS. I'd love feedback, especially on the MCP design and the debts-and-credits model. What would you want an AI assistant to handle in your daily planning?

Top comments (0)