Installation

Install the client and exactly one adapter for your target runtime. That’s it. You’ll wire the client in the next steps.


1) Install packages

1# Always install the client
2npm i @vibecode-db/client
3
4# Pick ONE adapter per runtime
5# Web (browser, SQLite via WASM)
6npm i @vibecode-db/sqlite-web
7
8# Expo / React Native (on‑device SQLite)
9npm i @vibecode-db/sqlite-expo
10
11# (Optional) Supabase (remote Postgres via HTTP)
12# You’ll also need the official client if integrating with Supabase
13npm i @supabase/supabase-js

Use your preferred package manager (pnpm, yarn) with the same commands.


2) Environment notes

Web (sqlite-web)

  • Ensure the WASM asset is served (e.g., /sql-wasm.wasm).
  • Persistence options include OPFS/IndexedDB (see Adapters → SQLite Web).

Expo / React Native (sqlite-expo)

  • On‑device storage; choose a dbName (e.g., vibecode.db).
  • Follow Expo’s peer dependency prompts (e.g., expo-sqlite).

Supabase

  • Use the same vibecode‑db API surface; configure credentials via env vars.

3) What you don’t need

  • No extra type packages — TypeScript support is built in.
  • No Zod boilerplate — define schemas with vibecode‑db schema DSL and get Zod/runtime validation + TS types automatically.

You’re installed

You now have the client and the right adapter for your environment. Next, define your schema and create a client for your runtime. Continue with Configuration or jump to Adapters if you already know your target.