Felt Faction iOS app v1 — implementation plan

project Search related

Status: Draft. Awaiting sign-off on the 8 decision points at

the bottom before drilling into Phase 0 as bite-sized tasks.

For Hermes: Use subagent-driven-development skill to implement

task-by-task after the user signs off on the structure.

Goal: Build a native iOS app that replaces the Felt Faction web app for members, with vision-based chip counting, a Bank/Phoenix economy, Felty's voice, and admin-configurable seasons.

Architecture:

Functions)

Tech Stack:

generation, push triggers


Data Model (Supabase)

New tables

-- Personal access tokens (the gate)
CREATE TABLE invites (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  key TEXT UNIQUE NOT NULL,                    -- felt_xxxxxxxxxxxx
  member_name_placeholder TEXT,
  tier TEXT,                                    -- 'vip', 'high_roller', 'walk_in'
  is_used BOOLEAN DEFAULT FALSE,
  claimed_by_id UUID REFERENCES members(id),
  expires_at TIMESTAMP,                         -- 7-day default
  created_by_id UUID REFERENCES members(id),
  created_at TIMESTAMP DEFAULT NOW()
);

-- Season config
CREATE TABLE seasons (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  number INT NOT NULL,
  start_at TIMESTAMP NOT NULL,
  end_at TIMESTAMP NOT NULL,                    -- start_at + length
  length_days INT NOT NULL,                     -- customizable
  starting_chip_allocation INT NOT NULL,        -- X chips per member
  status TEXT DEFAULT 'active',                 -- 'pending', 'active', 'closed'
  bank_interest_rate DECIMAL DEFAULT 0.15,      -- 15% default
  no_show_tax INT DEFAULT 200,                  -- 200 CC default
  created_at TIMESTAMP DEFAULT NOW()
);

-- Bank loans
CREATE TABLE loans (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  member_id UUID REFERENCES members(id) NOT NULL,
  session_id UUID REFERENCES events(id) NOT NULL,
  season_id UUID REFERENCES seasons(id) NOT NULL,
  principal INT NOT NULL,
  interest_rate DECIMAL NOT NULL,
  accrued_interest INT DEFAULT 0,
  amount_repaid INT DEFAULT 0,
  is_paid_off BOOLEAN DEFAULT FALSE,
  created_at TIMESTAMP DEFAULT NOW(),
  paid_off_at TIMESTAMP
);

-- Season Awards
CREATE TABLE season_awards (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  season_id UUID REFERENCES seasons(id) NOT NULL,
  member_id UUID REFERENCES members(id) NOT NULL,
  award_type TEXT NOT NULL,                     -- 'phoenix', 'veteran', 'whale', 'drowning'
  value NUMERIC,                                 -- the metric (e.g., paid-back amount, attendance %)
  awarded_at TIMESTAMP DEFAULT NOW(),
  UNIQUE(season_id, award_type)
);

-- Chip set presets
CREATE TABLE chip_sets (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  name TEXT NOT NULL,                            -- "Standard", "High Roller", etc.
  denominations JSONB NOT NULL,                  -- [{"color": "white", "value": 1}, ...]
  reference_photos JSONB,                        -- {"white": "url", "red": "url", ...}
  created_by_id UUID REFERENCES members(id),
  is_default BOOLEAN DEFAULT FALSE,
  created_at TIMESTAMP DEFAULT NOW()
);

Extended tables (existing)

current_working_hand INT DEFAULT 0, current_net_worth INT DEFAULT 0

loan_disbursement, loan_repayment, interest_debit, no_show_tax)

chip_set_id UUID REFERENCES chip_sets(id), started_at, ended_at, status TEXT

working_hand_end INT, vision_pnl INT, self_attest_status TEXT ('pending', 'confirmed', 'disputed'), admin_override_pnl INT


App Structure (SwiftUI)

FeltFaction/
├── App/                          # App entry, scene config
├── Core/                         # Supabase client, auth, network, models
│   ├── Supabase/
│   ├── Auth/
│   ├── Network/
│   └── Models/
├── Features/
│   ├── Auth/                     # Invite + OAuth
│   ├── Briefing/                 # Pre-session content
│   ├── Session/                  # Buy-in, working hand, cashout
│   ├── Settlement/               # Live board, vision, self-attest
│   ├── Season/                   # Standings, awards
│   └── Settings/                 # Admin config
├── Felty/                        # System voice, message templates
├── Bank/                         # Loan logic, interest, debt tracking
├── Glance/                       # Widget + Live Activity
└── Resources/                    # Assets, strings, audio

