Focus

macOSweb appmobilePWASupabaseproductivitydesktop app

Focus (it started life as Rituals) is a tiny app for the check-ins I could never keep up in a notes file: deciding what matters this quarter, planning the week ahead, and noticing what actually went well. It runs as a native macOS app and as an installable web app on my phone, and both read the same database.

What it does

Three rituals, one quiet home for all of them:

  1. Quarter — set three targets. At the start of each quarter, pick the three outcomes that matter. Check them off as they land; a progress ring fills as you go. In the last month of a quarter you can plan the next one ahead of time.
  2. Sunday — set your top 3. Pick the three priorities for the week ahead and tick them off during the week, with a done date stamped on each.
  3. Friday — capture your wins. Write down up to three things that went well. Small or large, they get remembered.

Everything archives automatically, grouped by year and month — separate archives for priorities, wins, and quarters — so your history stays browsable instead of turning into an endless list. A “Due today” nudge appears on the right day, and you can edit this quarter’s targets, this week’s priorities, or this week’s wins inline whenever you want.

Reminders that know when to stay quiet. On a Mac, an optional reminder fires at 9am on Sundays, Fridays, and the first day of each quarter (plus a plan-ahead reminder the month before) — but only if that period’s ritual isn’t already done. It checks the database first, so a finished ritual never nags.

A read-only leadership view. A separate live dashboard shows my leadership team the current quarter’s targets, this week’s top 3, and the latest wins, updated in real time, so the people I work with can see what I’m focused on without asking.

How it’s built

  • No server to speak of. The app is a single-page HTML/JS UI (Tailwind) that talks directly to Supabase — Postgres, auth, and realtime — with row-level security locking the data to my account. The earlier FastAPI layer turned out to be unnecessary and was removed.
  • Data — three tables: one row per ISO week for priorities, one per week for wins, one per quarter for targets. Because there’s exactly one row per period, duplicates can’t sneak in, and every device sees the same history.
  • Desktop shell — a Python entry point serves the static page on a fixed local port and opens it in a native macOS WKWebView window via pywebview, with persistent storage so you stay signed in. Packaged into a standalone .app with PyInstaller.
  • Mobile — the same page is deployed to Cloudflare Pages as a PWA with a manifest and service worker, so it installs to a phone home screen and opens like a native app.
  • Reminders — a launchd agent runs a small Python script on the schedule above; banners go through a signed native Swift notifier so macOS treats them as real notifications.
  • Icon — an amber sunrise generated from a small Pillow script, so it’s reproducible rather than hand-drawn.

Get it

The code is on GitHub — use the Source link above. Build the Mac app with:

git clone https://github.com/stephenhefekta/rituals.git
cd rituals
./build.sh        # produces dist/Focus.app

Drag Focus.app to your Applications folder. It isn’t notarised by Apple, so on first launch right-click it → Open → Open.

Your targets, priorities, and wins live in your own Supabase project, so the same history follows you across every Mac and phone you sign in from. The README walks through the one-time setup: create the three tables, point the app at your project, and sign in.

Why I made it

The hard part of any ritual isn’t the doing, it’s the returning — week after week, quarter after quarter. I wanted something that made planning and reflecting feel like a thirty-second habit instead of a chore, and that quietly kept the receipts so I could look back and see the pattern. Three targets, three priorities, and three wins turned out to be enough.