← Back to Portfolio

PersonalOS

How one person's daily routine became an invite-only, AI-onboarded daily operating system, built and run on Cloudflare's free tier.

Role
Product owner: problem, scope, decisions, design direction, acceptance. Engineering pair: Claude Code.
Timeline
November 2026. Nine shipped phases, each demoed, measured and committed, then a launch and a round of fixes from the first real user.
Platform
Installable web app for phone and desktop; works offline.
Running cost
₹0 a month on Cloudflare's free tier, sized for the first 100 users.
The Today screen: what's now, what's next, one tap to act.

The problem

Most routines don't fail at planning. They fail at the moment of doing: you lose track of what you meant to be doing at 3 pm, the reminder comes too early or not at all, logging the day feels like admin, and progress is either invisible or dressed up as streak confetti.

The tools for this are scattered: a calendar for time, a habit app for streaks, notes for reflection, a spreadsheet for weekly targets. None of them answers the only question that matters in the moment: what should I be doing now, and did I do it?

PersonalOS started as a tool for one person with six goals and a precise daily routine. The brief was to make that routine effortless to follow. Then, once it worked, the question became whether anyone could get the same thing without writing their routine down first.

Four jobs it has to do

Show what's now

Open the app and see the current block, time left and what's next. No scrolling, no planning screen first.

Remind at the right moment

A push notification when a block starts, or 5 or 10 minutes before, with Start, Done and Snooze on the notification itself. Silent during quiet hours.

Log in two taps

Counters with + and −, yes or no habits, a gym choice of full, fallback or missed. Works offline; syncs later.

Show progress honestly

A calm day score, a weekly scorecard against targets, and a streak per goal, where missing one goal doesn't break the others.

Product bets

The decisions that shaped everything else. Each was a bet against a common default.

"Now" beats planning

The home screen is the current block, not a calendar. Planning happens once, in templates; the day is for doing.

Offline is the default, not the fallback

Every change is written to the device first and queued; the network is an optimisation. A bad signal never blocks a log.

Honest over motivating

One score, 60% blocks done and 40% the log against targets. Nothing logged scores zero. No confetti; the design stays calm.

Rules decide, AI drafts

In onboarding, goals and what to track follow from the answers by fixed rules. The AI only drafts the schedule, and a person approves every word before it's saved.

Free until it isn't

Everything runs inside Cloudflare's free allowances, with a dashboard that shows how close we are, so the move to paid is a decision, not a surprise.

Your data stays yours

Export as JSON or CSV at any time, import back, delete the account in one step. Spelled out on a public privacy page.

How it was shipped

Nine phases. Each ended with the app running, screenshots at phone and desktop widths, a short demo of what changed, and a commit. Scope grew only after the previous phase was in use.

Phase 1Foundation

One Worker, one database, a locked door

App and API on a single Cloudflare Worker, D1 with migrations, the API locked behind Cloudflare Access, the design tokens.

Learned: putting reminders on the same Worker as the app (cron triggers) ruled out Pages from the start.

Phase 2Today

The screen people open fifty times a day

Now card with a progress ring, draggable timeline, tasks, two-tap log, day note, day score, and offline sync with an outbox.

Learned: screenshot reviews caught real problems: truncated task titles on phones, and "Not yet" painted in the same green as "Done".

Phase 3Reminders

Push that works on Android, desktop and iPhone

Web Push from a per-minute cron, a ledger so nothing sends twice, notification buttons, quiet hours, an iOS install guide, and in-app reminders when push is denied.

Learned: iOS only allows push from the Home Screen app, and shows no buttons. That became a one-time guide rather than a missing feature.

Phase 4Week, growth

The review loop

Weekly scorecard with one change for next week, charts, per-goal streaks, a job-search pipeline with funnel, spaced repetition, reading, a reel pipeline and a gym log, plus export and import.

Phase 5Polish

Accessibility and speed, measured

A contrast audit script, empty and loading states, Lighthouse 97 to 100 on every screen, then production on a custom domain.

Learned: splitting the code by screen saved 14 KB but cost 12 Lighthouse points, so it was reverted. Measuring beat the textbook answer.

PivotOne to many

Could anyone use this?

Research: hosting limits at 100 users, free AI models and their data terms, what must change. Decisions taken by the owner: stay free for now, Google sign-in, invite-only, build on a separate branch.

Multi 1Accounts

Google sign-in and data that stays apart

Every row keyed by user, invite-only sign-up, sessions, per-user timezones, and shared-device safety: a different person signing in wipes the last person's local data first.

Multi 2Generic

From my goals to anyone's goals

Goals and tracked items became data: counters, yes/no habits, daily limits with a step-down ladder, and choices. The original account converted with no visible change.

Multi 3AI onboarding

A plan from ten questions

A questionnaire, an AI-drafted schedule, a preview to edit, then save. See below.

Multi 4Operate

Run it like a product

Privacy page, self-serve account deletion, a per-user rate limit, suspension, and an admin dashboard for people, usage against free limits, and CPU.

