Work / Plan-Kid / Architecture
Plan-Kid architecture
Nothing runs yet. There is no app code, only HTML designs. This page is the plan: a phone app, a small server that decrypts journal entries so Claude can write the weekly couple report, and paid services around it. The stack is not settled.
last verified 2026-10-30
Running cost today
$0
Nothing is built or deployed. The repo holds designs and notes only (CLAUDE.md).
Planned cost a month
$8 + Claude
The wiki says about $8 plus metered Claude calls. It does not say what the $8 covers, and no Claude rate is recorded.
Open decision
Which stack
Supabase and Clerk (FEAT-0003) or Firebase (the house scaffold). Task T003 decides.
How it fits together
Pick something a user does to see its path and what it costs.
Not read
one Sonnet call per couple per week, size not recorded
- Both partners answer four prompts in the app.
- It decrypts the answers in memory and writes a log row.
- It sends the text to Claude, which writes three short paragraphs.
- The report is saved to the journal.
- If only one partner answers, the app waits up to 24 hours, then makes a solo report.
Cost
Every number says where it came from.
| Service | Pays for | Today | Grows with | Basis |
|---|---|---|---|---|
| Pattaya app | React Native and Expo, iOS and Android. Not built. | $0 | Nothing | AssumedNo code exists; CLAUDE.md |
| Supabase | Not read | Users, stored entries, function calls | Not known | |
| Clerk | Sign-in. An Organization is a Household. | Not read | Active users | Not known |
| Key store (KMS) | Not read | Households and decryptions | Not known | |
| Claude (Anthropic) | Sonnet 4.5 for the briefing, chat and weekly report. Haiku 4.5 for cheap calls. | Not read | Weekly reports, chat messages, daily briefings | Not known |
| RevenueCat | Household subscription and entitlement | Not read | Subscription revenue | Not known |
| PostHog and Sentry | Usage events and crash reports | Not read | Events and crashes | Not known |
| EAS and push | Builds, updates, Expo notifications | Not read | Builds | Not known |
| App Store and Google Play | Payments and installs | 15% of each plan sold | Subscription revenue | Statedwiki/concepts/architecture.md (before this rewrite) |
What breaks when something fails
| If this fails | The user sees | Their data | Basis |
|---|---|---|---|
| Supabase | Not written down. | Journal and logs would be unreachable. No backup plan is recorded. | Not known |
| Clerk | Not written down. Likely no sign-in. | Account data lives there | Not known |
| Key store (KMS) | Weekly report and export cannot read entries. Not stated in the wiki. | Safe but unreadable | Assumed |
| Claude (Anthropic) | Not written down. No fallback is planned for the report or chat. | Journal text is held there only while a call runs, if zero retention is agreed | Not known |
| RevenueCat | Not written down. | None held there | Not known |
Where the data goes
| Journal entries | Postgres, encrypted per entry. The server can decrypt for AI, export and legal requests, and logs each time. |
| AI chat threads | Postgres, per partner. Whether they are encrypted is not stated. |
| Cycle, mood, sleep and symptom logs | Postgres, per partner. Whether they are encrypted is not stated. |
| Decryption audit log | Postgres, shown to the user in Privacy settings |
| Subscription status | RevenueCat and the store |
What we do not know yet
- Nothing is built. Every part, flow and failure here is a plan from the wiki, not something read in code.
- The $8 a month: the wiki gives no breakdown. It may be an Apple developer fee; this is not confirmed.
- The stack is unsettled. FEAT-0003 says Supabase and Clerk; the house standard scaffolds Firebase. Task T003 is open, so this page changes when it closes.
- The name differs: the repo is plan-kid, the product is Pattaya (task T004).