Getting started
Local setup
Install dependencies, push Instant schema/permissions, and use project scripts.
Local setup
Install
npm ciInstantDB
- App id lives in
src/config.js(APP_ID). Mirror it in.envasINSTANT_APP_ID. - Admin token in
.envfrom the Instant dashboard. - Optionally lock schema and permissions:
npm run push:schema
npm run push:permsinstant.schema.ts re-exports src/schema.js — src/schema.js is the source of truth.
Scripts
| Command | What it does |
|---|---|
npm run dev | Vite dev server (port 3000) |
npm run build | Production → dist/ |
npm run lint | ESLint |
npm run typecheck | Check core JavaScript modules |
npm run test | Vitest regression tests |
npm run check | Lint, typecheck, test, build |
npm run preview | Preview production build |
npm run push:schema | Push Instant schema |
npm run push:perms | Push Instant permissions |
npm run sync:auth-origins | Register Instant auth origins (Vercel previews) |
Docs site
This documentation app is separate:
cd docs
npm ci
npm run dev