Phone app

Biscuit for iPhone and Android is a React Native app built with Expo and Expo Router (apps/mobile). It has the desktop app's sign-in and first run, a home with your crew, chats and search, and everything the phone web app's chat does. It runs without the API: data comes from the web app's sample workspace, and replies come from a live model when one is set.

The phone app
apps/mobileShared from the web appScreensExpo RouterWidgets · LiveActivitiessrc/lib/model.tsaskModel()App store+ demo repliessrc/lib/shared.tsEXPO_PUBLIC_CHAT_URL→ /api/chatEXPO_PUBLIC_GROQ_API_KEYMetro watches../web/srcGroqseed.ts · ghostData.tschomper.tssurfaces.*.tsbuild for otherslocal testing
You or your deviceCheck or decisionSaved or publishedOutside serviceHover or tab to a box to trace it

With neither variable set, or when the proxy reports no key, the app keeps its demo replies and nothing leaves the phone.

Shared code, not copies

metro.config.js adds apps/web/src to Metro's watchFolders, so the phone app imports the web app's files directly instead of copying them:

From apps/web/src Used for
data/seed.ts The sample bots, chats and workspace
bots/ghostData.ts, bots/chomper.ts Biscuit's ghost drawings and the task-complete chomp
styles/global.css, styles/themes.css Every style's colour tokens, copied by npm run tokens into src/lib/tokens.generated.ts (npm run typecheck fails if they drift)

Only data, types and tokens cross over (src/lib/shared.ts); web components stay on the web. apps/mobile is outside the npm workspaces because Expo pins its own React and React Native, so it keeps its own node_modules and lockfile.

Live model replies

src/lib/model.ts asks a real model the same way the web and desktop apps do (apps/web/src/lib/groq.ts). It picks the first of these that is set:

  1. EXPO_PUBLIC_GROQ_API_KEY: calls Groq straight from the phone. Local testing only: the key ships inside the app. With a key, the model picker also checks which models it can run.
  2. EXPO_PUBLIC_CHAT_URL: the chat proxy on your deployed site (apps/web/api/chat.js). The app probes it once with GET; if it answers {configured: true}, replies go through it and the key stays on the server. Use this for any build you hand to someone.
  3. Neither, or the proxy has no key: short demo replies, and nothing leaves the phone.
# apps/mobile/.env
EXPO_PUBLIC_CHAT_URL=https://<your-site>/api/chat

The reply is asked for as one JSON object (text in Markdown plus up to three suggested choices), kept short because it's read on a phone. EXPO_PUBLIC_GROQ_MODEL sets the default model (openai/gpt-oss-120b); the model picker lists GPT-OSS 120B and 20B, Kimi K2, Qwen3 32B, Llama 3.3 70B and Llama 3.1 8B with what each is good at. Through the proxy, the server's GROQ_MODEL decides.

What's in the app

  • Home: the crew as a grid of tinted tiles (face, name, status), a status bar with search and your computer's connection, and a bottom bar with what needs you, voice and a big + (src/app/(tabs)/chats/index.tsx).
  • Chats: every conversation with a native large title, search and swipe back. Markdown, rich cards, approvals, questions, steps, the bot's live computer, crew huddle, voice and group chats. Replies that arrive while you're elsewhere drop in as an island notification, and a live crew dock shows who's working.
  • Bot profile: mood, what the bot remembers, its knowledge files and what it asks before doing.
  • Docs, sheets and PDFs: a block editor for notes and tables. Edits are kept on the phone (AsyncStorage) and survive a restart; Share sends a real file.
  • Now: a greeting, the crew strip, open items (a post to approve, a sign-in code, a stopped routine) and today's activity.
  • Settings: the web app's list, appearance (every Biscuit style, light or dark, following the phone until you choose), haptics, This phone and the version.
  • Your computer (Preferences): a live phone ↔ bot ↔ computer link (src/ui/ComputerLink.tsx). Offline the bot sleeps beside unplugged cables; on connect they plug in and it wakes. Demo state for now.
  • The phone itself: calendar, contacts, location, photos, camera, files and notifications (src/lib/device.ts), each asked for the first time a bot needs it.
  • Foldables and big screens: folded it's the phone layout; unfolded (Z Fold inner screen, tablets) content keeps to a readable centred column (src/lib/layout.ts).

Widgets and Live Activities

From widgets/, driven by src/lib/surfaces.*.ts:

Surface Where Shows
Crew widget iOS and Android home screen Biscuit's face and how many things need you; larger sizes list the crew and what each is doing
Live Activity iOS Lock Screen and Dynamic Island The working bot, its step and progress; the reply when done, or that it's stuck
Ongoing notification Android The same run with a progress bar

They need a development build (EAS); Expo Go runs the app without them.

Run it

cd apps/mobile
npm install
npx expo start          # scan the QR code with Expo Go
npx expo start --web    # quick browser preview

Development builds and store builds use EAS (npx eas-cli@latest build --profile development); profiles are development, development-simulator, preview and production in eas.json. The version follows the product: npm run release at the repo root bumps package.json and app.json here along with web and desktop.

Next

Connecting to the Go API (sign-in, live sync, the server-side agent loop and approvals) is the next step. Routines, files and connected apps stay in Biscuit on desktop for now.