SpeakTrue

Repository Onboarding Reference (Surface- and Function-Depth)

Last refreshed: 2026-06-29

Use this as the first read for first-contact engineering, incident response, and change planning.

What this document is

This document answers:

For complete file-by-file ownership enumerations, use:

This document keeps those inventories as source-of-trust and adds change-oriented context and behavioral mappings.

1) Golden architecture rules

  1. Privileged provider and credential operations stay on backend contracts (backend/supabase/functions/*).
  2. Clients call edge functions for speech/voice/soundboard/identity operations.
  3. Storage and entitlement changes must be reflected in:
    • backend handler logic
    • callers in iOS/Android/legacy web
    • DB migration(s)
    • function tests + platform contract tests
  4. When changing runtime behavior, keep docs/index and these inventories consistent with behavior.

2) Deployment and code surfaces quick map

Surface Primary roots Notes
iOS app ios/ SwiftUI + service/feature split + tests
Android app android/ Jetpack Compose + DI/core + feature modules + tests
Legacy web app web/python-web-app/ Flask request surface + service/router layer + legacy compatibility seam
Marketing web web/marketing/ Static hosting + waitlist callback/copy
Backend backend/supabase/ Edge functions + shared helpers + migrations + migration SQL

3) iOS surface: what and where

3.1 Startup and control flow

3.2 If you change X in iOS, edit Y

3.3 Tests that should change on iOS behavior edits

3.4 iOS deployment checklist

  1. Build/run in Xcode for selected target.
  2. Verify signing and environment in ios/Config/App.*.xcconfig if changing runtime keys.
  3. Run changed-feature smoke checks manually before commit.

4) Android surface: what and where

4.1 Startup and control flow

4.2 If you change X in Android, edit Y

4.3 Android tests to touch on edits

4.4 Android release/deploy commands (project-standard)

5) Web surface: marketing + legacy web

5.1 Marketing surface

5.2 Legacy web runtime

5.3 If you change web behavior, edit Y

6) Backend function deep map

This section is the canonical behavior map for function ownership and maintenance.

Legend:

6.1 Auth / billing / entitlement functions

account-delete

billing-apple-sync

billing-apple-notifications

billing-google-play-sync

billing-stripe-webhook

6.2 Speech and translation functions

stt-transcribe

tts-generate

language-recommend

models-list

voices-list

6.3 STS workflow functions

sts-live-voice-tts-session

sts-near-realtime-session

sts-realtime-session

sts-realtime-finalize

sts-live-interpreter-session (migration/untracked state)

sts-live-interpreter-tts-session (migration/untracked state)

6.4 Settings and profile functions

user-settings-get

user-settings-update

quota-status

6.5 Data write and content management functions

clip-order-batch

soundboard-save-generated

soundboard-delete

soundboard-clip-ingest (migration/untracked state)

pronunciation-dictionary

bug-report-submit

style-presets

pronunciation-dictionary, style-presets, language-recommend, voices-list are important for speech UX parity and should remain in sync with mobile-side UI.

6.6 BYOK and keys

byok-resolve

byok-upsert

waitlist-signup

voice-clone-preflight

voice-clone-create

voice-clone-delete

7) Shared backend helpers (read before editing function logic)

8) Migration and data schema map for backend-safe changes

When backend behavior changes touch persistence, migration strategy is:

  1. Add new migration under backend/supabase/migrations/ with a timestamp and clear intent in filename.
  2. Update dependent function tests and contracts in backend/supabase/functions/*_test.ts.
  3. Update client callers (iOS/Android/web) if request/response contracts change.
  4. Update docs/contracts and surface docs.
  5. Run function + coverage gate command(s).

Duplicate migration naming risks exist in current history; avoid reusing older migration stamps and prefer strictly monotonic filenames.

9) Deployment and operations playbook by change type

9.1 iOS release change

9.2 Android release change

9.3 Backend function change

9.4 Legacy web change

9.5 Marketing change

10) If you are asked “where do I change X Y Z”

Use this decision checklist:

11) What to read after this document