A loose blueprint, for TK

/life, my personal operating system that also runs my blog

How Dave built a private app on top of one database that holds his journal, goals, health, travel and memories, and how the public blog at davehajdu.com reads from that same database. Take what's useful and skip the rest.

A short tour, narrated by Dave. Every screenshot uses sample data.

The idea

One question, one database

Am I living the life I intend to live?

Everything in /life exists to answer that question. Years of my life were spread across Notion pages, a travel app, a fitness band, Gmail, Google Photos and PDFs from the clinic. None of it talked to each other, so none of it could tell me whether this month was a good one.

So we pulled it all into one private Postgres database, put a small app on top behind a single login, and made the app run a loop: capture what happens, review the month, reflect, set the next goals. Once the data lived in one place, the blog became the obvious next tenant. My journal is where my ideas start, so the posts now live in the same database and get drafted from it.

The shape

Sources in, one inbox, three ways out

Every outside source lands in a raw inbox first. Claude extracts what matters. Confident results go straight to the tables; anything doubtful waits in a review queue for me to approve.

Sources → raw inbox → extraction → tables or review queue → app, assistants, blog

How the data is organized

Ten areas, three kinds of data, direction on top

The model is simple enough to hold in your head. That matters more than any feature.

Bodyhealth, fitness, labs
Mindjournal, learnings
Peoplerelationships
Moneyaccounts, net worth
Workcompanies, roles
Placestrips, flights, hotels
Timewhere the hours go
Directiongoals, reviews, vision
Admindocuments, renewals
Legacymemories, photos

Records

Things that happened, with a date and how sure we are of it (day, month, year or approximate). A move, a job, a surgery, a trip.

Measurements

A number on a day. Steps, recovery, weight, nights away. One row per metric per day, so a re-send overwrites instead of duplicating.

Entries

Writing. Journal days, forum updates, learnings, presentations. Full-text searchable, which is what the blog assistant mines.

The trick that keeps it cheap to grow: areas, metrics and sources are rows, not code. A new metric or a new source is an insert, not a schema change. Areas with a dark border are the ones I use daily today; the rest have tables waiting.

The schema

Every table in the database

42 tables in one Supabase Postgres project, grouped by what they do. Every table also has id, owner_id, created_at and updated_at, row-level security limited to the owner, and a comment on every column so Ask can read what each one means.

Frame

The lists everything else hangs off
areas
slug, name, sort_order, description
metrics
area_id, slug, name, unit, aggregation, direction, source_id, ref_low, ref_high
sources
slug, name, method, cadence, enabled, last_run_at, last_status, cursor
tags · taggables
name, color · tag_id, entity_type, entity_id
links
from_type, from_id, to_type, to_id, relation

What happened

Records, numbers and writing
records
area_id, kind, title, started_on, ended_on, date_precision, place_id, notes
measurements
metric_id, measured_on, value · one per metric per day
entries
area_id, kind, entry_date, title, body_md, fields, external_id, search (full text)
todos
parent_id, title, added_on, planned_on, done_on, dropped_on, sort_order, source
lab_results
record_id, document_id, tested_on, panel, analyte, value, unit, ref_low, ref_high, flag

Direction

Goals and reviews
goals
area_id, title, horizon, period, focus, track, metric_id, target_value, due_on, status
month_reviews
period, headline, grade_health, grade_business, health_md, business_md, moves_md, status
reviews · review_scores
period, one_word, headline, auto_summary · review_id, area_id, score, feelings

Places and memories

Travel and photos
places
name, city, country, lat, lng, kind, iata
trips
title, title_locked, start_on, end_on, primary_place_id, purpose, notes
trip_legs
trip_id, kind, status, provider, number, origin_place_id, destination_place_id, starts_at, start_tz, ends_at, end_tz
memories
google_media_id, storage_path, thumb_path, taken_at, width, height, caption

Waiting for phase 2

