Expo + SQLite + Drizzle (Local-First Mobile App)
Rules for an offline-first Expo SDK 57 app: expo-sqlite with Drizzle migrations bundled in the app, no backend by default, sync as an optional module, EAS Build and Update.
- Formats
- 4 files
- AGENTS.md
- 43 lines
- CLAUDE.md
- 14 lines
- Languages
- TypeScript
- Updated
- Oct 2026
- Used by
- 4 projects
Writes .claude/skills/expo-sqlite-local-first/SKILL.md
$ curl -s --create-dirs -o .claude/skills/expo-sqlite-local-first/SKILL.md https://stackitfast.com/rules/expo-sqlite-local-first/SKILL.mdRule files
Works with Cursor · Claude Code · Windsurf · AGY
Architecture notes
Architecture Overview
Guidelines for an offline-first mobile app on Expo SDK 57: data lives on the device in SQLite through Drizzle ORM, migrations ship inside the app, and sync is an optional module added only when users ask for it.
Key Advantages
- No backend to run: the whole app is one TypeScript project an agent can read, run and test end to end.
- Typed local data: Drizzle gives the device database the same schema discipline as a server database.
- Sync without a rewrite: client UUIDs and a dedicated sync module let a server arrive later without touching the core workflow.
Frequently asked questions
Why not start with Supabase or Firebase for a mobile tool?
A tool that keeps data on the device has no server to deploy, secure or pay for, and an agent can run and test the entire app locally. A backend becomes worth it when users ask for a second device or for sharing; at that point sync is added as a module rather than rebuilding the app around a server database.
How do Drizzle migrations run inside an Expo app?
drizzle-kit generates the SQL migrations and a migrations.js bundle with the expo driver. The root layout calls useMigrations(db, migrations) and renders nothing until it reports success, so every screen sees the current schema.
Does this AGENTS.md work with Cursor, Claude Code and Windsurf?
Yes. AGENTS.md is the cross-tool standard read by Cursor, Claude Code, Windsurf, Codex and others. A .mdc file is included for Cursor's native rules format.
Used in production
Explore all stacksGotify
6Gotify keeps the server one deployable Go binary by embedding its Vite/React web UI, using Gin and gorilla/websocket for the REST and streaming API, and swapping SQLite, MySQL or PostgreSQL through GORM, while a compiled Go plugin system handles extensibility instead of a scripting layer.
Orca
1Agent CLIs stay the user's own. Orca adds the orchestration layer around them: isolated git worktrees, a PTY daemon that outlives the UI, and a relay for mobile steering. It can support new agents without bundling them.
MindsHub (formerly MindsDB)
1Splitting the client, API and agent into separately versioned git submodules lets each ship on its own cadence (a signed desktop app, a PyPI server package, an agent package), while one Makefile and one docker-compose.yml still bring the whole stack up together.
Nextcloud
Server internals (OC) are kept separate from a versioned public API (OCP) so that independently namespaced apps under apps/ can extend Nextcloud without depending on private implementation details, while database support is validated per-engine in CI.