Last updated: 2026-06-29
This is the single-entry onboarding and reference guide for first-time engineers joining the SpeakTrue monorepo.
Root surfaces
ios/ — native iOS SwiftUI app.android/ — native Android app (Jetpack Compose).web/ — legacy Python web runtime + marketing web assets.backend/supabase/ — Supabase edge functions + SQL migrations + tests..github/workflows/ — CI/CD and deployment workflows.scripts/ — contract/ smoke/regression verification helpers.docs/ — architecture, ops, contracts, and onboarding references.README.mddocs/index.mddocs/reference/repository-onboarding-reference.mddocs/reference/repository-full-deep-reference.mddocs/contracts/native-speech-parity-anchor.mddocs/contracts/speech-workflow-contract.mddocs/ops/MIGRATION_REGRESSION_GATES.mdbackend/supabase/functions handler tests for the function you are touchingdocs/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.mdThe 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.
backend/supabase/functions/_shared/*docs/contracts/*backend/supabase/migrations/*backend/supabase/functions/<name>/)ios/)ios/SpeakTrue/SpeakTrueApp.swift — application composition root; service injection and startup orchestration.ios/SpeakTrue/Info.plist — Info.plist-level config and auth/deep-link declarations.ios/SpeakTrue/SupabaseConfig.swift — Supabase runtime configuration constants/keys.ios/SpeakTrue/AuthGateView.swift — auth gate UI and flow control.ios/SpeakTrue/AuthService.swift / ios/SpeakTrue/AuthState.swift — session/login/auth state management.ios/SpeakTrue/SupabaseClientProvider.swift / ios/SpeakTrue/UserSettingsSyncService.swift / ios/SpeakTrue/CloudStorageService.swift / ios/SpeakTrue/StorageManager.swift — session-bound backend, cloud, and sync services.ios/SpeakTrue/StartupLoadingView.swift — initial loading UX while bootstrapping services.ios/SpeakTrue/TextToSpeechView.swiftios/SpeakTrue/TTSViewModel.swiftios/SpeakTrue/HeaderViewTTS.swiftios/SpeakTrue/GenerateButtonView.swiftios/SpeakTrue/TTSCatSelectView.swiftios/SpeakTrue/AIProxyService.swift — API adapter into backend speech function contracts.ios/SpeakTrue/SpeechToTextView.swiftios/SpeakTrue/STTViewModel.swiftios/SpeakTrue/STSViewModel.swiftios/SpeakTrue/HeaderViewSTT.swiftios/SpeakTrue/SpeechToSpeechView.swiftios/SpeakTrue/RealtimeSTTService.swiftios/SpeakTrue/LiveVoiceSTSService.swiftios/SpeakTrue/LiveVoiceAudioPlayer.swiftios/SpeakTrue/ElevenLabsSTTService.swiftios/SpeakTrue/ElevenLabsService.swiftios/SpeakTrue/WaveFormView.swiftios/SpeakTrue/AudioControlsView.swiftios/SpeakTrue/ResetButtonView.swiftios/SpeakTrue/SoundboardView.swiftios/SpeakTrue/SoundboardCategories.swiftios/SpeakTrue/SBCategoryDetailView.swiftios/SpeakTrue/SoundboardAudioClips.swiftios/SpeakTrue/SoundboardCacheIndex.swiftios/SpeakTrue/SoundboardCacheManager.swiftios/SpeakTrue/SoundboardCacheManager.swift (runtime cache behavior and local index integrity)ios/SpeakTrue/StorageTestView.swift (manual verification helper)ios/SpeakTrue/VoiceCloneTabView.swiftios/SpeakTrue/VoiceCloneViewModel.swiftios/SpeakTrue/VoiceModelSelectionView.swiftios/SpeakTrue/AIDataSharingAgreementService.swiftios/SpeakTrue/AIDataSharingConsent.swiftios/SpeakTrue/AIDataSharingConsentGateView.swiftios/SpeakTrue/AIDataSharingAgreementService.swift and related consent gate logic should be updated together when legal/data-sharing flow changes.ios/SpeakTrue/SettingsTabView.swift, ios/SpeakTrue/SettingsView.swift, ios/SpeakTrue/SettingsModels.swift.ios/SpeakTrue/UserSettings.swift, ios/SpeakTrue/UserSettingsSyncService.swift.ios/SpeakTrue/MainTabView.swift, ios/SpeakTrue/ContentView.swift.ios/SpeakTrue/AudioRecorderService.swift — recording orchestration.ios/SpeakTrue/AudioPlayerService.swift — audio playback service.ios/SpeakTrue/LiveVoiceAudioPlayer.swift — streaming/interpreter playback utility.ios/SpeakTrue/BreakManager.swift — break/segment handling for playback sessions.ios/SpeakTrue/ShareSheet.swift — export/share hooks.ios/SpeakTrue/AppTheme.swift, ios/SpeakTrue/ColorExtension.swiftios/SpeakTrue/CategoryInfo.swift, ios/SpeakTrue/SettingsModels.swiftios/SpeakTrue/DebugLogger.swift (gated debug logging behavior)ios/SpeakTrue/AsyncTimeout.swiftios/SpeakTrue/AuthState.swiftios/SpeakTrue/PronunciationGlossaryView.swiftios/SpeakTrue/PronunciationGlossaryViewModel.swiftios/SpeakTrue/AppTour.swift and onboarding prompts.ios/SpeakTrue/HeaderViewTTS.swift, ios/SpeakTrue/HeaderViewSTT.swift, ios/SpeakTrue/TextInputView.swift.ios/SpeakTrue/Info.plist and ios/SpeakTrue/SpeakTrue.entitlements are required for auth, permissions, and app service contracts.ios/SpeakTrue/Assets.xcassets/**, ios/SpeakTrue/Preview Assets.xcassets/**.ios/SpeakTrueTests/* — unit and contract tests.ios/SpeakTrueUITests/* — UI smoke/navigational tests.android/)android/app/src/main/java/com/speaktrue/app/SpeakTrueApp.ktandroid/app/src/main/java/com/speaktrue/app/MainActivity.ktandroid/app/src/main/AndroidManifest.xmlandroid/app/src/main/java/com/speaktrue/core/auth/*.ktandroid/app/src/main/java/com/speaktrue/features/auth/**/*android/app/src/main/java/com/speaktrue/core/network/*.ktandroid/app/src/main/java/com/speaktrue/core/config/RuntimeConfig.ktandroid/app/src/main/java/com/speaktrue/core/supabase/SupabaseModule.ktandroid/app/src/main/java/com/speaktrue/core/storage/*.ktandroid/app/src/main/java/com/speaktrue/core/di/*.ktandroid/app/src/main/java/com/speaktrue/core/reliability/*.ktandroid/app/src/main/java/com/speaktrue/core/permissions/*.ktandroid/app/src/main/java/com/speaktrue/core/permissions/ui/*.ktfeatures/tts/ui/TTSScreen.ktfeatures/tts/presentation/TTSViewModel.ktfeatures/tts/data/*.ktfeatures/stt/ui/STTScreen.ktfeatures/stt/presentation/STTViewModel.ktfeatures/stt/data/*.ktfeatures/sts/ui/STSScreen.ktfeatures/sts/presentation/STSViewModel.ktfeatures/sts/data/*.ktfeatures/sts/data/STSOrchestrator.ktfeatures/soundboard/ui/SoundboardScreen.ktfeatures/soundboard/ui/SoundboardComponents.ktfeatures/soundboard/presentation/SoundboardViewModel.ktfeatures/soundboard/data/*.ktfeatures/voiceclone/ui/VoiceCloneScreen.ktfeatures/voiceclone/ui/VoiceCloneComponents.ktfeatures/voiceclone/presentation/VoiceCloneViewModel.ktfeatures/voiceclone/presentation/VoiceCloneState.ktfeatures/voiceclone/data/*.ktfeatures/presets/ui/StylePresetScreen.ktfeatures/presets/presentation/StylePresetViewModel.ktfeatures/presets/data/StylePresetRepository.ktfeatures/settings/ui/SettingsScreen.kt, features/settings/ui/SettingsSections.kt, features/settings/ui/SoundboardSettingsSection.ktfeatures/settings/presentation/SettingsViewModel.ktfeatures/settings/data/*.ktfeatures/language/data/*.ktfeatures/dictionary/ui/PronunciationDictionaryScreen.ktfeatures/dictionary/presentation/PronunciationDictionaryViewModel.ktfeatures/dictionary/data/PronunciationRepository.ktfeatures/agreement/ui/AIDataSharingAgreementGate.ktfeatures/agreement/presentation/AIDataSharingAgreementViewModel.ktfeatures/agreement/data/AIDataSharingAgreementRepository.ktfeatures/tutorial/AppTour.ktfeatures/tutorial/AppTourContractsTest.ktandroid/app/src/main/java/com/speaktrue/ui/navigation/AppNavGraph.ktandroid/app/src/main/java/com/speaktrue/features/shared/*.ktandroid/app/src/main/java/com/speaktrue/ui/theme/*.ktandroid/app/src/main/res/values/**, android/app/src/main/res/drawable/**, android/app/src/main/res/mipmap-*/**android/app/src/main/java/com/speaktrue/core/audio/*.ktandroid/app/src/main/java/com/speaktrue/core/network/OriginSecurity.ktandroid/app/src/main/java/com/speaktrue/core/text/ (if added in future)android/app/src/test/java/com/speaktrue/**android/app/src/androidTest/java/com/speaktrue/**.../contracts/*web/)web/marketing/index.html — main marketing SPA shell.web/marketing/scripts/main.js, web/marketing/scripts/waitlist.js, web/marketing/scripts/theme_boot.js, web/marketing/scripts/deploy_refresh.jsweb/marketing/styles/main.css, web/marketing/styles/tokens.cssweb/marketing/auth/callback/index.html — OAuth callback route handling.web/marketing/_headers, _redirects, web/marketing/site.webmanifestweb/marketing/assets/** — icons/screenshots/asset bundle.web/python-web-app/src/app.py — Flask application entry + blueprint registration.web/python-web-app/src/legacy_runtime.py — staged compatibility bridge for legacy runtime behavior.web/python-web-app/wsgi.py and web/python-web-app/Procfile — deployment entrypoints.web/python-web-app/src/config.py — environment-driven config loading.web/python-web-app/src/routes/*.py — HTTP route handlers for health, legacy features, settings, soundboard, stt, tts, voice_clone.web/python-web-app/src/services/*.py — cross-service orchestration for auth, jobs, clips, categories, cache, API keys.web/python-web-app/src/storage/*.py (if present via runtime package usage) and migration helpers.web/python-web-app/src/jobs/*.py — async/background jobs path for queued tasks.web/python-web-app/src/create_*.sql, src/db_table_names.pyweb/python-web-app/Dockerfile, web/python-web-app/docker-compose.yml, web/python-web-app/docker-entrypoint.shweb/python-web-app/.env.exampleweb/python-web-app/README.md, README_CONTEXT.md, docs/*.md.web/python-web-app/tests/**web/python-web-app/run_regression_gate.sh and related CI integration.backend/supabase/)| 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 |
backend/supabase/functions/_shared/cors.tsbackend/supabase/functions/_shared/auth-context.tsbackend/supabase/functions/_shared/types.tsbackend/supabase/functions/_shared/billing-entitlement-policy.tsbackend/supabase/functions/_shared/byok.tsbackend/supabase/functions/_shared/private-voice-access.tsbackend/supabase/functions/_shared/entitlements.tsbackend/supabase/functions/_shared/theme.tsbackend/supabase/functions/_shared/quotas.tsbackend/supabase/functions/_shared/usage.tsbackend/supabase/functions/_shared/subscription-gating-config.tsEvery function should consume this layer first for shared auth / gating and avoid duplicating policy checks.
backend/supabase/migrations/)001_core_schema.sql through numbered historical migrations (001..031) define base schema, billing, entitlements, and storage defaults.202603... to 202606...) are more recent production-alignment changes: auth trigger repair, quota policy hardening, STS/STT mode expansions, soundboard soft-delete migration cleanup, storage grants, workflow settings.011_*, 012_*, 013_*, 016_*, 019_*, 020_*, 022_*, 026_*, 027_* and 2026 date-stamped entitlement/role adjustments.004_*, 006_*, 028_*, 029_*, date-prefixed soundboard patch sets in May/June 2026.023_*, 024_*, and 2026-06-23/2026-06-27 STS/near-realtime migrations.021, 024, 024_ai?, 015, 030, 018).007_*, 002, 005, 008, date-prefixed grant updates.backend/supabase/functions/<fn>/*_test.ts.backend/supabase/functions/_shared/*_test.ts.backend/supabase/tests/*.docs/ops/ checklists and Android parity contracts for cross-surface behavior.ios/SpeakTrue/ billing/supabase config filesbackend/supabase entitlement-related migrations/functions./gradlew based project under android/.android/SpeakTrueAndroid/app/build.gradle.ktsdocs/ops/ANDROID_PLAY_RELEASE_CHECKLIST.mdscripts/verify_android_play_release_blockers.pyscripts/coverage_backend_contracts.shscripts/regression_migration_paths.shbackend/supabase/config.toml and function code.docs/ops/CLOUDFLARE_PAGES_DEPLOY.md.web/python-web-app/Dockerfile, requirements*.txt, src/app.py, wsgi.py.ios/SpeakTrue/AIProxyService.swift, ios/SpeakTrue/AIData* components as needed.features/language/*, features/tts/data/VoiceCatalogRepository.kt, features/tts/data/ModelCatalogRepository.kt.backend/supabase/functions/voices-list/, backend/supabase/functions/models-list/, optional tts-generate/policy.ts and style-presets defaults.docs/contracts/speech-workflow-contract.md if request/response shape changes.LiveVoiceSTSService.swift, STSViewModel.swift, RealtimeSTTService.swift.features/sts/data/*, features/sts/presentation/STSViewModel.kt, core/audio/*.kt.sts-live-*, sts-realtime-session, sts-realtime-finalize, shared entitlement/usage helpers.SoundboardCacheManager.swift, SoundboardCacheIndex.swift, SBCategoryDetailView.swift.features/soundboard/data/SoundboardRepository.kt, SoundboardAudioCacheManager.kt, reorder mapping tests.clip-order-batch and related soundboard SQL functions/migrations.VoiceClone*, AIDataSharing*.features/voiceclone/*.voice-clone-preflight, voice-clone-create, voice-clone-delete, optional BYOK/auth policy helpers.UserSettings.swift, UserSettingsSyncService.swift, SettingsModels.swift, settings screens.features/settings/data/SettingsStore.kt, SettingsRepository.kt, SettingsViewModel.kt.user-settings-get, user-settings-update, supporting SQL defaults + migrations.DebugLogger plus obvious published state transitions.docs/ops/ and scripts/.docs/reference/repository-onboarding-reference.mddocs/reference/repository-full-deep-reference.mddocs/reference/repository-operator-manual.mddocs/contracts/native-speech-parity-anchor.mddocs/ops/*docs/contracts/*