Home / Ops / Housekeeping and Process
Updated Jun 25, 2026 · OVERNIGHT-REPORT.md
Date: 2026-06-25. All three briefs are built, tested to the limit of this machine, and
committed in small steps. The one thing this Mac cannot do is compile an iOS app (no full
Xcode + CocoaPods), so every Apple/Xcode step is prepared up to the human gate and listed in
MORNING-FOR-JEFF.md. Nothing touched the locked demo. No em dashes anywhere.
A real consumer system of record and magic-link auth, ADDED to the existing
affirmology-studio API (one backend, three faces). The engine, render pipeline, and demo
are untouched.
api/db.py SQLAlchemy engine: Postgres in prod via DATABASE_URL, SQLite fallback for
dev/tests (so the night was never blocked on a live DB). Normalizes postgres:// to
postgresql://.api/db_models.py the full spec section 10 schema: person, membership, invite, auth_code,
sessions, structure, category, audio, the append-only event spine, feedback (with a
first-class NOTE), roadmap_item, suggestion, vote, chat_session/message, report_access. Tiers
and metering are first-class now even though beta is all free tier.api/auth.py magic-link / 6-digit code on our own users table: hashed at rest, single-use,
expiry, per-email rate limit, invite-gated allowlist, bearer sessions. Maps a known email to
its seeded studio chart.api/consumer_chat.py the scoped oracle: NO audio-creation or studio action tools (structural
guardrail), a deterministic refusal of audio-creation requests, support questions routed to a
separate Support Oracle, specialist routing with current names (Sri Agastya for Vedic).api/consumer.py the /api/auth/* and /api/app/* surface (me, home, library, audio,
events batch for offline sync, feedback, roadmap, suggestions, vote, chat, report, report
email) on the magic-link session, plus a team-token gated /api/app/publish so a rendered
audio becomes a catalog row (data-driven, no app release).api/consumer_seed.py + main.py wiring: on boot it creates the tables and seeds the invite
allowlist (jeff, sol, colin), the people with charts, founding memberships, and the 7 starting
categories.tests/test_consumer.py (12) cover auth request/verify/expiry/single-use/allowlist,
the session gate, the event spine, feedback-with-note, and the chat guardrail.New repo at affirmology-app/ (its own git). iOS first, bundle id ai.affirmology.app.
src/player.ts; offline events queue in src/eventQueue.ts and
sync on reconnect. 17 oracle photos in assets/oracles/.tsc --noEmit clean, expo-doctor 21/21, and a full iOS Metro bundle
export succeeds. eas.json is ready for TestFlight.Wrap the existing Studio web app as a native iOS app and let it sign in with the unified magic-link login instead of Cloudflare Access.
affirmology-studio/atlas-capacitor/ Capacitor project (Atlas, ai.affirmology.atlas, remote
server.url to the live Studio's new sign-in page). npx cap add ios generated the native
project; only pod install + the Xcode build remain (the morning gate).affirmology-studio/web/atlas-login.html a standalone, on-brand magic-link sign in (additive;
the live Studio is untouched). Stores the session under the key the Studio app already reads.api/main.py require_token ALSO accepts a founding-circle member's magic-link session, gated
by ATLAS_MAGIC_LINK (OFF by default, so the live Studio is byte-for-byte unchanged until you
set it on Render). tests/test_atlas_auth.py (7) cover the gate.Full studio test suite after all three: 138 passed, 1 failed. The 1 failure is the pre-existing
test_chart_cache::test_determinism_cached_vs_fresh (a chart-engine aspect-ordering issue that
predates this work and is unrelated to the app build).
[consumer] data layer up (sqlite); seed {...} in
the log). Once you set DATABASE_URL on Render it switches to Postgres with no code change.Backend (local):
cd /Users/jeffreyparker/CLAUDE/AFFIRMOLOGY/affirmology-studio
./start_public.sh # or however you normally run the studio API
# consumer endpoints live under /api/app/* and /api/auth/*
Consumer app (after full Xcode is installed):
cd /Users/jeffreyparker/CLAUDE/AFFIRMOLOGY/affirmology-app
npm install
npx expo run:ios # builds a dev client and launches the Simulator
# or, against a local backend:
EXPO_PUBLIC_API_BASE_URL=http://localhost:8000 npx expo start
Sign in with jeff@jeffparker.love; the backend emails a 6-digit code; enter it.
Verify the app without a device:
cd affirmology-app && npm run typecheck && npx expo-doctor && npx expo export --platform ios
Atlas (after Xcode + CocoaPods):
cd /Users/jeffreyparker/CLAUDE/AFFIRMOLOGY/affirmology-studio/atlas-capacitor
npm install && npx cap add ios && npx cap sync ios && npx cap open ios
All in MORNING-FOR-JEFF.md, each with the exact step:
1. Render Postgres: create it + set DATABASE_URL (billable plan choice + a live-service
redeploy, so I did not auto-do it). Backend runs on SQLite until then.
2. Xcode + CocoaPods are not installed on this Mac (blocks every iOS build/simulator run).
3. Apple Developer / App Store Connect: app records, an API key for EAS, testers, an APNs key.
4. Cloudflare: relax the Access policy on studio.affirmology.ai when you move Atlas to magic
link (and set ATLAS_MAGIC_LINK=1 on Render).
DATABASE_URL (MORNING section 1). The schema and seed
build themselves on boot.eas submit and push Atlas to TestFlight internal (fastest) and the
Affirmology app to the external tester group.POST /api/app/publish (team token) so the
library and player have content for the founders to test. This is a data operation, no app
release.