Tables exist, screens don't yet
people · interactions
name, relationship, closeness, contact_every_days · person_id, happened_at, kind
accounts · balances
name, institution, kind, currency, is_liability · account_id, as_of, balance, balance_usd
documents · obligations
storage_path, title, doc_date, text · title, kind, expires_on, renews_on
media
storage_path, taken_at, place_id, caption

Admin

Settings behind the login
integrations
provider, scope, expires_at · OAuth tokens for Whoop, Google
logins
name, category, url, vault_ref, has_2fa, status · a pointer to the password manager, never the password
addresses
label, kind, city, country, is_current

Plumbing

How data gets in, and the paper trail
source_items
source_id, external_id, received_at, payload, processed_at, extraction, error
review_queue
source_item_id, area_id, kind, proposed, confidence, reason, status
workflow_runs
workflow, started_at, finished_at, status, items_in, items_out, error

Content

The blog, same database
brands · brand_profiles
slug, name, site_url · voice, audience, rules, banned_words
post_pillars · campaigns
slug, name, description · name, goal, pillar_id, starts_on, ends_on, status
posts
brand_id, status, slug, title, title_tag, meta_description, excerpt, body_md, faqs, hero_image_url, scheduled_for, published_at, approved_version, approved_at
post_images · post_audit
post_id, url, alt, prompt, is_hero · post_id, actor, action, reason, version

Migrations live in the repo and run in order, so the whole database can be rebuilt from scratch. New metrics and sources are inserts into metrics and sources, not new tables.

What feeds it

Automate the boring sources, type the meaningful ones

Some sources were one-time imports and then switched off. That's fine. The goal was to get history in once, then stop depending on the old tool.

SourceHow it gets inCadenceStatus
JournalWritten in the app: the day's One Thing, gratitude, a free-write, to-dos, weight and blood sugarDaily, by handLive
GmailA Google Apps Script in my own inbox finds booking emails and posts them to an ingest endpoint with a shared secret. No OAuth app to maintainHourlyLive
WhoopOAuth connection from the Sources page; a cron re-reads the last 10 daysEvery 6 hoursLive
Apple HealthThe Health Auto Export iOS app pushes daily aggregates to an endpointDaily pushLive
Google PhotosThe Photos Picker: I choose the photos, they're copied into a private bucketWhen I wantLive
Lab reportsPDF stored privately, each result transcribed and checked against its reference rangePer panelLive
NotionFive years of daily journal pages and monthly forum updates. Carried-forward template text was stripped so each day holds only that day's writingOnceImported, retired
TripItCalendar feed used to backfill and cross-check old tripsOnceImported, retired

Every job writes a run row and updates its source's last run and status, so the Sources page shows at a glance when something stopped flowing.

How I use it

The ladder, and the pages around it

The home screen is one ladder from today up to five years, in two tracks. Health is the foundation under everything; if that rung is broken, the business rungs don't matter much.

Health
Business
5 years
Vision, values, the picture
Vision, values, the picture
Year
Year goal
Year goal
Month
One Thing this month
One Thing this month
Week
One Thing this week
One Thing this week
Today
One Thing today
One Thing today
Foundation
Recovery, sleep, weight
To-do list, above and below the line

Today and Journal

Write the day, drag to-dos above the line for today, log weight. Old Notion days show alongside app-written ones.

Goals and Review

Goals board with a track record per month. The monthly review drafts itself on the 1st from the month's data; I grade it in about 15 minutes.

Travel

Trips built automatically from flights and hotels, split at my home airport. Current, upcoming, past and a map.

Health

Fitness from Whoop plus a medical page with every lab marker charted against its range.

Memories and EO

Picked photos on a timeline. My EO forum updates, scores and presentations, kept apart from the journal.

Ask

Plain-English questions over the whole database ("how many times have I been to Australia?"), answered with the rows it used. Read-only.

The blog back end

The journal is the source, the blog is a view

Posts used to be hardcoded in the site and needed a deploy to change. Now they're rows in the same database, managed from a Marketing section inside /life. The public blog reads published rows and nothing else.

