SpeakTrue

SpeakTrue Repository — Extreme Engineering Guide

Last updated: 2026-06-29

This is the single-entry onboarding and reference guide for first-time engineers joining the SpeakTrue monorepo.

1) Purpose and who this is for

2) Repository-level orientation

Root surfaces

3) First things to read before changing anything

  1. README.md
  2. docs/index.md
  3. docs/reference/repository-onboarding-reference.md
  4. docs/reference/repository-full-deep-reference.md
  5. docs/contracts/native-speech-parity-anchor.md
  6. docs/contracts/speech-workflow-contract.md
  7. docs/ops/MIGRATION_REGRESSION_GATES.md
  8. backend/supabase/functions handler tests for the function you are touching
  9. Surface-specific tests for the client feature you are touching

3.1 Canonical exhaustive per-file inventories

The first three files provide per-file inventories for UI and web surfaces. The backend maps are the source of truth when editing function contracts.

Those files contain file-by-file ownership and are the canonical “every file in a directory” map for the UI surfaces. Use this guide for architecture and behavior context, and those inventories (plus the backend function maps) when you need direct per-file confirmation.

4) Core architecture and boundaries

4.1 Runtime architecture

4.2 Surface ownership

4.3 Contract discipline

5) iOS detailed reference (ios/)

5.1 App lifecycle and bootstrapping

5.2 Core voice generation workflows (TTS, STT, STS)

5.3 Soundboard

5.4 Voice clone and agreement

5.5 Settings and personalization

5.6 Audio services and playback

5.7 Diagnostics, theme, utility, and shared models

5.8 App configuration and entitlements

5.9 iOS tests

6) Android detailed reference (android/)

6.1 Project and app shell

6.2 Core architecture modules

6.3 Feature groups

6.4 Shared UI and navigation

6.5 Audio and runtime services

6.6 Android tests

7) Web detailed reference (web/)

7.1 Marketing site (production/static)

7.2 Legacy Python runtime (compatibility and migration boundary)

7.3 Environment and deployment assets

7.4 Web tests and validation

8) Backend functions and data layer (backend/supabase/)

8.1 Edge function map

Function Location Responsibility Primary client surfaces Notes
account-delete backend/supabase/functions/account-delete/index.ts user account teardown orchestration iOS, Android, future API callers includes handler and tests
billing-apple-notifications .../billing-apple-notifications Apple receipt/notification intake, webhook handling backend-only, iOS billing sync bridge has explicit deno.json
billing-apple-sync .../billing-apple-sync Apple sync orchestration logic/state transitions iOS billing path check entitlement transitions
billing-google-play-sync .../billing-google-play-sync Google Play purchase sync and verifier wrapper Android billing includes verifier test and handler
billing-stripe-webhook .../billing-stripe-webhook Stripe webhook processing + persistence backend-only billing connector multi-stage validation/persistence logic
bug-report-submit .../bug-report-submit capture/report bug payloads app surfaces as support path lightweight support ingestion
byok-resolve .../byok-resolve map BYOK credentials for private voice access edge auth/billing gating + service path  
byok-upsert .../byok-upsert write/update BYOK credential records settings/admin surface  
clip-order-batch .../clip-order-batch batch reorder/ordering RPC contract soundboard reorder flows includes dedicated tests
language-recommend .../language-recommend suggest or resolve TTS language behavior TTS/STS language selection  
quota-status .../quota-status returns usage/quota status snapshot TTS/STT/STS gating UX  
soundboard-delete .../soundboard-delete delete soundboard assets with storage/metadata handling soundboard feature  
soundboard-save-generated .../soundboard-save-generated persist generated clip metadata + storage pointers generated clip pipeline  
stt-transcribe .../stt-transcribe non-streaming STT path and validation hooks STT feature  
sts-near-realtime-session .../sts-near-realtime-session near-real-time session lifecycle    
sts-live-interpreter-session .../sts-live-interpreter-session live interpreter session control    
sts-live-interpreter-tts-session .../sts-live-interpreter-tts-session TTS leg handling in interpreter mode    
sts-live-voice-tts-session .../sts-live-voice-tts-session voice model-driven live TTS session    
sts-realtime-session .../sts-realtime-session main realtime STS session creation and status    
sts-realtime-finalize .../sts-realtime-finalize finalize realtime transcripts/artifacts    
style-presets .../style-presets read/update style preset contract    
tts-generate .../tts-generate request validation + provider call + output metadata    
user-settings-get .../user-settings-get fetch settings profile    
user-settings-update .../user-settings-update persist settings updates    
voices-list .../voices-list provider voice listing + filtering    
voice-clone-preflight .../voice-clone-preflight validate preflight for voice clone requests    
voice-clone-create .../voice-clone-create create voice-clone entities    
voice-clone-delete .../voice-clone-delete delete voice clone records    
models-list .../models-list provider model listing    
waitlist-signup .../waitlist-signup marketing/web signup intake    
pronunciation-dictionary .../pronunciation-dictionary dictionary lookup/update pipeline    

8.2 Shared backend helpers

Every function should consume this layer first for shared auth / gating and avoid duplicating policy checks.

8.3 Database migration inventory (backend/supabase/migrations/)

8.4 Backend test surface

9) Deployment and release matrix

9.1 iOS

9.2 Android

9.3 Backend

9.4 Marketing and legacy web

10) Change recipes: “where to edit X”

10.1 Add/update a TTS voice provider

10.2 Change STS stream behavior

10.3 Add/modify soundboard category/clip ordering behavior

10.4 Change voice-clone path

10.5 User setting default changes

11) Observability and troubleshooting map

11.1 Runtime triage first principles

  1. Confirm which surface calls the target function or local service.
  2. Confirm auth context and user entitlement path.
  3. Confirm payload shape at client call site and backend validation.
  4. Confirm DB migration state and function contract version.
  5. Confirm app UI state management for failure path (loading/error state).

11.2 Useful checkpoints

13) Change discipline and governance

14) What to do next after this doc