Repository navigation
feat(mobile): port the Expo app to the Go server - #3
Merged
Merged
Conversation
Standalone pnpm project in apps/mobile-app (own lockfile, no root Node workspace). @better-auth/expo works unchanged against packages/auth. Local API types replace @better-stack-monorepo/common. Adds settings update and delete account to the dashboard, and a contract test that runs the app's clients against a real Go server and Postgres. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Typecheck, expo lint, expo install --check and unit tests, with the pnpm store cached. Still path-filtered to apps/mobile-app/** and skipped on drafts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jayleaton
force-pushed
the
feat/mobile
branch
from
October 22, 2026 07:04
18af663 to
b84f12d
Compare
jayleaton
marked this pull request as ready for review
October 22, 2026 07:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Go template has no mobile client yet. The Expo app in
ai-patterns-monorepodepends on that repo's Node workspace (@better-stack-monorepo/common, a root vitest config), and it has never run against the Go auth and API.How
apps/mobile-appis now a standalone pnpm project with its ownpackage.jsonandpnpm-lock.yaml. Nothing outside this folder needs Node.packages/authkeeps Better Auth's paths, JSON shapes, cookie name and signing format, and trustsexpo-origin: betterstack://. So the stock Expo plugin signs up, signs in, restores the session from the keychain, and signs out without any changes. I did not switch to bearer tokens.authClient,userService,apiFetch) in Node and stubs only the native modules (react-native,expo-secure-storeas an in-memory keychain,expo-linking, …).globalSetupbuildsapps/web/cmd/serverfromGO_SERVER_SRC(default: this repo), starts a tmpfspostgres:18-alpineon a free port, runsserver migrate, thenserver servein development mode (dev mailer, verification off). It tears everything down afterwards.apps/mobile-app/**changes (dorny/paths-filtermobileoutput) and is skipped on drafts like the other jobs. It does not run the contract test, which needs Go + Docker; run it locally withpnpm test:contract.Evidence
Before:
apps/mobile-appdid not exist. The CI mobile job was a placeholder guarded byhashFiles.After: all of these ran locally on
b84f12d(rebased on mainc7cf5c5, real auth wired), from a cleanpnpm install --frozen-lockfile:pnpm exec tsc --noEmitpnpm exec expo lintpnpm exec expo install --checkpnpm test(vitest)pnpm test:contractapps/web/cmd/server(no overrides)expo export --platform ios --platform androidmake lint/make test/make actionlintgo test -race ./...ok incl.packages/auth, actionlint ok (go list ./...doesn't seenode_modules:.pnpmis a dot-dir)Contract scenarios: sign-up → get-session → sign-out (keychain cleared) → wrong password (
401 INVALID_EMAIL_OR_PASSWORD) → sign-in →GET /users→PATCH /users(set + clear image) → validation400andPATCH /users/{other}403as envelope errors → cold relaunch restores the session from the keychain (atom pre-filled from cache, then confirmed by get-session) → sign-out →GET /users={data:null,error:"Unauthorized"}. Delete account:DELETE /users→ local session cleared → sign-in rejected.The Go server's own request log from that run:
Limitation: I didn't run the app on a simulator or device (no simulator on this box), so the screens are verified by typecheck, lint and bundling only.
Merge Danger
Door: two-way. This adds a new folder and changes the mobile CI job. It has no data, schema or deploy effects.
Blast Radius: mobile. It touches only
apps/mobile-app/**and themobilejob inci.yml. Editingci.ymlalso trips thegopath filter, so this PR runs the Go job once.🤖 Generated with Claude Code