Skip to content

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Turso + Drizzle on Expo

A small Expo app that stores todos in local SQLite and talks to the database with Drizzle ORM, backed by @tursodatabase/sync-react-native.

Works fully offline. Add Turso credentials and you can push / pull to sync with a remote database.

Stack

  • Expo (React Native) — UI and dev build
  • Turso sync (React Native) — embedded SQLite + optional cloud sync
  • Drizzle ORM — schema, typed queries, migrations (see Notes)
  • Drizzle Kit — SQL migrations bundled for Metro (driver: 'expo')

What it does

  • CRUD todos (add, toggle done, delete)
  • Runs migrations on startup
  • Sync button when EXPO_PUBLIC_TURSO_* env vars are set

Quick start

bun install
bun run ios    # or: bun run android

Optional — sync with Turso Cloud:

# .env
EXPO_PUBLIC_TURSO_DATABASE_URL=libsql://your-db.turso.io
EXPO_PUBLIC_TURSO_AUTH_TOKEN=your-token

Restart Metro after changing .env (bun start clears cache by default).

Migrations

Schema lives in db/schema.ts. After edits:

bun run db:generate

Notes

  • Uses a development build (native Turso module), not Expo Go.
  • This project depends on a fork of Drizzle ORM that adds a Drizzle client compatible with @tursodatabase/sync-react-native (driver: drizzle-orm/tursodatabase/sync-react-native, plus an Expo-friendly migrator). Upstream Drizzle does not ship this yet. Fork: younes200/drizzle-orm (beta branch).
  • drizzle-orm and drizzle-kit are installed from pre-built Git branches on that fork (pkg-drizzle-orm, pkg-drizzle-kit), updated automatically when beta changes.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages