Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Scripts

The @frame/models package centralizes PostgreSQL interaction through Drizzle ORM. The package.json scripts cover schemas, migrations, seeds, and utilities.

Always run with the workspace filter:

Terminal window
pnpm -F @frame/models <script>
  • pnpm db:push: Syncs the Drizzle schema with the local database. Useful for fast iteration.
  • pnpm db:generate: Generates SQL migrations from the schemas in src/.
  • pnpm db:migrate: Applies pending migrations.
  • pnpm db:seed: Runs the seed pipeline by environment profile (see below).
  • pnpm db:studio: Opens Drizzle Studio in the browser.

packages/models/scripts/seed/ organizes persistence modules by execution profile. Every module is registered in the index.ts belonging to its directory.

DirectoryExecution profile
shared/Every environment
development/Local and test environments
production/Staging and production environments

Folder placement is the source of truth for execution. Individual modules do not declare their own profiles.

Seed modules perform authentication-independent persistence operations and converge through database uniqueness constraints.

The production migrator applies pending migrations, then shared and production modules. FRAME registers the canonical cat breed catalog under shared/, so every db:seed execution upserts its stable entries without creating identities, organizations, memberships, or other demo records.

Terminal window
pnpm -F @frame/models db:seed
# Destructive database reset remains development-only.
pnpm -F @frame/models db:seed -- --reset
  1. Apply migrations with pnpm -F @frame/models db:migrate. 2. Run db:seed with the intended environment profile. 3. Create the FRAME Administrator with pnpm bootstrap. Interactive terminals prompt for email and a hidden password. Automated environments use pnpm bootstrap -- --email <address> and provide the password through secure stdin, FRAME_BOOTSTRAP_PASSWORD, or --generate-password. 4. Use the administrative Provisioning screen for demo environments and initial datasets.
  1. Create a cohesive SeedModule under shared/, development/, or production/.
  2. Register it in that directory’s index.ts.
  3. Declare dependsOn when another module must run first.
  4. Keep shared and production writes convergent; keep authentication-dependent data in server provisioning templates.
  • pnpm db:viz: Interactive schema visualizer (Drizzle Lab).
  • pnpm db:viz-gen: Static structural report of relations.
  • pnpm test: Vitest (Zod schemas, utilities, seed logic).
  • pnpm lint: oxlint.
  • pnpm type-check: TypeScript (tsc) without emit.