bknd-database-provision_skill

This skill helps you provision and configure a production database for your Bknd app across SQLite, LibSQL, Cloudflare D1, PostgreSQL, Neon, Supabase, and Xata.

2

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill cameronapak/bknd-skills --skill bknd-database-provision

  • SKILL.md10.6 KB

Overview

This skill guides setting up a production database for Bknd applications across SQLite file, LibSQL/Turso, Cloudflare D1, PostgreSQL, Neon, Supabase, and Xata. It focuses on concrete steps to create the database, configure Bknd connections, set environment variables, and verify connectivity for production-ready deployments. Use it to choose the right provider and avoid common pitfalls during provisioning.

How this skill works

I provide provider-specific commands, adapter examples, and recommended environment variable patterns so you can wire your Bknd app to a production backend. The skill includes steps for CLI-driven creation (Turso, D1, Neon), adapter installation for Postgres and dialects (Neon, Xata), and filesystem or Docker guidance for SQLite. It also shows schema sync, connection testing, and fixes for frequent errors.

When to use it

  • Provisioning a new production database for a Bknd app
  • Migrating from a development SQLite to a cloud database
  • Configuring Bknd connection strings and adapters before deployment
  • Choosing between serverless/edge vs self-hosted Postgres options
  • Running schema sync, testing connectivity, or troubleshooting connection errors

Best practices

  • Store credentials and tokens in environment variables, never in source code
  • Pick cloud options (Turso, D1, Neon, Supabase, Xata) for serverless/edge use cases
  • Use SSL-enabled connection strings for Postgres (add ?sslmode=require)
  • Run npx bknd sync --dry-run before applying schema changes in production
  • Enable backups and avoid --force --drop without verified backups

Example use cases

  • Deploy Bknd on a VPS with SQLite file stored on a mounted volume via Docker
  • Create a Turso libsql database and configure DB_URL + DB_TOKEN for global edge queries
  • Set up Cloudflare D1 for a Workers-based Bknd adapter with correct wrangler bindings
  • Switch from local Postgres to Neon for serverless auto-scaling and update NEON_DATABASE_URL
  • Connect Bknd to Supabase using the direct connection string for production workloads

FAQ

Run a small test script that builds the app, lists entities, and exits (example uses npx tsx test-connection.ts). Confirm build succeeds and entities are printed.

Which database should I use for edge/serverless deployments?

Prefer LibSQL/Turso or Neon/Xata depending on SQL features. Turso and D1 are optimized for edge; Neon and Xata suit serverless Postgres with additional features.

What if schema sync fails on production?

First run npx bknd sync --dry-run to preview changes. If stuck, use --force only after backups and understanding data-loss risks.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational