Your life makes colors. Your feeds cost them.
An iOS app where real-world activity — sleep, steps and happenings — produces colors. Colors are what you spend to open your feeds.
- Live — Sleep, walk, log the happenings of your day.
- See — Your canvas fills up. Colors accumulate.
- Spend — When you want into your feeds, spend colors through the PayGate.
A day is sleep(20) + steps(20) + happenings(60) = 100.
| Tab | View | Purpose |
|---|---|---|
| 0 (default) | Canvas | Generative canvas + the happenings palette |
| 1 | Feeds | App blocking groups — create tickets, set tariffs, configure time windows |
| 2 | Me | This week in three numbers, connected apps, the calendar of past days |
Settings is a button at the top right of Me, not a tab. Notes from Kosta —
the wall texts — is reached from inside Settings (Info → Notes from Kosta).
| Target | Description |
|---|---|
| Steps4 | Main iOS app (display name: Nowhere) |
| DeviceActivityMonitor | Extension — tracks app usage events and shield rebuilds |
| ShieldConfiguration | Extension — renders custom shield UI |
| ShieldAction | Extension — handles shield button taps and unlock flow |
| Steps4Tests | Unit tests |
| Steps4UITests | UI tests |
- HealthKit (Read) — step count and sleep hours
- Family Controls + Device Activity + ManagedSettings — app selection, monitoring, and shielding
- App Group —
group.personal-project.StepsTrader(shared state between app + extensions)
ManagedSettings shielding is active. Blocking/unblocking flows through ticket settings, DeviceActivity, and the shield extensions.
StepsTrader/
├── Views/ SwiftUI views (MainTabView, GalleryView, MeView, etc.)
├── Models/ Data models (DailyEnergy, CanvasElement, AccessWindow, etc.)
├── Services/ Business logic (HealthKit, Auth, Supabase, Persistence, etc.)
├── Stores/ State management (BlockingStore, HealthStore, UserEconomyStore)
├── Intents/ App Shortcuts and intents
├── Utilities/ Helpers (SharedKeys, ColorConstants, AppLogger, etc.)
├── Metal/ Metal shaders for canvas rendering
├── Resources/ In-app documentation and markdown content
└── Assets.xcassets/ App icons and images
DeviceActivityMonitor/ Extension target
ShieldAction/ Extension target
ShieldConfiguration/ Extension target
Steps4/ App bundle resources (Info.plist, entitlements)
Steps4Tests/ Unit tests
Steps4UITests/ UI tests
admin-panel/ Next.js admin dashboard (Supabase-backed)
tg-admin/ Cloudflare Worker Telegram admin bot
supabase/ Database migrations
OnboardingPreview/ Local SPM package — Xcode Previews for onboarding slides.
`Sources/OnboardingStoriesView.swift` is a SYMLINK to
`StepsTrader/Views/OnboardingStoriesView.swift` (single
source of truth). Don't "fix" the symlink — the package
target wouldn't compile without it.
Three prefixes recur across the codebase — once you know them the names self-document:
Energy*— model layer.EnergyCategory(body / mind / heart),EnergyOption(a single activity card with id + title + icon),EnergyRoutine(a named template),EnergySignature(visualisation type), etc.daily*— state that's anchored to the user's custom day boundary (dayEndHour/dayEndMinutein settings, not calendar midnight). E.g.dailyEnergyAnchor(the persisted day-start timestamp),dailyCanvasSlots(today's 4 canvas slots),dailyMoments(today's ephemeral one-off events).spent*— balance deductions.spentStepsTodayis base-energy used,appStepsSpentTodayis per-app/per-group cost dictionaries. The "Pay" / "PayGate" flows write into these.
Energy is earned from steps + sleep + selections, spent via PayGate to unlock
blocked apps. The custom day boundary determines when all the daily* keys reset.
Schemes registered in Steps4/Info.plist:
stepstrader://...steps-trader://...
Examples (see StepsTrader/AppModel.swift):
steps-trader://pay?target=<bundleId|alias>steps-trader://guard?target=<bundleId|alias>
Keys used in Steps4/Info.plist:
SUPABASE_URLSUPABASE_ANON_KEY
Move to .xcconfig (Debug/Release) or use CI secrets before shipping.
FamilyControls/DeviceActivity require a physical device (entitlements + system limitations).
xcodebuild -project Steps4.xcodeproj -scheme Steps4 -destination 'platform=iOS Simulator,name=iPhone 17' -configuration Debug build- admin-panel/ — Next.js dashboard for user management, global stats, and energy ledger. Password-protected, uses Supabase service role key.
- tg-admin/ — Telegram bot on Cloudflare Workers for interactive admin commands (
/stats,/user,/grant,/ban, etc.) with LLM-powered natural language queries.