Allin — infrastructure & how it all works
The single reference for every account, service, and piece of logic behind Allin — built for the move onto Allin's own Claude profile. It points to where each credential lives; it never contains the credentials themselves.
What Allin is & the stack at a glance
Allin is an iOS app for nervous-system / somatic "inner work" — a daily emotional check-in matches you to a guided audio "rewire" session, plus a personalised 10-step beliefs plan, an audio library, and a journal.
Client
iOS, SwiftUI. Repo Maelwi/allin-ios → local ~/Documents/allin-gh/allin-ios, branch main. Bundle com.allinwellltd.allin, App Store ID 6754271583, current v2.2 (build 5).
Backend
Supabase project wsxpmcbtcknewpiwudsc (us-east-1). Repo Maelwi/allin-backend. Postgres + Auth (Sign in with Apple) + Storage (audio) + one Edge Function (recommend-plan). Auto-deploys from main via GitHub Actions.
Growth & lifecycle
Segment SDK → Amplitude + Customer.io (EU) + Meta SDK. RevenueCat/StoreKit for subscriptions. Deep links on Cloudflare Pages (link.join-allin.com).
Accounts & logins
Every service and the account it lives under. Ownership matters for the migration — note the mix of marie@join-allin.com, info@join-allin.com, and Isabel's Apple ID. Confirm the ⚠ rows during the move.
| Service | Account / login | Key identifiers | Where the secret lives |
|---|---|---|---|
| Apple Developer / App Store Connect | Account holder isabel.lewren@gmail.com | Allin Well Ltd · Team 2L65759584 · App ID 6754271583 | ASC API key .p8 + Xcode signing on the build Mac |
| GitHub | Maelwi (Marie); collaborator isabellewren | Repos allin-ios, allin-backend (both private) | gh CLI auth / SSH keys on the Mac; Actions secrets in the repo |
| Supabase | Project "Maelwi's Project" | Ref wsxpmcbtcknewpiwudsc · us-east-1 · Pro | Personal Access Token in macOS Keychain; service-role key in Supabase secrets |
| Segment | Workspace "Join-Allin-Isabel" · info@join-allin.com | Source "Allin iOS" | Write key in iOS Info.plist + Supabase secret SEGMENT_WRITE_KEY |
| Amplitude | marie@join-allin.com | Project 835236 · org join-allin-253655 · NA · Free plan | API key in Segment destination (not needed client-side) |
| Customer.io | info@join-allin.com | Workspace 216147 · Site ID 6f711…1664 · EU region | Track API key in Segment destination; APNs key for push |
| Meta / Facebook | ⚠ confirm Business Manager owner | FB App 2131466234361765 | Client token in iOS Info.plist |
| RevenueCat | ⚠ confirm login | Subscriptions (StoreKit) | Public SDK key in iOS; secret key in RC dashboard |
| Cloudflare | marie@join-allin.com | Pages: allin-links, allin-priorities, allin-onboarding · domain link.join-allin.com | wrangler auth on the Mac; API token in Cloudflare |
| Google Workspace | marie@ / info@join-allin.com | Email domain + Drive (audio masters, Docs/Sheets) | Google account passwords (password manager) |
| Website (Squarespace) | Isabel | join-allin.com | Squarespace login (Isabel) |
| Claude (this work) | Migrating m@umancstudio.com → marie@join-allin.com | Artifacts + connectors | Anthropic account login |
How Allin works today
The core loop and the routing that powers it — verified against the current code.
The daily loop
- Check in — emotion, situation, intensity + body, and the belief beneath.
- Rewire session — matched guided audio, streamed from Supabase Storage.
- Reflect — pre/post mood + a note, saved to the journal.
- Return — journal, streak & progress (non-punitive).
Check-in routing (deterministic gates + AI)
Intensity is the gate, emotion is the content, intent is the lane. A crisis scan intercepts early → region-aware support screen (no audio). "Express": intensity ≥ 7 and unpleasant → straight to a soothe audio. known bug gate is 7, should be 8.
Recommender
Tier 1 = Postgres full-text search over the audio library (live). Tier 2 pgvector + Tier 3 shift-rating learning = sketched, not built. The Edge Function's Anthropic path exists but is dormant — the critical path is LLM-free.
10-step beliefs plan
Server-generated from an intake (areas + ratings + 4 free-text fields). Rating = life-area satisfaction (lower → more steps). Stored verbatim as intake_json; each step captures mood + shift_rating + feedback.
Architecture
iOS app
Core/AppView (routing), AuthenticationManager (Apple sign-in), SessionManager + SupabaseService (check-ins), BeliefsPlanManager/Service (plan), Onboarding/OnboardingFlow (8 steps), Core/DeepLink, Core/CrisisResources.
supabase-swift, analytics-swift (Segment), purchases-ios (RevenueCat), facebook-ios-sdk.
Backend / Supabase
recommend-plan (Deno/TS) — JWT-auth, deterministic + FTS.
GitHub Actions on push to main: migrations → db push, functions → functions deploy, audio metadata → re-seed. ~30–45s.
Bucket of guided-audio mp3s (public-read); only the onboarding video is bundled in the app.
Deep links
Cloudflare Pages allin-links → link.join-allin.com. Serves the AASA for universal links; non-iOS falls back (302) to join-allin.com. Paths: /home /checkin /plan /library /audio/* /journal /progress /profile /settings. Entitlement shipped in v2.2.
Push
APNs entitlement (aps-environment: production) + device token → Customer.io. verify APNs .p8 uploaded to CIO + production push confirmed on a prod build.
Data model
Public schema. Everything that keys on a user cascades on delete, so account deletion fully erases the database (verified). Free-text fields marked special-category are mental-health data.
| Table | Holds | Sensitivity |
|---|---|---|
| emotional_sessions | Check-ins: emotion, body, trigger, belief, memory, desired/new belief, reframe, pre/post mood, reflection_notes | special-category |
| beliefs_plans | 10-step plan + full intake (intake_json), llm_reasoning | special-category |
| beliefs_plan_steps | Per-step mood, shift_rating, feedback_text | special-category |
| user_entitlements | subscription_status, RevenueCat id, consent_granted_at (unused) | personal |
| users / auth.users | Account id + email (Apple) | personal |
| audio_library · app_config · checkin_config | Content + config (no personal data) | non-personal |
RPCs: delete_user() (cascading erase), search_audio_library(). See the GDPR plan for the pseudonymisation + encryption work on the special-category tables.
Analytics & lifecycle pipe
iOS (Segment SDK) + backend edge functions → Segment source "Allin iOS" → fan-out. Verified live in code.
| Destination | Purpose | State |
|---|---|---|
| Amplitude (835236) | Product analytics, "Allin — Core" dashboard | live · free plan |
| Customer.io (216147, EU) | Email + push lifecycle | pipe live, campaigns not composed/firing |
| Meta SDK | Ad attribution / conversions | live (since v1.8) |
| RevenueCat | Subscription events | live |
GDPR The pipe initialises at launch, before consent — see the GDPR plan (Phase 2) for gating it.
Docs & wikis we've built
Everything produced for Allin, and where it lives. The four wikis also have durable HTML copies in ~/Documents/allin-wikis/ ready to re-publish from the new profile.
~/Downloads/Allin-Knowledge-Base.pdf.~/Documents/allin-gdpr/.m@umancstudio.com Drive (migrate ownership to join-allin.com).allin_* files~/.claude/…/memory/ (indexed by allin_index.md).Connectors & a caveat
What this Claude environment can reach for Allin — and one important gotcha to fix on the new profile.
| Connector | Use for Allin | Note |
|---|---|---|
| Supabase (MCP) | Read/inspect the prod DB, run SQL | privileged — bypasses the redacted views; the GDPR plan restricts this |
| Google Drive (MCP) | Create/read Docs & Sheets | Under m@umancstudio.com today |
| Amplitude (MCP) | — | wrong account — authed to the Insights org, cannot see Allin's project. Re-auth to marie@join-allin.com on the new profile. |
| Cloudflare / wrangler | Deploy the public wikis + deep-link redirects | CLI auth under marie@join-allin.com |
Migrating to Allin's Claude profile
You're moving this work from m@umancstudio.com to marie@join-allin.com. Here's exactly how each piece travels — and how to "move" a wiki.
How to move a wiki (artifact)
Artifacts are tied to the Claude account that published them — they don't transfer between accounts, and the link stays owned by the old account. So you re-publish, you don't "move":
- The HTML for all four wikis is saved in
~/Documents/allin-wikis/(done). - Sign in to Claude as
marie@join-allin.comand open a session with this same folder. - Ask it to publish each file as an artifact → it mints fresh URLs owned by the new account.
- Update any cross-links, then retire the old artifact URLs.
Shortcut that needs no migration: the public Cloudflare copies (allin-priorities.pages.dev, allin-onboarding.pages.dev) live on Cloudflare, not Claude — they already work for anyone, on any account. Keep the Cloudflare login and they carry over untouched.
| Asset | How it moves |
|---|---|
| Wikis (artifacts) | Re-publish the HTML in ~/Documents/allin-wikis/ from the new profile (above) |
| Public wiki URLs | No move needed — they're on Cloudflare (marie@join-allin.com) |
| Google Doc & Sheet | Transfer ownership from m@umancstudio.com to a join-allin.com account in Drive |
Claude memory (allin_*) | Local files — copy the memory folder to the machine/profile you'll run the new Claude on |
| Amplitude MCP | Re-authenticate the connector to marie@join-allin.com so it can finally see Allin's project |
| Code, Supabase, Cloudflare, App Store | Nothing to migrate — they're their own accounts; the new Claude just needs the same CLI auth on the machine |