Phased Build (10-14 weeks)

Phase 0: Foundation (1-2 weeks)

loans, season_awards, chip_sets)

event_attendance)

the iOS app, role-gated UI; single role-aware app, no separate web admin for invites)

feltfaction.app, Info.plist configuration, AASA verification)

Universal Link, passes to Auth feature, pre-fills welcome screen)

(App Store CTA + "your invite will be waiting for you after install" + retry mechanism)

Phase 1: Felty + Push (2-3 weeks)

for triggers

no-show, season finale, etc.)

(admin role), distributed via system share sheet

app generates token, composes Felty's message, opens system share sheet for distribution (Telegram, iMessage, email, QR, copy)

admin: "Olivia accepted. The House has 11 members."

invites (Connor generates QR, Olivia scans with iPhone camera, Universal Link opens the app)

Phase 2: Session + Buy-in + Vision (3-4 weeks)

storage

Sonnet / GPT-4V with one-shot prompt + reference colors

Phase 3: Bank + Phoenix (2-3 weeks)

winnings

resolution

Phase 4: Settings + Admin (1-2 weeks)

bank interest rate, no-show tax

denomination

season finale

Phase 5: Polish (1-2 weeks)

Total: ~10-14 weeks for v1.


Open Items (operational defaults)

These are defaults, not mechanics. Admins can tune via the settings page. The system needs some default to start with:

SettingSuggested defaultWhy
Starting chip allocation (X)500 chipsRound, fits in a 5-denomination chip set
Bank interest rate15%Steep, "real casino" feel (per v4)
No-show tax200 CCExisting House Rule #3
Default season length90 days (3 months)Existing 3-month season structure
Reference chip set5 denominations, 5 colorsStandard poker set

Decision Points (for sign-off before Phase 0)

  1. SwiftUI native (vs React Native / Capacitor). Recommended

based on Hydrolyze pattern + brand language fit + native features (Vision, Core Haptics, Live Activity).

  1. Server-side vision v1 (vs on-device Core ML). Recommended

for faster ship; on-device in v2 after collecting training data.

  1. Sign in with Apple as primary (vs Google as primary).

Recommended for App Store compliance + iOS UX. Google as fallback.

  1. Auth gating via personal access token (vs email invite link

or magic link). Recommended for security + audit trail.

  1. Web app stays as admin surface (vs killed entirely).

Recommended to keep Connor's keyboard-and-mouse workflow.

  1. Watch app deferred to v2 (vs v1). Recommended based on user

uncertainty ("I don't know if we need a watch app").

  1. Live settlement board on Connor's phone (vs a dedicated

iPad admin app). Recommended for v1; iPad is a v2.

  1. 10-14 week timeline. Recommended based on phased scope;

admin can compress by deferring Season Awards UI to v2.

  1. Universal Link as the distribution surface (vs copy-paste

token, magic link, or QR-only). Recommended for frictionless "tap once" flow. Token is in the URL; iOS app parses it.

  1. **iOS app is the canonical admin surface for invite

generation** (vs separate Telegram bot DM'ing members). Recommended: admin enters name in the iOS app, app composes Felty's message + Universal Link, opens system share sheet. No separate bot. Felty exists as a character in the iOS app only.

  1. Single iOS app, role-aware (vs separate admin app).

Recommended: same app, two roles (admin sees admin features, member sees member features). Role determined at auth time. Web app shrinks to marketing/static + un-migrated admin actions.

Updated timeline: 11-15 weeks for v1 (no change from previous; the iOS-only distribution is simpler than the bot-based flow).

Sign off on these and I'll drill into Phase 0 as the first bite-sized tasks (Xcode project setup, Supabase client, auth flow, RLS policies, basic app shell).


v2 (deferred, for context)


See also

v7 brainstorm (auth + gating, vision-test context)

Published and managed by TARS, an AI co-author built on Nathan's gbrain.