Learned: the dashboard immediately showed the reminder cron running over its CPU budget, which led to the optimisation below.

LaunchMain domain

Go live, with a way back

Database backup, five migrations, merge, deploy, then checks against the live site: sign-in reaches Google, every API call without a session is refused, and the reminder cron runs at 4 to 9 ms. The original account's data waited under a placeholder owner until its admin signed in. The two test deployments were then retired.

Learned: a post-launch config review found production had no AI connection. Each environment needs its own, the deploy didn't complain, and new accounts would have silently got the rule-based plan. Fixed in minutes; a test now fails the build if it happens again.

IterateFirst real user

The plan was "a bit off"

The first person to onboard on the live site described their real day in the commitments box. The draft dropped a pickup during work hours and moved their stated workout. Reproduced with their exact answers, fixed, and re-run against the real model before shipping. See below.

Decisions and trade-offs

The calls that had real alternatives, and why each went the way it did.

DecisionOptions consideredChosenWhy
HostingPages plus a separate scheduler; a VPS; WorkersOne Cloudflare WorkerApp, API and per-minute cron in one place, free, and fast worldwide.
OfflineOnline-only with retries; full sync engineDevice-first writes, an outbox, last-write-winsNever block a log; simple enough to reason about for one person's devices.
Sign-in for manyKeep Cloudflare Access; email magic links; GoogleGoogle sign-in, invite-onlyAccess caps the free plan at 50 seats; email sending needs a paid plan or another vendor; Google is free and familiar on phones.
AI modelGemini free tier; Groq free tier; Claude Haiku; Workers AIWorkers AI, Llama 3.3 70BFree, same account, no key, and Cloudflare doesn't train on prompts. Gemini's free tier allowed about 20 drafts a day and may use prompts to improve its products.
What the AI decidesAI writes the whole plan; AI writes nothingRules for goals and tracking, AI for the scheduleTargets must be predictable; schedules benefit from judgement. Halves what the model writes, so more drafts fit the free quota.
Cost guardrailsPay as we go; hard global cap3 drafts per person a day, 120 writes a minute per personOne enthusiastic user can't use up everyone's free allowance.
Free vs paid planMove to Workers Paid ($5) nowStay free, watch the dashboardOwner's call. The trigger to move is visible: CPU and row meters on the admin dashboard.
ReleaseChange the live app in placeSeparate branch and deployment, merge when provenThe personal instance stayed usable every day while the multi-user version was built and tested.

AI onboarding

The original routine took an evening to write down. The multi-user version had to get a new person to a usable plan in about two minutes, without promising more than a free model can deliver.

  1. Ten questionsWake and sleep, work hours, commitments, goals, focus time, exercise, screen time.
  2. RulesGoals, what to track, weekly targets, a step-down screen-time ladder, sections to switch on.
  3. AI draftLlama 3.3 writes weekday, Saturday and Sunday schedules from a checklist.
  4. ValidatorPins the person's own timed commitments, drops bad times, overlaps and unknown goals; bedtime always last.
  5. PreviewRename, re-time or remove anything. Nothing is saved until "Use this plan".

Sage borders are fixed rules; the terracotta border is the only AI step.

The first real draft wasn't good enough

Testing with real answers showed the model's habits quickly. Instead of tuning by feel, each failure became a rule.

First draft

  1. Put job-search time inside work hours.
  2. Gave the top goal no time at all on weekdays.
  3. Made "Lights out" a ten-hour block from noon.

After two changes

  1. A weekday checklist built from the answers: work hours kept clear, a focus block for the top goal at the preferred time, exercise, family time, one short screen-time window.
  2. A validator that ends every day with "Lights out" at the stated time and drops anything after it.

The first real user found what testing missed

Test answers had used the form fields. A real person wrote their day in their own words: a morning drop-off, a 4pm pickup, a workout from 6 to 7:30, and family time until bed.

What the draft did

  1. Dropped the 4pm pickup: the prompt said nothing else happens during work hours, and the validator removed overlapping blocks.
  2. Moved the workout to 9pm and added a second "focus on fitness" block.
  3. Wrote a generic summary, because it was written before the plan.

What changed

  1. The model first copies every timed commitment into a separate list; the validator pins those and cuts other blocks around them, so they can't drift.
  2. The person's own words outrank the form, and work resumes after a commitment inside it.
  3. The focus block goes to a sit-down goal, and the summary is written last, naming real times.

Re-run with the same answers, the drop-off, pickup and workout landed at their stated times on every run. Remaining wobble, accepted: when the form and the free text disagree about work hours, the model sometimes follows the form.

A draft costs about 240 of the 10,000 free daily AI units (553 input and 1,086 output tokens in a measured run) and takes 20 to 30 seconds, so the screen says so. If the model fails, or a person has drafted three plans that day, a rule-based schedule built from the same answers takes its place, and the preview says which one it is.

Known gap, accepted for now: weekend drafts are often sparse. People fill them in on the preview.

Architecture

One Worker does everything: serves the app, answers the API, runs the reminder cron every minute, and talks to four outside services.

