Last updated: 2026-06-29
This document is the one-stop onboarding and operations reference for this repository for engineers joining the project or taking ownership of a specific feature area.
It is written to answer:
README.mddocs/architecture/overview.mddocs/contracts/native-speech-parity-anchor.mddocs/contracts/speech-workflow-contract.mddocs/reference/ios-file-inventory.mddocs/reference/android-file-inventory.mddocs/reference/web-file-inventory.mddocs/reference/backend-functions-detailed-map.mddocs/reference/backend-functions-deep-dive.mddocs/ops/* (especially migration and release gates)If you are changing behavior across surfaces, do not proceed until all relevant inventories and contracts above are open.
web/marketing is a production-facing static site, not a speech API execution surface.web/python-web-app is a legacy/compatibility runtime in transition; it currently bridges older routes through adapter layers and selected compatibility seams.backend/supabase/functions is the canonical speech/data action boundary:
backend/supabase/migrations owns schema behavior, storage grants, RPCs, and entitlement/state defaults.For any behavioral edit, these files are the canonical sources:
README.md, AGENTS.md, docs/architecture.md (if regenerated), docs/contracts/*, docs/ops/*docs/reference/ios-file-inventory.md, docs/reference/android-file-inventory.md, docs/reference/web-file-inventory.mddocs/reference/backend-functions-detailed-map.mddocs/reference/repository-full-deep-reference.mddocs/reference/repository-onboarding-reference.mddocs/reference/repository-operator-manual.mddocs/reference/engineer-change-cookbook.mdios/SpeakTrue/SpeakTrueApp.swift / ios/SpeakTrue/ContentView.swift
ios/SpeakTrue/AuthService.swift, ios/SpeakTrue/AuthState.swift, ios/SpeakTrue/SupabaseClientProvider.swift, ios/SpeakTrue/SupabaseConfig.swift
ios/SpeakTrue/AIProxyService.swift
ios/SpeakTrue/CloudStorageService.swift, ios/SpeakTrue/StorageManager.swift
ios/SpeakTrue/SoundboardView.swift, SoundboardViewModel.swift, SoundboardCacheManager.swift, SoundboardCacheIndex.swift
ios/SpeakTrue/TTSViewModel.swift, TextToSpeechView.swift, TTSCatSelectView.swift
ios/SpeakTrue/STTViewModel.swift, SpeechToTextView.swift
ios/SpeakTrue/STSViewModel.swift, SpeechToSpeechView.swift, RealtimeSTTService.swift, LiveVoiceSTSService.swift, LiveVoiceAudioPlayer.swift
ios/SpeakTrue/VoiceCloneViewModel.swift, VoiceCloneTabView.swift
ios/SpeakTrue/SettingsView.swift, SettingsTabView.swift, UserSettings.swift, UserSettingsSyncService.swift
ios/SpeakTrue/PronunciationGlossaryView.swift, PronunciationGlossaryViewModel.swift
ios/SpeakTrue/AppTheme.swift, ColorExtension.swift, WaveFormView.swift, AudioControlsView.swift
ios/SpeakTrueTests/*, ios/SpeakTrueUITests/*
ios/Config/App.Debug.xcconfigios/Config/App.Release.xcconfigios/SpeakTrue.entitlementsios/SpeakTrue.xcodeproj/project.pbxproj| If you change | Edit at minimum |
|---|---|
| TTS model/voice defaults, playback mode | ios/SpeakTrue/TTSViewModel.swift, ios/SpeakTrue/TextToSpeechView.swift, ios/SpeakTrue/AIProxyService.swift, plus backend models-list, voices-list, tts-generate if payload changes |
| STT/STS flow behavior | ios/SpeakTrue/STTViewModel.swift, ios/SpeakTrue/STSViewModel.swift, ios/SpeakTrue/SpeechToSpeechView.swift, RealtimeSTTService.swift, LiveVoiceSTSService.swift, plus backend stt-transcribe, sts-* as needed |
| Soundboard flow | ios/SpeakTrue/SoundboardViewModel.swift, SoundboardCacheManager.swift, SoundboardCacheIndex.swift, plus backend soundboard-save-generated, soundboard-delete, clip-order-batch |
| Voice-clone flow | ios/SpeakTrue/VoiceCloneViewModel.swift, AIDataSharingAgreementService.swift, AIDataSharingConsent* files |
| Settings/consent/quotas | ios/SpeakTrue/UserSettings.swift, UserSettingsSyncService.swift, SettingsView.swift, SettingsTabView.swift |
docs/reference/ios-file-inventory.md for a complete file-by-file list with path/category/ownership/behavior summary.SpeakTrueApp.swift, MainTabView.swift, AuthGateView.swift, StartupLoadingView.swift, and Info.plist before shipping any startup/auth change.android/app/src/main/java/com/speaktrue/app/SpeakTrueApp.kt, MainActivity.kt
android/app/src/main/java/com/speaktrue/ui/navigation/AppNavGraph.kt
android/app/src/main/java/com/speaktrue/core/*
android/app/src/main/java/com/speaktrue/features/tts/*
android/app/src/main/java/com/speaktrue/features/stt/*
android/app/src/main/java/com/speaktrue/features/sts/*
android/app/src/main/java/com/speaktrue/features/soundboard/*
android/app/src/main/java/com/speaktrue/features/voiceclone/*
android/app/src/main/java/com/speaktrue/features/settings/*
android/app/src/main/java/com/speaktrue/features/agreement/*
android/app/src/main/java/com/speaktrue/features/shared/* and ui/theme/*
android/app/src/test/java/com/speaktrue/** and android/app/src/androidTest/java/com/speaktrue/**
| If you change | Edit at minimum |
|---|---|
| TTS models/voices/presets | features/tts/data/*, features/tts/presentation/TTSViewModel.kt, features/tts/ui/TTSScreen.kt, backend functions voices-list, models-list, tts-generate, style-presets if contract changes |
| STT/STS flow | features/stt/*, features/sts/*, backend functions stt-transcribe, sts-near-realtime-session, sts-realtime-session, sts-realtime-finalize, sts-live-voice-tts-session |
| Soundboard reorder / cache | features/soundboard/data/*, features/soundboard/presentation/SoundboardViewModel.kt, features/soundboard/ui/SoundboardScreen.kt and backend soundboard-delete, soundboard-save-generated, clip-order-batch |
| Settings or agreement change | features/settings/data/*, features/settings/presentation/*, features/settings/ui/*, features/agreement/*, backend user-settings-get, user-settings-update, quota-status if usage semantics changed |
| Billing/entitlement behavior | billing-sensitive checks in core + feature screens plus backend billing functions |
docs/reference/android-file-inventory.md contains the complete file-by-file registry.android/build.gradle.kts, android/settings.gradle.kts, android/gradle/libs.versions.toml, android/app/build.gradle.kts, and android/gradle.properties all affect build behavior.web/marketing)web/marketing/index.html: main static marketing surfaceweb/marketing/auth/callback/index.html: OAuth callback handoff pageweb/marketing/scripts/*.js: nav/callback waitlist and theme interactionsweb/marketing/styles/*.css: tokenized layout/theme and responsive behaviorweb/marketing/_headers, web/marketing/_redirects, web/marketing/site.webmanifest, deploy-version.json: Cloudflare Pages deployment and cache behaviorRunbook: docs/ops/CLOUDFLARE_PAGES_DEPLOY.md
web/python-web-app)web/python-web-app/wsgi.py, src/app.py, src/config.py, src/legacy_runtime.py, src/legacy_runtime_adapter.py
web/python-web-app/src/routes/*.py
web/python-web-app/src/services/*.py
web/python-web-app/src/storage/*.py and SQL bootstrap files under src/
web/python-web-app/tests/** and JS test bundles under web/python-web-app/tests/js
web/python-web-app/Dockerfile, Procfile, docker-compose.yml, docker-entrypoint.sh.| If you change | Edit at minimum |
|---|---|
| STT/sts/tts service behavior in web parity surface | web/python-web-app/src/routes/stt.py, src/routes/tts.py, relevant src/services/*, plus compatibility seam docs in src/legacy_runtime_adapter.py and src/services/storage_provider.py |
| Soundboard behavior | web/python-web-app/src/routes/soundboard.py, src/services/soundboard_service.py, JS audio cards/interaction JS |
| User settings | web/python-web-app/src/routes/settings.py, src/services/user_settings_service.py, templates and JS that renders user state |
| Waitlist/onboarding entrypoints | web/python-web-app/src/routes/voice_clone.py, src/routes/tts.py, src/services/ compatibility seam, web/marketing form scripts |
docs/reference/web-file-inventory.md contains the complete file registry for all web runtime and marketing artifacts.| Route | Surface | Files | What it does |
|---|---|---|---|
/account-delete |
auth/account lifecycle | backend/supabase/functions/account-delete/* |
Deletes user account and server-owned resources using auth-gated contract checks. |
/billing-apple-sync |
billing | billing-apple-sync/* |
Sync Apple transactions into entitlement state transitions. |
/billing-apple-notifications |
billing | billing-apple-notifications/* |
Processes webhook payloads and applies entitlement mutation policy. |
/billing-google-play-sync |
billing | billing-google-play-sync/* |
Validates Play payloads and applies entitlement state updates. |
/billing-stripe-webhook |
billing | billing-stripe-webhook/* |
Stripe signature validation + event dispatch + persistence + policy mapping. |
/bug-report-submit |
support | bug-report-submit/* |
Records bug reports. |
/byok-resolve, /byok-upsert |
settings/provider security | byok-*/* |
BYOK config query and write APIs. |
/clip-order-batch |
soundboard | clip-order-batch/* |
Applies batch ordering changes with ownership checks. |
/language-recommend |
STT/STS | language-recommend/* |
Suggests/returns language recommendation payload. |
/models-list |
TTS | models-list/* |
Model catalog with policy filtering. |
/voices-list |
TTS | voices-list/* |
Voice catalog with entitlement/private access filtering. |
/pronunciation-dictionary |
generation quality | pronunciation-dictionary/* |
Pronunciation CRUD + validation. |
/quota-status |
usage gating | quota-status/* |
Returns quota and usage state used by clients. |
/soundboard-save-generated |
soundboard | soundboard-save-generated/* |
Persists generated clip metadata, bucket/key mapping, idempotence behavior. |
/soundboard-delete |
soundboard | soundboard-delete/* |
Deletes one or more soundboard clips with storage cleanup semantics. |
/soundboard-clip-ingest |
migration placeholder | directory scaffold | Not yet implemented (routing should remain guarded until handler exists). |
/stt-transcribe |
STT | stt-transcribe/* |
Non-streaming transcribe request validation + capture + provider call + response normalization. |
/sts-live-voice-tts-session |
STS | sts-live-voice-tts-session/* |
Starts live STS voice-to-speech session contract. |
/sts-near-realtime-session |
STS | sts-near-realtime-session/* |
Boots near-realtime STS session context for finalization. |
/sts-realtime-session |
STS | sts-realtime-session/* |
Starts active real-time STS session and returns provider contract. |
/sts-realtime-finalize |
STS | sts-realtime-finalize/* |
Merges transcript/artifacts, finalizes metadata and artifact contract. |
/sts-live-interpreter-session |
live interpreter scaffold | index.ts only |
Scaffold function only. |
/sts-live-interpreter-tts-session |
live interpreter scaffold | index.ts only |
Scaffold function only. |
/style-presets |
settings | style-presets/* |
Read/update style preset data and defaults. |
/tts-generate |
TTS | tts-generate/* |
Core TTS validation, policy, pronunciation, provider invocation, response contract. |
/user-settings-get |
settings | user-settings-get/* |
Fetches settings with migration-safe defaults. |
/user-settings-update |
settings | user-settings-update/* |
Patch-update settings with validation and normalized response. |
/voice-clone-preflight |
voice clone | voice-clone-preflight/* |
Readiness and validation pass before clone creation. |
/voice-clone-create |
voice clone | voice-clone-create/* |
Create clone, apply provider call, persist metadata, return result. |
/voice-clone-delete |
voice clone | voice-clone-delete/* |
Delete user clone and provider references. |
/waitlist-signup |
marketing ops | waitlist-signup/* |
Stores waitlist contacts and deduplicates identity keys. |
backend/supabase/functions/_shared/cors.ts, _shared/auth-context.ts, _shared/types.ts, _shared/usage.ts, _shared/quotas.ts, _shared/entitlements.ts, _shared/billing-entitlement-policy.ts, _shared/private-voice-access.ts, _shared/byok.ts, _shared/subscription-gating-config.ts
backend/supabase/migrations includes schema/core setup through production-alignment updates:
001_* through 031_*: base schema, entitlement/usage/billing foundations, byok, voice clone, soundboard ordering, waitlist, quotas, data-sharing agreement, etc.2026*) files: hardened entitlement behavior, speech mode expansions, quotas, storage grants/paths, STS/STT workflow migrations, soft-delete and restore operations, live interpreter scaffolding.When schema shape changes, always create/modify migration SQL and keep function contract tests and client callsite payload tests in sync.
tts-generate, voices-list, models-list, style-presets, _shared policy modulesAIProxyService, TTSViewModel, TextToSpeechView, TTSCatSelectView, VoiceModelSelectionViewfeatures/tts/*, Feature/voice/model repositoriesweb/python-web-app/src/routes/tts.py, src/services/tts_service.py, related JS entrypoints if anyios/SpeakTrueTests/TTSPlaybackModeBehaviorTests.swift, Android TTS contract testsstt-transcribe, sts-near-realtime-session, sts-realtime-session, sts-live-voice-tts-session, sts-realtime-finalize, _shared/quotas.ts, _shared/usage.tsSTTViewModel, STSViewModel, SpeechToSpeechView, LiveVoiceSTSService, RealtimeSTTServicefeatures/stt/*, features/sts/*, STSOrchestratorweb/python-web-app/src/routes/stt.py, web/python-web-app/static/js/index_stt.js, index_sts_live_voice.jssoundboard-save-generated, soundboard-delete, clip-order-batch, soundboard-clip-ingest (if activated)SoundboardViewModel, SoundboardCacheManager, SoundboardCacheIndex, AIProxyServicefeatures/soundboard/data/*, features/soundboard/presentation/SoundboardViewModel.ktweb/python-web-app/src/routes/soundboard.py, src/services/soundboard_service.pyvoice-clone-preflight, voice-clone-create, voice-clone-delete, byok-resolve, byok-upsertVoiceCloneTabView, VoiceCloneViewModel, agreement gate filesfeatures/voiceclone/data/*, features/voiceclone/presentation/*, features/voiceclone/ui/*web/python-web-app/src/routes/voice_clone.py, src/services/voice_clone_service.pyuser-settings-get, user-settings-update, quota-status, byok-*, pronunciation and language recommendation as neededUserSettings, UserSettingsSyncService, Settings* screens, agreement filesfeatures/settings/*, features/agreement/*web/python-web-app/src/routes/settings.py, src/services/user_settings_service.pybilling-apple-notifications, billing-apple-sync, billing-google-play-sync, billing-stripe-webhook, _shared/subscription-gating-config.ts, _shared/entitlements.ts, _shared/billing-entitlement-policy.tsbash scripts/coverage_backend_contracts.shbash scripts/regression_migration_paths.sh.deno tests)./gradlew -p android :app:compileDebugKotlin./gradlew -p android :app:testDebugUnitTest./gradlew -p android :app:lintDebug./gradlew -p android :app:bundleRelease (release path)docs/ops/ANDROID_PLAY_RELEASE_CHECKLIST.md before production submissionios/Config/App*.xcconfigpython3 -m pytest web/python-web-app/tests and smoke run of app entrypoint; see web/python-web-app/pytest.ini and run_regression_gate.shWhen an engineer receives a behavior regression report, this is the quickest triage sequence:
backend/supabase/migrations and migration docs in docs/ops/MIGRATION_REGRESSION_GATES.md.rg --files ios → iOS file inventory check.rg --files android/app/src/main/java → Android entrypoints and feature modules.rg --files web/python-web-app/src → legacy web route/service list.find backend/supabase/functions -maxdepth 2 -type d | sort → function directories.bash scripts/regression_migration_paths.sh → migration-sensitive backend + parity smoke gate.git status --short before/after docs edits to keep the repository diff clean.Use this as your canonical map index:
docs/reference/ios-file-inventory.mddocs/reference/android-file-inventory.mddocs/reference/web-file-inventory.mddocs/reference/backend-functions-detailed-map.mddocs/reference/backend-functions-deep-dive.mddocs/reference/repository-extremely-detailed-engineer-guide.mddocs/reference/repository-full-deep-reference.mddocs/reference/repository-onboarding-reference.mddocs/reference/repository-operator-manual.mddocs/reference/engineer-change-cookbook.md