Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

docs(mobile): clarify contributor setup (#2304)

Chad Piha7991f9e6b085
diff --git a/openwhispr-mobile/.env.example b/openwhispr-mobile/.env.example
index 3f688afb2..389e1609b 100644
--- a/openwhispr-mobile/.env.example
+++ b/openwhispr-mobile/.env.example
@@ -3,9 +3,6 @@
# Backend API URL
EXPO_PUBLIC_API_URL=https://api.openwhispr.com
-# OAuth callback URL configured in the backend auth provider.
-EXPO_PUBLIC_OAUTH_CALLBACK_URL=https://openwhispr.com/auth/mobile-callback
-
# Optional: endpoint path for fused transcribe + cleanup in a single request
# (faster cloud dictation). Resolved against EXPO_PUBLIC_API_URL. Defaults to
# /api/transcribe when unset; the client automatically falls back to a separate
@@ -29,18 +26,41 @@ EXPO_PUBLIC_SUPERWALL_ANDROID_API_KEY=
EXPO_PUBLIC_REVENUECAT_IOS_API_KEY=
EXPO_PUBLIC_REVENUECAT_ANDROID_API_KEY=
+# Optional: Google Calendar OAuth client IDs for iOS. Development builds use
+# the development value when present and otherwise fall back to the production
+# value. The redirect scheme and URI are derived from the selected client ID.
+EXPO_PUBLIC_GOOGLE_CALENDAR_IOS_CLIENT_ID=
+EXPO_PUBLIC_GOOGLE_CALENDAR_IOS_CLIENT_ID_DEV=
+
+# Optional: override Google Calendar redirect values when they cannot be
+# derived from the OAuth client ID.
+# EXPO_PUBLIC_GOOGLE_CALENDAR_IOS_REDIRECT_SCHEME=
+# EXPO_PUBLIC_GOOGLE_CALENDAR_IOS_REDIRECT_SCHEME_DEV=
+# EXPO_PUBLIC_GOOGLE_CALENDAR_IOS_REDIRECT_URI=
+# EXPO_PUBLIC_GOOGLE_CALENDAR_IOS_REDIRECT_URI_DEV=
+
# Keyboard recording upload format. "auto" tries compact m4a for cloud keyboard
# dictation and persists a WAV downgrade if the backend rejects the format.
# Use "wav" for maximum compatibility or "m4a" to force compressed uploads.
EXPO_PUBLIC_KEYBOARD_AUDIO_FORMAT=auto
-# Optional local iOS dev identity. Copy these to `.env.local` or export them
-# in your shell if your Apple team cannot sign the default dev bundle id.
+# Optional local development identity. Copy these to `.env.local` or export
+# them in your shell when the committed identifiers are not appropriate.
# OPENWHISPR_APP_ENV=development
# OPENWHISPR_IOS_BUNDLE_IDENTIFIER=com.example.openwhispr.dev
+# OPENWHISPR_ANDROID_PACKAGE=com.example.openwhispr.dev
# OPENWHISPR_SCHEME=openwhispr-dev
# OPENWHISPR_DISPLAY_NAME=OpenWhispr Dev
# OPENWHISPR_KEYBOARD_DISPLAY_NAME=OpenWhispr Dev
+# Compatibility-only auth override. Normally the auth client inherits
+# OPENWHISPR_SCHEME from the generated app config. Keep both values identical
+# if a legacy build requires this override.
+# EXPO_PUBLIC_OPENWHISPR_SCHEME=openwhispr-dev
+
+# Advanced identity overrides. The defaults are derived from the iOS bundle ID.
+# OPENWHISPR_APP_GROUP_ID=group.com.example.openwhispr.dev
+# OPENWHISPR_KEYBOARD_BUNDLE_IDENTIFIER=com.example.openwhispr.dev.keyboard
+
# Dictionary feature is entirely local — words are stored in AsyncStorage on-device
# and never sent to any server. No environment variable needed.
diff --git a/openwhispr-mobile/CONTRIBUTING.md b/openwhispr-mobile/CONTRIBUTING.md
index d73708cec..78b72379e 100644
--- a/openwhispr-mobile/CONTRIBUTING.md
+++ b/openwhispr-mobile/CONTRIBUTING.md
@@ -2,13 +2,29 @@
Thanks for your interest in contributing. This guide covers everything you need to fork, build, and submit a PR.
+The mobile app is maintained in `openwhispr-mobile/` inside the main OpenWhispr repository, but it has its own dependencies, lockfile, commands, CI checks, and release process. Run the commands below from `openwhispr-mobile/`.
+
## Prerequisites
-- **Node.js** 24.x and npm
-- **Xcode** 16+ (for iOS builds; required even if you only ship Android because the keyboard extension is iOS-only)
-- An **Apple Developer account** (free is fine for local simulator; paid is required to install on a physical device because the iOS keyboard extension uses an App Group capability)
-- **EAS CLI**: `npm install -g eas-cli`
-- iOS Simulator and/or Android Emulator
+All contributors need:
+
+- Git
+- Node.js 24.x and npm
+
+For iOS development:
+
+- macOS with [Xcode 26.2 or newer](https://docs.expo.dev/versions/v55.0.0/)
+- Ruby and Bundler for the locked CocoaPods dependencies
+- An iOS Simulator, or a physical device for device-only testing
+
+The simulator does not require an Apple Developer account. A paid Apple Developer Program membership is required to sign a physical-device build because the keyboard and activity extensions use an App Group capability.
+
+For Android development:
+
+- Android Studio with Android SDK 36
+- An Android emulator or physical device
+
+Android development does not require Xcode or an Apple Developer account. The EAS CLI is only required when working with EAS builds or submissions; it is not needed for normal local development.
## First-Time Setup
@@ -16,12 +32,18 @@ Thanks for your interest in contributing. This guide covers everything you need
git clone https://github.com/<your-fork>/openwhispr.git
cd openwhispr/openwhispr-mobile
npm install
-cp .env.example .env
+cp .env.example .env.local
```
-Edit `.env` and fill in the values described in [Environment Variables](#environment-variables) below.
+The example uses the hosted OpenWhispr API and leaves optional integrations disabled. Edit `.env.local` only for the features or local identity values you need. Local environment files are ignored by Git.
+
+Install the locked Ruby dependencies before the first iOS build:
-If you plan to build on a real iOS device, you must rebrand the bundle identifiers and App Group — see [Rebranding for Forks](#rebranding-for-forks).
+```bash
+bundle install
+```
+
+If you plan to build on a physical iOS device, configure a unique local identity and signing team first. See [Physical iOS Devices and Forks](#physical-ios-devices-and-forks).
## Development Workflow
@@ -33,48 +55,57 @@ npm run typecheck # tsc --noEmit
npm run lint # ESLint
npm run format # Prettier --check
npm run format:write # Prettier --write
+npm run check # format + lint + typecheck + Expo Doctor
npm run clean # format + lint + typecheck
```
`npm run ios` runs `expo run:ios`, which executes `expo prebuild` and compiles the native project. The keyboard extension is wired in by the config plugin at `plugins/keyboard-extension/withKeyboardExtension.js` during prebuild.
+OpenWhispr uses custom native modules, so Expo Go is not a supported development environment. Use `npm run ios` or `npm run android` to create a development build.
+
+The `android`, `ios`, and `prebuild` npm scripts use POSIX environment-variable syntax. On Windows, put `OPENWHISPR_APP_ENV=development` in `.env.local` and run `npx expo run:android` or `npx expo prebuild` directly. iOS builds still require macOS.
+
## Environment Variables
-All client-facing variables must be prefixed with `EXPO_PUBLIC_`. See `.env.example` for the full list:
+Use [.env.example](./.env.example) as the canonical variable reference. It groups configuration into:
-| Variable | Purpose |
-| -------------------------------- | ------------------------------------------------ |
-| `EXPO_PUBLIC_API_URL` | Backend API base URL |
-| `EXPO_PUBLIC_OAUTH_CALLBACK_URL` | OAuth redirect URL configured in the backend |
-| `EXPO_PUBLIC_SENTRY_DSN` | Optional. Leave empty to disable error reporting |
+- hosted API and transcription settings;
+- optional Sentry, AppsFlyer, Superwall, RevenueCat, and Google Calendar integrations;
+- keyboard audio behavior; and
+- local bundle identifiers, URL schemes, and display names.
-## Rebranding for Forks
+Variables prefixed with `EXPO_PUBLIC_` are embedded in the application bundle and must never contain secrets. Keep contributor-specific values in `.env.local`, which is ignored by Git.
-The repo is hard-coded to Gizmo Labs Inc. identifiers. If you fork and want to build on a real device or ship your own version, change these references to your own org:
+## Physical iOS Devices and Forks
-1. **`app.base.json`** — `expo.owner`, `expo.ios.bundleIdentifier`, `expo.android.package`, `expo.ios.appleTeamId`, and the keyboard extension entry under `expo.extra.eas.build.experimental.ios.appExtensions[0].bundleIdentifier` and its `entitlements["com.apple.security.application-groups"]`.
-2. **`plugins/keyboard-extension/withKeyboardExtension.js`** — `APP_GROUP_ID` constant near the top of the file.
-3. **`modules/app-group-storage/ios/AppGroupStorageModule.swift`** — `appGroupId` property and the Darwin notification names.
-4. **`plugins/keyboard-extension/ios/KeyboardViewController.swift`** and **`plugins/keyboard-extension/ios/OpenWhisprKeyboard.entitlements`** — the App Group identifier string.
+The committed configuration contains OpenWhispr's production identifiers. Do not manually replace identifiers throughout the source. For a local physical-device build, set a unique identity in `.env.local`:
-Confirm with:
+```dotenv
+OPENWHISPR_IOS_BUNDLE_IDENTIFIER=com.example.openwhispr.dev
+OPENWHISPR_SCHEME=example-openwhispr-dev
+OPENWHISPR_DISPLAY_NAME=OpenWhispr Dev
+OPENWHISPR_KEYBOARD_DISPLAY_NAME=OpenWhispr Dev
+```
+
+`app.config.js` derives matching bundle identifiers for the keyboard and activity extensions and an App Group named `group.<bundle identifier>`. Override `OPENWHISPR_APP_GROUP_ID` or `OPENWHISPR_KEYBOARD_BUNDLE_IDENTIFIER` only when your Apple configuration requires different values.
+
+Verify the resolved configuration and generate the native project:
```bash
-grep -rn 'group.com.gizmolabs' modules/ plugins/
-grep -rn 'com.gizmolabs.openwhispr' app.base.json
+OPENWHISPR_APP_ENV=development npx expo config --type public
+npm run prebuild:dev -- --clean
```
-After rebranding, run `npm run ios` again to regenerate the native project.
+In the generated Xcode workspace, select your Apple development team for the main app, `OpenWhisprKeyboard`, and `OpenWhisprActivity` targets. Your team must own the bundle identifiers and App Group. The generated `ios/` directory is ignored by Git, so these local signing changes should not be committed.
+
+Maintainers shipping a separate fork must also replace the organization-specific Expo owner, Apple team, EAS project, update URL, and App Store submission values in `app.base.json` and `eas.json`. Those release settings are separate from the local identity overrides above.
## Pull Request Checklist
Before submitting:
-- [ ] `npm run typecheck` passes
-- [ ] `npm run lint` passes
-- [ ] `npm run format` passes (run `npm run format:write` to fix)
+- [ ] `npm run check` passes
- [ ] `npm test -- --runInBand` passes
-- [ ] `npm run doctor` passes
- [ ] No secrets, API keys, or credentials committed
- [ ] PR description explains the why, not just the what
- [ ] Screenshots or screen recordings included for UI changes
diff --git a/openwhispr-mobile/README.md b/openwhispr-mobile/README.md
index 84d3e21bd..e944aa3ed 100644
--- a/openwhispr-mobile/README.md
+++ b/openwhispr-mobile/README.md
@@ -2,6 +2,8 @@
Native iOS and Android companion app for [OpenWhispr](https://openwhispr.com). Fast on-device or cloud transcription, AI-powered cleanup, notes, and a system-wide dictation keyboard.
+The mobile app lives in the main [`OpenWhispr/openwhispr`](https://github.com/OpenWhispr/openwhispr) repository under `openwhispr-mobile/`. It currently remains self-contained, with its own dependencies, lockfile, CI checks, and release process. Run all mobile commands from this directory.
+
## Highlights
- **Cloud or Private mode** — flip between fast cloud transcription and fully on-device Whisper inference
@@ -13,17 +15,38 @@ Native iOS and Android companion app for [OpenWhispr](https://openwhispr.com). F
Expo SDK 55 · React 19 · expo-router (NativeTabs) · NativeWind · Zustand · Drizzle + expo-sqlite · whisper.rn · Sentry
+## Platform status
+
+- **iOS** is the active release target. The keyboard extension and several native features require a development build; they do not run in Expo Go.
+- **Android** can be built locally from the checked-in source, but native Android build and release validation are not yet part of CI.
+
## Quick start
```bash
git clone https://github.com/<your-fork>/openwhispr.git
cd openwhispr/openwhispr-mobile
npm install
-cp .env.example .env
-npm run ios # or: npm run android
+cp .env.example .env.local
+```
+
+For iOS, install the locked Ruby dependencies before building:
+
+```bash
+bundle install
+npm run ios
+```
+
+For Android:
+
+```bash
+npm run android
```
-See [CONTRIBUTING.md](./CONTRIBUTING.md) for prerequisites, env-var details, and the rebrand steps required to build on a real device.
+The npm script above uses POSIX environment-variable syntax. On Windows, add
+`OPENWHISPR_APP_ENV=development` to `.env.local`, then run `npx expo run:android` from
+PowerShell or Command Prompt.
+
+See [CONTRIBUTING.md](./CONTRIBUTING.md) for platform prerequisites, configuration details, and the signing steps required to build on a physical iOS device.
## Project layout
@@ -49,13 +72,9 @@ plugins/keyboard-extension Expo config plugin + iOS keyboard target
## Environment variables
-See [.env.example](./.env.example). All client-side variables are prefixed `EXPO_PUBLIC_`.
+Copy [.env.example](./.env.example) to `.env.local`. It documents the hosted-service defaults, optional integrations, and local app-identity overrides. Optional services remain disabled when their values are empty.
-| Variable | Purpose |
-| -------------------------------- | ---------------------------------------- |
-| `EXPO_PUBLIC_API_URL` | Backend API base URL |
-| `EXPO_PUBLIC_OAUTH_CALLBACK_URL` | OAuth callback configured in the backend |
-| `EXPO_PUBLIC_SENTRY_DSN` | Optional. Empty disables error reporting |
+Variables prefixed with `EXPO_PUBLIC_` are bundled into the application. Never put secrets in them or commit local environment files.
## Contributing