Registry
Mmakerkit avatar

makerkit/next-supabase-expo

Add the Expo mobile app, the @kit/mobile-ui package and the /api/v1 mobile API to a MakerKit Next.js Supabase kit

makerkit9 executions

  • makerkit
  • expo
  • react-native
  • mobile
  • native
  • plugin
Connect a repo
npx codemod @makerkit/next-supabase-expo

@makerkit/next-supabase-expo

Adds the Expo mobile app to a MakerKit Next.js + Supabase kit.

bash
npx codemod @makerkit/next-supabase-expo

Run it from the root of your kit, on a clean working tree.

What it adds

PathWhat it is
apps/nativeThe Expo app (Expo SDK 57, expo-router)
packages/mobile-uiReact Native UI components (@kit/mobile-ui)
apps/web/app/api/v1The REST API the mobile app calls, authenticated with a Supabase bearer token
packages/features/accounts/src/schema/update-personal-account.schema.tsShared by PATCH /api/v1/accounts/personal and the native update hook
tooling/scripts/src/i18n-native.mjsGenerates the app's message catalogue from the web app's
docs/nativeNative configuration notes

What it wires up

FileChange
pnpm-workspace.yamlcatalogs.expo (React Native and Expo SDK versions), overrides, plus aes-js, use-intl, @formatjs/intl-pluralrules and @types/aes-js in the root catalog
package.jsonThe ten *:native scripts — start, start:clear, ios, android, prebuild, i18n, i18n:check, doctor, deps:check, clean:cache
apps/web/package.jsonAdds @kit/otp, used by /api/v1/otp/send
apps/web/supabase/config.tomlAllows the mkkit:// OAuth callback
.oxlintrc.jsonBans web's password schemas inside apps/native, ignores .expo, the generated catalogue and the generated mobile UI components — and adds the /shared boundary if the kit predates 4.0.2
.oxfmtrc.jsoncStops the formatter fighting the generated catalogue
tooling/scripts/package.jsoni18n:native and i18n:native:check
packages/features/team-accounts/package.jsonExports the per-seat billing service, which /api/v1 needs
packages/features/team-accounts/src/server/api.tsgetInvitationById and getPendingInvitationsForEmail
packages/features/team-accounts/src/shared/types.tsThe PendingInvitation shape
packages/features/accounts/src/shared/index.tsRe-exports the personal account schema

The repo-wide build, typecheck and test turbo tasks are deliberately left
alone — the Expo kit runs the native workspaces as ordinary workspace members.

The message catalogue

apps/native ships lib/i18n/messages.generated.ts, built from the Expo kit's
own web strings. The workflow re-runs pnpm i18n:native after installing, so
the app ends up on your catalogue rather than the kit author's. Edit
apps/native/lib/i18n/{additions,overrides} and re-run it; never edit the
generated file.

The /shared boundary

Anything under a /shared path is compiled by Metro as well as by Next, so a
stray next/navigation or window reference there only fails at runtime on
device. Kits from 4.0.2 carry the lint rule upstream; on older kits this codemod
adds it.

Requirements

  • MakerKit 4.x. The codemod targets the Expo kit's main, which tracks the v4
    line; feat/mobile-app is the 3.x line and will not apply cleanly.
  • Your GitHub account needs access to makerkit/expo-supabase-turbo-saas-kit,
    which the files are cloned from over SSH. Check your key is loaded with
    ssh -T git@github.com. HTTPS is tried as a fallback, for machines set up
    with a credential helper or a token instead of a key.

To install from a different branch, tag or commit of the Expo kit:

bash
EXPO_KIT_REF=v1.2.3 npx codemod @makerkit/next-supabase-expo

Re-running

Every step is idempotent. The file fetch is skipped entirely if apps/native
already exists, so re-running only re-applies the config wiring and will not
overwrite your changes to the app.

Tests

bash
pnpm test

Fixtures live in tests/<script-name>/. The basic inputs are the real files
from an unmodified kit, and the expected outputs are byte-compared against the
same files in the Expo kit.

Ready to evolve your codebase?

Build tailored, compiler-aware skills to assess, plan, and automate complex codebase changes.