Skip to content
TheXikPublic

About

iOS accountability app: lock distracting apps, friends approve every unlock

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

🔒 LockIn

An iOS accountability app: lock the apps that distract you, and let your friends decide when you get them back.

You pick the apps that eat your time and form a pact with friends. Once you're locked in, opening a blocked app shows a shield screen. To unlock it you send a request, and a friend from your pact has to approve it in real time.

Swift SwiftUI iOS Supabase PostgreSQL

Features

  • App blocking with Apple's Screen Time APIs (FamilyControls, ManagedSettings, DeviceActivity).
  • Pacts: create a group, invite friends with a code and hold each other accountable.
  • Unlock requests that friends approve or decline, delivered live through Supabase Realtime and push notifications.
  • Custom shield screen shown instead of the blocked app, with an action to request an unlock.
  • Sign in with Apple and per-user profiles.

Architecture

┌──────────────────────────── iOS app (SwiftUI) ─────────────────────────────┐
│  LockIn app            ShieldConfiguration    ShieldAction    DeviceActivity │
│  (pacts, requests)     extension (UI)         extension       Monitor ext.   │
│            └───────────── shared App Group + Shared/ code ────────────┘      │
└──────────────────────────────────┬──────────────────────────────────────────┘
                                   │ Supabase Swift SDK (auth, REST, realtime)
┌──────────────────────────────────▼──────────────────────────────────────────┐
│ Supabase: PostgreSQL with row-level security, Realtime, Edge Functions       │
│   functions/request-response   approve or decline an unlock request          │
│   functions/push-notification  APNs push to pact members                     │
└──────────────────────────────────────────────────────────────────────────────┘

The app ships as four targets generated with XcodeGen (project.yml): the main app plus three Screen Time extensions that share code and state through an App Group.

Project structure

Path What's inside
LockIn/ Main SwiftUI app: views, models, services
Shared/ Code compiled into the app and all extensions
ShieldConfiguration/, ShieldAction/, DeviceActivityMonitor/ Screen Time extensions
supabase/migrations/ Database schema and RLS policies
supabase/functions/ Edge Functions (TypeScript)

Getting started

  1. Install XcodeGen and run xcodegen in the repo root.
  2. Copy Secrets.xcconfig.example to Secrets.xcconfig and fill in your Supabase URL and anon key.
  3. Set your development team and open the generated Xcode project.
  4. Run on a real device (Screen Time APIs don't work in the simulator).

Full backend setup (Supabase project, migrations, Sign in with Apple, push notifications) is in SETUP.md, and the target and schema reference is in INFRA.md.

Author

Lukáš Hellesch · GitHub · LinkedIn

About

iOS accountability app: lock distracting apps, friends approve every unlock

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages