4 min readPost

Local-First AI Productivity: Why Your Data Should Never Leave Your Device

Most AI apps upload everything to the cloud. Locked In is local-first — your chaos, plans, moods, and streaks stay on your device unless YOU choose to sync. Here's why it matters.

You type your deepest academic anxieties into an AI planner. Where does that go?

Most apps: Straight to their servers. Analyzed. Stored. Possibly sold. Used to train models. Subpoenable.

Locked In: Saved in your browser. Syncs only if you explicitly sign in.

What "local-first" actually means

Default: saved data stays local

  • Open app → loads from cache → works offline
  • Type chaos → AI processes via API (only prompt + context) → plan returns
  • Plan saves to localStorage (lockedin-v3 key, migrated from lockedin-v2)
  • Mood check-ins, timer sessions, streaks — all local
  • Your saved data stays on your device unless you sign in

Optional: account sync (you control)

  • Sign in with Google or email → then Supabase sync activates
  • Data travels over HTTPS to your own account
  • Row Level Security on every table — auth.uid() only, anon grants revoked
  • You can sign out → local data remains, cloud data untouched
  • Clear all → wipes both local + cloud

What the AI sees (minimal context)

Each request sends only:

  • Current message + last 10 messages
  • Mode (Study/Chill/Crunch/Roast)
  • Effort level (Low/Mid/Max)
  • Aggregated stats — streak, completion rate, avg mood, preferred modes
  • Your last 5 plan outcomes and active goal titles (so plans adapt and aim)
  • Never: your name or email, the raw mood timeline, calendar events

Why this architecture is rare (and hard)

ChallengeMost AppsLocked In
Offline support❌ Requires connection✅ Full offline after first load
Conflict resolution❌ Server wins✅ Local wins, cloud merges
Encryption❌ TLS only (server decrypts)✅ TLS in transit; most data never travels at all
User control❌ All-or-nothing✅ Guest → signed in → guest seamlessly
Data portability❌ Export requests✅ Share card, ICS, copy JSON

Real privacy threats this prevents

ThreatCloud-first appLocked In
Data breach exposes your anxiety, grades, habits✅ Vulnerable❌ Not there unless you opt into sync
Company sells analytics to third parties✅ Common❌ No data to sell
AI training on your personal content✅ Often in TOS❌ Only aggregated stats
Government subpoena for user data✅ Must comply❌ Only ever your opted-in account rows
Employee access to your journals✅ Possible❌ Requires your signed-in account (RLS)
Company pivots/shuts down → data lost✅ Risk❌ Local copy always yours

The "but convenience" argument

"But sync across devices is convenient!"

Locked In gives you both:

  1. Guest mode — everything works locally, 5 free AI messages to start, zero friction
  2. Sign in — sync to your own account, same features, you decide when
  3. Sign out → back to guest, local data intact

No "create account to continue" walls. No "premium for sync." You own the data flow.

Technical details (for the skeptical)

Sync: HTTPS (TLS) in transit; rows stored in your own Supabase account behind Row Level Security

  • auth.uid()::text = user_id on all 4 policies (SELECT/INSERT/UPDATE/DELETE)
  • anon role: ALL GRANTS REVOKED — zero anonymous access
  • PKCE auth flow (no implicit flow token leakage)

Storage key: lockedin-v3 in localStorage (existing lockedin-v2 data is migrated once, old key kept as backup)

  • Migrates legacy sb-*-auth-token sessions automatically
  • consumeSignedOutFlag() prevents immediate re-redirect after sign-out

Try it — verify yourself

  1. Open lockedn.in in incognito
  2. "Start free" → "Continue as guest"
  3. Type something personal
  4. Get plan → complete it → check streak
  5. Open DevTools → Application → LocalStorage → lockedin-v3
  6. See your data. See NO network requests to Supabase.
  7. Close tab → reopen → data persists

That's local-first. Your chaos, your device, your choice.


Locked In: Free, local-first, private-by-default AI productivity. Try it here — no account required. Who builds it and why.

— Locked In

More posts

Put it into practice

Plan your next study session with AI

Locked In turns your chaos into a deadline-paced plan — free to start, no credit card.

Try Locked In free