Skip to content

Your phone, on your command. Gotcha is world's first fully on-device AI copilot for Android that turns natural language into real device actions — safely.

docs: stop documenting the private auth backend

Durganshu Mishra5891ac3ec43d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3117af4..f079273 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -193,7 +193,7 @@ search bar" vs "start searching manually by swiping").
Adds "Samosa AI" as an additional LLM provider alongside the existing
OpenAI-compatible workflow. Samosa AI authenticates with Google Sign-In (via
Android Credential Manager + Google Identity Services) and exchanges the Google
-ID token for an `Samosa AI backend` session JWT, which is then used as the bearer
+ID token for a backend session JWT, which is then used as the bearer
token against the OpenAI-compatible proxy at `https://api.samosa-ai.example/v1/`.
The existing OpenAI-compatible providers (OpenAI, LocalAI, Ollama, vLLM, LM
Studio, OpenRouter, any OpenAI-compatible server) are unchanged.
@@ -210,7 +210,7 @@ Studio, OpenRouter, any OpenAI-compatible server) are unchanged.
`saveSamosaSession` / `clearSamosaSession`. Defaults keep existing users on the
OpenAI-compatible flow.
- **auth/SamosaAuthApi.kt** (new): Retrofit interface + models for the
- auth-manager `POST /register`, `GET /me`, and `POST /logout` endpoints against
+ backend `POST /register`, `GET /me`, and `POST /logout` endpoints against
`https://api.samosa-ai.example/`.
- **auth/SamosaAuthManager.kt** (new): drives Google Sign-In via Credential
Manager (WEB client ID as `serverClientId`), exchanges the Google ID token at
diff --git a/RUNNING.md b/RUNNING.md
index f8dca8a..58709ec 100644
--- a/RUNNING.md
+++ b/RUNNING.md
@@ -255,22 +255,6 @@ Before publishing to Google Play or distributing a release APK, complete this ch
4. Edit the Android OAuth client (or create a new one)
5. Paste the SHA-1 fingerprint
- [ ] **Update `WEB_CLIENT_ID`** in `SamosaAuthManager.kt` if you created a new OAuth client
-- [ ] **Update `GOOGLE_CLIENT_ID`** in the backend `.env` to match the new client ID
-- [ ] **Verify backend validates `aud`** — the backend at `api.samosa-ai.example` must reject tokens not minted for your client ID (already implemented in `the backend`)
-
-### Backend environment (Samosa AI backend)
-
-- [ ] **Set strong secrets** in production `.env`:
- ```bash
- ***=<strong_random_hex> # For session JWT signing
- ***=<strong_random_hex> # For encrypting user API keys at rest
- ***=<your_admin_key> # For creating users on the gateway
- ```
-- [ ] **Set `ENVIRONMENT=production`** to enforce strict security checks
-- [ ] **Disable test tokens**: ensure `***=false` (default)
-- [ ] **Configure CORS**: set `***` if needed
-- [ ] **Set database credentials**: use strong passwords for Postgres/Redis
-- [ ] **Review rate limits**: adjust `***`, `***`, `***` as needed
### Build & verify
@@ -308,9 +292,6 @@ Before publishing to Google Play or distributing a release APK, complete this ch
grep -rn "sk-\|password\|secret\|token\|api_key" app/src/main/java/ --include="*.kt" | grep -v "EncryptedSharedPreferences\|SettingsRepository\|samosaSession\|SamosaAuthApi\|LLMClient"
```
- [ ] **Keystore not in git**: verify `*.keystore` is in `.gitignore`
-- [ ] **Backend secrets not exposed**: ensure `.env` files are gitignored and not in Docker images
-- [ ] **Test token bypass disabled**: confirm `***=false` in production backend
-- [ ] **Admin credentials changed**: update `***` and `***` from defaults
### Post-release
diff --git a/app/src/main/java/com/gotcha/audio/AudioModels.kt b/app/src/main/java/com/gotcha/audio/AudioModels.kt
index 5c272b1..cef3d7f 100644
--- a/app/src/main/java/com/gotcha/audio/AudioModels.kt
+++ b/app/src/main/java/com/gotcha/audio/AudioModels.kt
@@ -7,7 +7,7 @@ import kotlinx.serialization.Serializable
/**
* Provider type for TTS / STT.
* - [ANDROID]: device-native TextToSpeech / SpeechRecognizer (no network).
- * - [SAMOSA_AI]: Samosa AI backend session JWT against the Samosa `/v1/audio/`
+ * - [SAMOSA_AI]: backend session JWT against the Samosa `/v1/audio/`
* endpoints. No credentials to enter — the same Google Sign-In used for the
* LLM provider covers audio here.
* - [API]: user-supplied OpenAI-compatible base URL + API key.
diff --git a/app/src/main/java/com/gotcha/auth/SamosaAuthApi.kt b/app/src/main/java/com/gotcha/auth/SamosaAuthApi.kt
index 63298db..0ca4fa9 100644
--- a/app/src/main/java/com/gotcha/auth/SamosaAuthApi.kt
+++ b/app/src/main/java/com/gotcha/auth/SamosaAuthApi.kt
@@ -36,7 +36,7 @@ data class RegisterResponse(
)
/**
- * Samosa AI backend auth endpoints (base URL https://api.samosa-ai.example/).
+ * Samosa AI auth endpoints (base URL https://api.samosa-ai.example/).
* The OpenAI-compatible chat/model endpoints are handled by the existing
* LLMClient against https://api.samosa-ai.example/v1/ — these are auth-only.
*/
diff --git a/app/src/main/java/com/gotcha/auth/SamosaAuthManager.kt b/app/src/main/java/com/gotcha/auth/SamosaAuthManager.kt
index c82c909..35ecefb 100644
--- a/app/src/main/java/com/gotcha/auth/SamosaAuthManager.kt
+++ b/app/src/main/java/com/gotcha/auth/SamosaAuthManager.kt
@@ -25,7 +25,7 @@ sealed interface SamosaSignInResult {
/**
* Drives Samosa AI authentication:
* 1. Request a Google ID token via Credential Manager (using the WEB client ID
- * as serverClientId, per Samosa AI backend requirements).
+ * as serverClientId, per the backend's requirements).
* 2. Exchange it at POST /register for a session JWT.
* 3. Persist the JWT + account email in EncryptedSharedPreferences.
*
@@ -133,7 +133,7 @@ class SamosaAuthManager(
/**
* WEB OAuth client ID. Google mints the ID token with aud = this value,
- * which is what Samosa AI backend verifies. Do NOT use the Android client ID.
+ * which is what the backend verifies. Do NOT use the Android client ID.
*/
const val WEB_CLIENT_ID =
"YOUR_GOOGLE_WEB_CLIENT_ID.apps.googleusercontent.com"
diff --git a/app/src/main/java/com/gotcha/data/LlmProvider.kt b/app/src/main/java/com/gotcha/data/LlmProvider.kt
index 3484223..97f290c 100644
--- a/app/src/main/java/com/gotcha/data/LlmProvider.kt
+++ b/app/src/main/java/com/gotcha/data/LlmProvider.kt
@@ -7,7 +7,7 @@ package com.gotcha.data
* API key (OpenAI, LocalAI, Ollama, vLLM, LM Studio, OpenRouter, any
* OpenAI-compatible server).
*
- * [SAMOSA_AI] authenticates with Google Sign-In and uses an Samosa AI backend
+ * [SAMOSA_AI] authenticates with Google Sign-In and uses a backend-issued
* session JWT against the OpenAI-compatible proxy at [SAMOSA_BASE_URL]. Base URL
* and API key are ignored in this mode.
*/
@@ -16,7 +16,7 @@ enum class LlmProvider(val label: String) {
OPENAI_COMPATIBLE("OpenAI Compatible");
companion object {
- /** OpenAI-compatible proxy exposed by Samosa AI backend. */
+ /** OpenAI-compatible proxy exposed by the Samosa AI backend. */
const val SAMOSA_BASE_URL = "https://api.samosa-ai.example/v1/"
fun fromName(name: String?): LlmProvider =
diff --git a/app/src/main/java/com/gotcha/data/SettingsRepository.kt b/app/src/main/java/com/gotcha/data/SettingsRepository.kt
index c9fedf6..851860b 100644
--- a/app/src/main/java/com/gotcha/data/SettingsRepository.kt
+++ b/app/src/main/java/com/gotcha/data/SettingsRepository.kt
@@ -10,7 +10,7 @@ data class Settings(
val apiKey: String = "",
val baseUrl: String = DEFAULT_BASE_URL,
val model: String = DEFAULT_MODEL,
- // Samosa AI: Samosa AI backend session JWT + connected Google account (never
+ // Samosa AI: backend session JWT + connected Google account (never
// stores the Google ID token). Only used when provider == SAMOSA_AI.
val samosaSessionToken: String = "",
val samosaEmail: String = "",
diff --git a/app/src/main/java/com/gotcha/notifications/NotificationApi.kt b/app/src/main/java/com/gotcha/notifications/NotificationApi.kt
index e777840..62a331e 100644
--- a/app/src/main/java/com/gotcha/notifications/NotificationApi.kt
+++ b/app/src/main/java/com/gotcha/notifications/NotificationApi.kt
@@ -120,7 +120,7 @@ open class NotificationApi(
companion object {
private const val TAG = "NotificationApi"
- /** OpenAI-compatible proxy exposed by Samosa AI backend; reused as the
+ /** OpenAI-compatible proxy exposed by the Samosa AI backend; reused as the
* notifications host so a single network identity covers LLM/audio/notifications. */
const val DEFAULT_BASE_URL = "https://api.samosa-ai.example"
}