This is the master first-contact reference for new engineers, on-call responders, and release operators.
It is designed to answer:
It is intentionally verbose and concrete. It is also intended to be updated every time behavior changes.
ios/ SwiftUI app.android/ Jetpack Compose app.web/marketing/ static marketing site.web/python-web-app/ legacy Flask runtime, used for active web surface behaviors.backend/supabase/ canonical backend contracts, migrations, and edge functions.docs/architecture/overview.mddocs/contracts/docs/reference/docs/ops/.
├── ios/ # native SwiftUI app (iOS surface)
├── android/ # native Compose app (Android surface)
├── web/
│ ├── marketing/ # static marketing + callbacks
│ └── python-web-app/ # legacy Flask web app runtime
├── backend/supabase/ # edge function contracts + migrations
├── scripts/ # regression and release evidence scripts
├── .github/workflows/ # CI/deploy/workflow automation
└── docs/ # architecture, contracts, operations
The following files already enumerate every tracked file in those trees:
docs/reference/ios-file-inventory.mddocs/reference/android-file-inventory.mddocs/reference/web-file-inventory.mddocs/reference/repository-onboarding-reference.mdUse this operator manual for intent and change flow.
Use the inventories when you need exact ownership + file-by-file description. Use the onboarding reference for first-contact workflows, deployment-first change planning, and where-to-change guidance.
ios/Config/*.xcconfig into plist and build settings.ios/Config/README.md before editing.ios/Config/App.Debug.xcconfigios/Config/App.Release.xcconfigios/SupabaseConfig.swiftandroid/local.properties at build time.SUPABASE_URLSUPABASE_ANON_KEYSUPABASE_OAUTH_SCHEMEandroid/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/network/EdgeFunctionClient.ktweb/python-web-app/.env).web/python-web-app/wsgi.py.gb_tts_app.py is compatibility only.backend/supabase/config.toml.backend/supabase/migrations/.ios/SpeakTrue/SpeakTrueApp.swift
ios/SpeakTrue/ContentView.swift
ios/SpeakTrue/MainTabView.swift
ios/SpeakTrue/AuthGateView.swift
ios/SpeakTrue/StartupLoadingView.swift
ios/SpeakTrue/AIProxyService.swift
ios/SpeakTrue/CloudStorageService.swift
ios/SpeakTrue/AuthService.swift + ios/SpeakTrue/AuthState.swift
ios/SpeakTrue/SupabaseClientProvider.swift
ios/SpeakTrue/AudioRecorderService.swift
ios/SpeakTrue/AudioPlayerService.swift
ios/SpeakTrue/UserSettingsSyncService.swift
ios/SpeakTrue/AIDataSharingAgreementService.swift
ios/SpeakTrue/TTSViewModel.swiftios/SpeakTrue/TextToSpeechView.swiftios/SpeakTrue/TTSCatSelectView.swiftios/SpeakTrue/AsyncTimeout.swift (timing utility used by async generation paths)ios/SpeakTrue/STTViewModel.swift, SpeechToTextView.swiftios/SpeakTrue/STSViewModel.swift, SpeechToSpeechView.swiftios/SpeakTrue/AudioRecorderService.swift (shared capture dependency)ios/SpeakTrue/RealtimeSTTService.swiftios/SpeakTrue/LiveVoiceSTSService.swift, LiveVoiceAudioPlayer.swiftios/SpeakTrue/SoundboardView.swiftios/SpeakTrue/SoundboardViewModel.swiftios/SpeakTrue/SoundboardCacheManager.swiftios/SpeakTrue/SoundboardCacheIndex.swiftios/SpeakTrue/SoundboardAudioClips.swiftios/SpeakTrue/SBCategoryDetailView.swiftios/SpeakTrue/VoiceCloneViewModel.swift, VoiceCloneTabView.swiftios/SpeakTrue/PronunciationGlossaryView.swiftios/SpeakTrue/PronunciationGlossaryViewModel.swiftios/SpeakTrue/CategoryInfo.swiftios/SpeakTrue/SettingsView.swift, SettingsTabView.swift, SettingsModels.swiftios/SpeakTrue/AIDataSharingConsent*.swiftGenerateButtonView.swift, ResetButtonView.swiftHeaderViewSTT.swift, HeaderViewTTS.swiftTextInputView.swift, AudioControlsView.swift, WaveFormView.swiftios/SpeakTrueTests/*ios/SpeakTrueUITests/*1) Change TTS UX defaults (speed/quality/voice/model defaults):
backend/supabase/migrations/* defaults + backend/supabase/functions/user-settings-*.ios/SpeakTrue/TTSViewModel.swift, ios/SpeakTrue/TTSCatSelectView.swift.android/app/src/main/java/com/speaktrue/features/tts.ios/SpeakTrueTests/TTSPlaybackModeBehaviorTests.swift, Android analog contract tests.2) Add/remove an iOS speech workflow mode:
ios/SpeakTrue/UserSettings.swift.backend/supabase/functions/user-settings-get/update.ios/SpeakTrue/*Screen.swift.ios/SpeakTrueTests/MainTabNavigationTests.swift and backend tests.3) Fix or change account deletion path:
backend/supabase/functions/account-delete.ios/SpeakTrue/AuthService.swift call site + settings flows.android/app/src/main/java/com/speaktrue/app/SpeakTrueApp.kt
android/app/src/main/java/com/speaktrue/app/MainActivity.kt
android/app/src/main/java/com/speaktrue/ui/navigation/AppNavGraph.kt
android/app/src/main/java/com/speaktrue/features/tutorial/AppTour.kt
android/app/src/main/java/com/speaktrue/core/config/RuntimeConfig.ktandroid/app/src/main/java/com/speaktrue/core/network/EdgeFunctionClient.ktandroid/app/src/main/java/com/speaktrue/core/network/EdgeFunctionCaller.ktandroid/app/src/main/java/com/speaktrue/core/network/OriginSecurity.ktandroid/app/src/main/java/com/speaktrue/core/auth/AuthRepository.ktandroid/app/src/main/java/com/speaktrue/features/auth/*android/app/src/main/java/com/speaktrue/core/audio/AudioRecorderService.ktandroid/app/src/main/java/com/speaktrue/core/audio/AudioPlayerService.ktandroid/app/src/main/java/com/speaktrue/core/storage/RealSupabaseStorageService.ktandroid/app/src/main/java/com/speaktrue/core/storage/StorageService.ktfeatures/tts/{data,presentation,ui}features/stt/{data,presentation,ui}features/sts/{data,presentation,ui}features/soundboard/{data,presentation,ui}features/voiceclone/{data,presentation,ui}features/settings/{data,presentation,ui}features/agreement/{data,presentation,ui}features/dictionary/{data,presentation,ui}features/language/*features/presets/*features/shared/*, theme layer ui/theme/*1) Add a backend field to user settings:
backend/supabase/functions/user-settings-get/index.ts, .../user-settings-update/index.ts, migration.android/app/src/main/java/com/speaktrue/core/config/RuntimeConfig.kt for defaults if relevant.android/app/src/main/java/com/speaktrue/features/settings/data/SettingsRepository.ktfeatures/settings/data/SettingsStore.kt and UI view models../gradlew -p android :app:testDebugUnitTest./gradlew -p android :app:lintDebug2) Change voice list behavior or sorting rules:
backend/supabase/functions/voices-listfeatures/tts/data/VoiceCatalogRepository.ktfeatures/tts/ui/TTSScreen.ktfeatures/tts/presentation/TTSViewModel.kt3) Update STS workflow path handling:
features/sts/data/*features/sts/presentation/STSViewModel.ktfeatures/sts/ui/STSScreen.ktdocs/contracts/speech-workflow-contract.mddocs/contracts/native-speech-parity-anchor.md4) Change soundboard ordering rules:
backend/supabase/functions/clip-order-batchfeatures/soundboard/data/SoundboardRepository.ktfeatures/soundboard/ui/SoundboardScreen.ktfeatures/soundboard/presentation/SoundboardViewModel.ktandroid/app/src/test/java/com/speaktrue/**android/app/src/androidTest/java/com/speaktrue/**scripts verification tools.web/marketing/*
web/python-web-app/*
web/marketing/index.htmlweb/marketing/auth/callback/index.htmlweb/marketing/scripts/main.jsweb/marketing/scripts/waitlist.jsweb/marketing/scripts/theme_boot.jsweb/python-web-app/wsgi.py
web/python-web-app/src/app.py
web/python-web-app/src/config.py
web/python-web-app/src/legacy_runtime.py
web/python-web-app/src/legacy_runtime_adapter.py
web/python-web-app/src/routes/tts.py -> speech request intake.web/python-web-app/src/routes/stt.py -> STT intake and output shaping.web/python-web-app/src/routes/soundboard.py -> soundboard endpoints.web/python-web-app/src/routes/settings.py -> user settings routes.web/python-web-app/src/routes/voice_clone.py -> voice clone request routing.web/python-web-app/src/routes/categories.py -> category management route surface.web/python-web-app/src/routes/health.py -> health checks and base diagnostics.web/python-web-app/src/services/speech_service.pyweb/python-web-app/src/services/stt_service.pyweb/python-web-app/src/services/tts_service.pyweb/python-web-app/src/services/voice_clone_service.pyweb/python-web-app/src/services/soundboard_service.pyweb/python-web-app/src/services/category_service.pyweb/python-web-app/src/services/settings_service.pyweb/python-web-app/src/services/user_settings_service.pyweb/python-web-app/src/services/pronunciation_service.pyweb/python-web-app/src/services/storage_provider.pyweb/python-web-app/src/services/storage_config_service.pyweb/python-web-app/src/services/supabase_edge_client.py1) Add a new user route or payload field:
web/python-web-app/src/services.web/python-web-app/tests/api/*web/python-web-app/tests/unit/*2) Move behavior out of compatibility shim:
3) Adjust marketing-only content/copy:
web/marketing/index.html for copy and CTA.web/marketing/styles/*, web/marketing/scripts/* for behavior.web/marketing/auth/callback/index.html.All function directories are under backend/supabase/functions/.
backend/supabase/functions/_shared/auth-context.ts
backend/supabase/functions/_shared/cors.ts
backend/supabase/functions/_shared/usage.ts
backend/supabase/functions/_shared/quotas.ts
backend/supabase/functions/_shared/entitlements.ts
backend/supabase/functions/_shared/private-voice-access.ts
backend/supabase/functions/_shared/byok.ts
backend/supabase/functions/_shared/theme.ts
backend/supabase/functions/_shared/user_defaults.ts
The table below is the canonical high-level behavior map:
| Function directory | Responsibility |
|---|---|
account-delete |
Delete user account + related dependent records in DB/storage through backend-guarded logic. |
billing-apple-sync |
Process Apple Billing sync payloads; update entitlement state. |
billing-apple-notifications |
Handle Apple server notifications and mutate entitlement/log trails. |
billing-google-play-sync |
Process Google Play subscription events and entitlement updates. |
billing-stripe-webhook |
Process Stripe webhook events and map to internal entitlement state. |
bug-report-submit |
Accept and persist bug telemetry payloads for support triage. |
byok-resolve |
Resolve BYOK credential material path/metadata for a user. |
byok-upsert |
Upsert BYOK material and persist metadata. |
clip-order-batch |
Apply atomic batch updates to soundboard ordering metadata. |
language-recommend |
Recommend supported language list for speech flows. |
models-list |
Return available model list (tts/stt/etc. as surfaced by clients). |
pronunciation-dictionary |
Read/update dictionary entries and normalization behavior. |
quota-status |
Return current user usage and quota summary. |
soundboard-save-generated |
Persist generated clip metadata and artifact references for soundboard. |
soundboard-delete |
Delete soundboard entries and associated storage/metadata safely. |
soundboard-clip-ingest |
Currently present but no implementation files in this snapshot. |
stt-transcribe |
Convert audio payloads to transcript and return normalized result envelope. |
style-presets |
Read/write style preset metadata. |
tts-generate |
Core synthesis function: input validation, provider invocation, artifact persistence/paths. |
user-settings-get |
Read user settings with defaults and compatibility fallback. |
user-settings-update |
Patch and persist user settings and setting diffs. |
voice-clone-preflight |
Validate prerequisites and permissions before voice-clone creation. |
voice-clone-create |
Create new user voice clone and persist metadata + provider link. |
voice-clone-delete |
Delete voice clone and clean provider metadata. |
voices-list |
Return voice catalog entries allowed by entitlement and platform restrictions. |
waitlist-signup |
Store waitlist interest records. |
sts-live-voice-tts-session |
Live STS session orchestration for direct speech-to-voice path. |
sts-live-interpreter-session |
Live interpreter session bootstrap (newer migration path). |
sts-live-interpreter-tts-session |
Interpreter-to-tts relay endpoint for live interpreter STS mode. |
sts-near-realtime-session |
Near-realtime STS path bootstrap and session metadata lifecycle. |
sts-realtime-session |
Realtime STS session orchestration and state transitions. |
sts-realtime-finalize |
Finalize realtime STS artifact, dedupe tail/repeat behavior, and finalize transcript/artifact output. |
For each function directory:
index.ts should handle request bootstrap + DI.handler.ts should hold pure validation and business orchestration.validation.ts / validation_test.ts should isolate schema checks.*_test.ts should validate contract-level behavior.*_logic.ts or domain helper file should be thin and deterministic.ios/SpeakTrue/AIProxyService.swift + feature view models/services.android/app/src/main/java/com/speaktrue/features/**/*Repository.kt plus callers.web/python-web-app/src/services/* + route layer.Use existing tests to confirm payload schema before editing:
ios/SpeakTrueTests/*android/app/src/test/java/com/speaktrue/contracts/* and related UI tests.web/python-web-app/tests/api/* and backend/supabase/functions/*_test.ts.001_core_schema.sql through 013_atomic_usage_counter_increment.sql008_... through 011_...014_*, 017_*, 018_*, 019_*020_*, 022_*, 024_*, 025_*, 029_*, 031_*, soft-delete trilogy in 2026052609xxxx.021_pronunciation_dictionary.sql and associated defaults.202605200... through 20260628180000_add_live_interpreter_sts.sql20260523010000_repair_auth_user_trigger_hierarchy_conflict.sql20260623090000_create_sts_realtime_sessions.sql20260524030000_add_tts_defaults_to_user_settings.sql20260526091000_add_soundboard_settings_to_user_settings.sql030_ai_data_sharing_agreement.sql202605010... and 202605171...Use the smallest set that covers your change surface.
xcodebuild -project ios/SpeakTrue.xcodeproj -scheme SpeakTrue -destination 'generic/platform=iOS Simulator' buildxcodebuild test -project ios/SpeakTrue.xcodeproj -scheme SpeakTrue -destination 'platform=iOS Simulator,name=iPhone 15'./android/gradlew -p android :app:compileDebugKotlin./android/gradlew -p android :app:testDebugUnitTest./android/gradlew -p android :app:lint./android/gradlew -p android :app:bundleReleaseArtifactpython3 scripts/verify_android_ios_parity_release.pypython3 scripts/verify_android_play_assets.pybackend/supabase):
supabase startsupabase functions serve <function>npx -y deno@latest test backend/supabase/functions/<function>/*_test.tsbash scripts/coverage_backend_contracts.shbash scripts/regression_migration_paths.shpython3 -m venv web/python-web-app/venvsource web/python-web-app/venv/bin/activatepython3 -m pip install -r web/python-web-app/requirements.txt -r web/python-web-app/requirements-dev.txtpython3 -m pytest web/python-web-app/testsweb/python-web-app/venv/bin/gunicorn --chdir web/python-web-app --bind 127.0.0.1:5055 wsgi:appandroid-ci.yml
deploy-speaktrue-homelab.yml
web/python-web-app on push to main to homelab VM.deploy-speaktrue-dev-homelab.yml
deploy-web-app.yml.disabled
This section is the practical “what file changes when” guide.
1) Change a UI flow in iOS
ios/SpeakTrue/*View.swift, ios/SpeakTrue/*ViewModel.swift).ios/SpeakTrueTests.2) Change a UI flow in Android
android/app/src/main/java/com/speaktrue/features/<feature>/ui/*.kt and .../presentation/*.kt.android/app/src/test/java/com/speaktrue/contracts/*.3) Change backend API contract
backend/supabase/functions/<fn>.ios, android, and web.docs/contracts/* if behavior changed.4) Add or modify a migration
backend/supabase/migrations.5) Fix cross-surface parity issue
docs/contracts/native-speech-parity-anchor.md and docs/contracts/speech-workflow-contract.md.6) Debug auth/session issues
ios/SpeakTrue/AuthService.swift, ios/SpeakTrue/AuthState.swift.core/auth/*.routes/helpers.py, services/auth_service.py, src/app.py._shared/auth-context.ts, user-settings-*, auth redirect docs in docs/ops/SUPABASE_AUTH_REDIRECTS.md.AuthService + AuthStatecore/auth/*_shared/auth-context.ts and related user settings functions.CloudStorageService + Soundboard* files.features/soundboard/*Repository.kt.services/soundboard_service.py, routes/soundboard.py, migration history for soft delete/trash.clip-order-batch, soundboard-save-generated, soundboard-delete.features/sts/* and tests.STSViewModel and RealtimeSTTService.sts-* functions and quota/auth state around session lifecycle.voices-list contract.docs/contracts/native-speech-parity-anchor.mddocs/contracts/speech-workflow-contract.mddocs/reference/repository-full-deep-reference.mddocs/architecture/overview.mddocs/ops/MIGRATION_REGRESSION_GATES.mddocs/ops/SUPABASE_SMOKE_TEST_CHECKLIST.mddocs/ops/SUPABASE_AUTH_REDIRECTS.mddocs/ops/CLOUDFLARE_PAGES_DEPLOY.mddocs/configuration/runtime.mddocs/ops/SECRETS_HYGIENE.mddocs/testing/strategy.mdKeep this manual current by updating it whenever any file in this list is changed.