Expo
Scaffold an Expo app from the official create-expo-app shell and layer in the kitcn Convex baseline.
Expo Setup
Use Expo when you want a native-first starter but still want the same kitcn backend baseline and starter messages flow.
npx kitcn@latest init -t expo --yesThis path uses the official create-expo-app shell, then overlays the minimum
kitcn Convex wiring:
.env.localexpo-env.d.tssrc/components/providers.tsxsrc/lib/convex/*src/app/_layout.tsxsrc/app/index.tsxconvex/functions/schema.tsconvex/functions/messages.tsconvex/lib/crpc.tsconvex/lib/get-env.tsconvex/shared/api.ts
V1 is intentionally narrow:
- fresh scaffold only
- no existing Expo app adoption
- no styling-framework opinion beyond the official Expo baseline
Add Auth
Expo now supports the default auth scaffold:
npx kitcn add auth --yes
npx kitcn add auth --schema --yesOn Expo, add auth owns:
src/lib/convex/auth-client.tssrc/lib/convex/convex-provider.tsxsrc/app/auth.tsxconvex/functions/auth.config.tsconvex/functions/auth.ts- auth-owned schema blocks in
convex/functions/schema.ts
Expo auth parity follows the default auth scaffold, not the raw Convex preset.
That means Expo keeps managed schema refresh with add auth --schema --yes.
The generated Expo auth client uses:
@better-auth/expo/clientexpo-secure-storeEXPO_PUBLIC_CONVEX_SITE_URL
The generated auth route stays on /auth.
Run It
Start the backend in one terminal:
npx kitcn devThen start Expo in another:
bun run startThe starter app opens to a single messages screen backed by Convex. Add a message and watch the list update.
Env Contract
The Expo starter uses Expo's client env model:
EXPO_PUBLIC_CONVEX_URL=http://127.0.0.1:3210
EXPO_PUBLIC_CONVEX_SITE_URL=http://127.0.0.1:3211
EXPO_PUBLIC_SITE_URL=http://localhost:3000Use process.env.EXPO_PUBLIC_* directly in the client. Do not destructure
those values or access them with bracket notation.