PersonalOS architecture Phones and desktops run the installable app with an offline store and a service worker. They talk over HTTPS to one Cloudflare Worker that serves the app, the API, sign-in, onboarding, the admin dashboard and a per-minute reminder cron. The Worker uses D1 for data, Workers AI for onboarding drafts, Google for sign-in, Cloudflare analytics for usage figures, and sends encrypted reminders through the browser push services, which deliver them to devices. Phone and desktop Installable app (PWA) React app Today, Week, Settings… IndexedDB + outbox writes land here first Service worker offline app shell, push + button actions One Cloudflare Worker free plan, 10 ms CPU per run Static assets: the app itself API (Hono + Zod)per-user CRUD, sync, export Sign-inGoogle OAuth + PKCE, invites, sessions Onboardingrules, AI draft, validator Adminpeople, usage, suspend Reminder cron, every minutefetches only blocks due now(indexed), claims a ledger row,encrypts and sends; median 5 ms CPU D1 (SQLite)every row keyed by user Workers AILlama 3.3 70B, JSON mode GoogleOAuth sign-in Cloudflare analyticsrequests, CPU, D1 rows Push servicesGoogle, Apple, Mozilladeliver to each device HTTPS + cookie sync, sign-in indexed SQL prompt → JSON code + PKCE GraphQL encrypted (VAPID) reminder with Start, Done, Snooze

A change, offline

Saved to IndexedDB and queued. The outbox replays it when online; the server keeps whichever copy was edited last, and caps device clocks so a fast clock can't win forever.

A reminder

Every minute the cron finds blocks whose start is due now, using indexes so reads don't grow with history. It claims a ledger row before sending, so nothing ever sends twice.

A new account

Google sign-in checks the invite, creates the account and a starter day, then the questionnaire. Applying a plan replaces goals and templates, and swaps only today's blocks not yet started.

Tech stack

App
React 19, TypeScript (strict), ViteOne bundle, about 137 KB gzipped.
Styling
Tailwind CSS 4 with the app's own tokensFraunces and Inter, self-hosted; light, dark and system themes.
Server state
TanStack Query over IndexedDB (idb)Screens read the device; sync runs underneath.
Interaction
dnd-kitDrag and drop that works with touch and keyboard.
PWA
Hand-written service worker, web manifestOffline app shell, push, notification buttons.
Testing
Vitest, Playwright80 unit tests, including one that fails if production loses its AI connection; end-to-end at phone and desktop sizes, including two-user isolation.
Runtime
Cloudflare Workers, static assets, Cron TriggersOne Worker per environment; no servers.
API
Hono, ZodValidation generated from the database schema.
Data
Cloudflare D1 (SQLite), Drizzle ORMSQL migrations in the repo; soft deletes; per-user keys.
Sign-in
Google OAuth with PKCE, joseInvite-only; hashed session tokens in D1.
Push
Web Push with VAPID@block65/webcrypto-web-push, tested inside the Workers runtime.
AI
Workers AI, Llama 3.3 70BJSON mode, validated output, rule-based fallback.
Delivery
GitHub Actions, WranglerChecks on every pull request; one-command deploys with migrations.

Quality and results

97–100Lighthouse performance, every screen, mobile
100Lighthouse accessibility; WCAG AA contrast in both themes
₹0monthly hosting, inside the free plan's limits
~240AI units per onboarding draft, of 10,000 free a day

The dashboard paid for itself on day one

The first look at real usage showed the reminder cron, which runs 1,440 times a day, using more CPU than the free plan allows. Measuring each run explained it, and also uncovered a hidden cost: a lookup with no matching index meant every run read every block ever stored, a number that would grow past the free database limit at around 100 users.

Reminder cronBeforeAfterWhat changed
CPU per run8–19 ms5 ms medianPlain SQL on the hot path, date formatters reused, validation built only when needed.
Rows read per runEvery block ever storedOnly blocks due this minuteIndexes that match each query; confirmed with SQLite's query plan.
Start-up time31 ms14 msLess work at start-up, which happens on most cron runs.
Workers on a cron31The preview stopped running one; after launch both test deployments were retired.

What I watch

Activation

Share of new accounts that finish onboarding and log something on day one. The questionnaire, preview and fallback all exist to move this.

Habit

Accounts active in the last 7 days, and how many turned reminders on. Reminders are the strongest pull back into the app.

Headroom

Requests, database rows, AI units and CPU against the free plan. Above 70% the dashboard says "Getting close"; that's the cue to plan the $5 move.

Trust

Errors per Worker and suspended or deleted accounts. Quiet is good.

What's next

Trim the heaviest requests

The dashboard shows a few requests above the 10 ms CPU allowance. None has failed, but the slowest 1% should sit under it: profile by route, then fix the worst.

Better weekends from the AI

A weekend checklist like the weekday one, since drafts tend to stop at midday.

Activation analytics

Count onboarding completion and day-one logging on the dashboard, so the funnel is visible without opening the database.

Open the source

Publish a clean public repository with neutral sample data, keeping personal history private.