Idea→ Drafted→ Approved→ Scheduled→ Published

How a post gets made

  • The writing assistant reads a week or a month of journal days for raw material, plus the brand profile (voice, banned words, pillars).
  • It creates and edits drafts, generates a hero image and runs the checks. Every edit needs a reason and leaves an audit row.
  • I edit in the cockpit, approve, and pick a date. A daily cron publishes at 8am my time.
  • Publishing refreshes the post, the index, the home page, the sitemap and llms.txt, then fetches the live URL to confirm it responded.

The public side uses the low-privilege key. Row-level security lets anonymous readers see published posts, brands and pillars, and nothing from /life. Pages are static and refreshed hourly or on publish, so a database hiccup doesn't take the blog down.

Guardrails

Let the database say no

This holds my health data and my private writing, and AI assistants can reach it. The safety lives in Postgres, not in app code that might have a bug.

One owner

Supabase Auth with an allowlist of one email. Every table has row-level security so a broken page can't leak rows.

A role per assistant

Ask runs as a read-only role. The personal assistant can read journal, goals and trips, and only add to-dos and a couple of measurements. The blog assistant can only write drafts.

Secrets stay server-side

The powerful key is used only by ingest routes and scripts. Each source has its own ingest secret.

Private files

Documents and photos sit in a private bucket and open through short-lived signed links after an owner check.

Ask before guessing

Extraction below 0.8 confidence, or any conflict (two hotels on one night), goes to the review queue instead of the tables.

Invisible to search

/life is noindex and left out of the sitemap and robots file.

How we built it

Built in three days with Claude Code, polished ever since

Nov 1first /life commit, 2026
~90merged pull requests
1repo, one deploy, one database

The process

  • Brief first. A short HTML product brief: the question, the areas, the loop, wireframes.
  • Then a dev plan in Markdown: schema, workflows, and twelve PR slices, each with a gate that had to be true to merge.
  • Claude Code did the building, one small branch and PR at a time. I reviewed, merged, and Vercel deployed on push.
  • Use it, then fix it. Most of the later PRs are tiny: a field that got cut off, a button in the wrong place, a better default.

The stack

  • Next.js App Router and Tailwind, inside the existing personal site at /life
  • Supabase: Postgres, Auth, Storage, row-level security, separate project from the site's leads database
  • Vercel hosting and cron jobs
  • Claude for extraction, the monthly review and Ask
  • MCP endpoints so outside AI assistants get scoped access
  • Google Apps Script for the Gmail sweep

Phases

PhaseAreasWhat it unlocked
1 · The loopDirection, Mind, Body, PlacesJournal, goals, monthly review, health, travel, Ask. Done
MarketingContentBlog on the database, cockpit, publish gate, writing assistant. Done
2 · People and moneyPeople, Money, Work, AdminContacts and nudges, statements and net worth, renewals. Tables exist
3 · MemoryLegacy, TimePhotos started; family history, calendar time and reading still to come

Building your own

If I were starting over

  1. Write your one question first. Mine is about intention. Yours might be about energy, family, or money. It decides which areas you build first and which you ignore.
  2. Pick three or four areas, not ten. Make the tables generic enough for the rest, but only build screens for what you'll open every day.
  3. Choose one daily writing habit and move it in. The journal is what makes everything else meaningful, and it's what feeds the blog.
  4. Import history once, then cut the cord. Backfill from the old tools, strip the noise, and turn the sync off. Living with two sources of truth is worse than either.
  5. Put everything through one inbox. Keep the raw item, let the AI propose, and queue anything it isn't sure about. You'll trust the data because you saw the doubtful bits.
  6. Give every AI its own database role. Decide what it may read and write in SQL grants, not prompts. Log every call.
  7. Make the blog a view of your writing. Drafts can be assisted. Approval and publishing stay yours, tied to the exact version you read.
  8. Ship small and use it daily. A plan with gates, short PRs, deploy on push. The best features came from noticing what annoyed me that morning.