Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Turso 5 min read How-to mediumAdept

Vercel setup guide

Deploying a Nuxt app backed by a Turso database to Vercel comes down to two environment variables, NUXT_TURSO_DB_URL and NUXT_TURSO_DB_AUTH_TOKEN, which the libSQL TypeScript client uses to connect. The guide creates and seeds a SQLite-compatible Turso database via the CLI shell, gets the database URL with `turso db show --url`, and generates a non-expiring token with `turso db tokens create`. Deployment can go through the Vercel deploy button or through manually forking the repo and importing it on the Vercel dashboard, and Vercel then redeploys automatically on pushes to the production branch.

Assumes: Vercel deploymentsenvironment variablesbasic SQL

Related posts

  • Bringing SQLite to Vercel Functions with Turso

    Turso mediumAdept

    Turso's partial sync replicates a subset of SQLite database pages into Vercel Functions so reads run in-process with no network round-trip, while writes go to the remote Turso database for durability and consistency. On cold start the driver fetches the first 128 KiB of the SQLite file, then pulls further 128 KiB segments on demand into the ephemeral /tmp directory, so cold-start cost scales with the working set rather than total database size. The experimental @tursodatabase/vercel-experimental package also auto-provisions databases by name for database-per-tenant or per-agent-session patterns. It offers an optional local-write batching mode that trades consistency for lower write latency, and uses a waitUntil() safety net that pushes pending changes if close() is forgotten.

  • Build Internal Tools Using Neon, StackAuth, and Vercel

    Neon mediumAdept

    An open-source Next.js template for internal tools combines Neon serverless Postgres, Stack Auth and Vercel free tiers to provide a database, API routes, authentication, role-based access control and an admin panel. Setup takes a few steps: clone the repo, fill in the env vars, push the schema with drizzle-kit, create nested admin/user roles in Neon's Auth tab, claim admin at /setup and deploy to Vercel. Access is controlled by verified-email domain whitelisting, per-email grants for contractors and explicit blocklists, all managed from /tools/admin. New tools are added under app/tools and registered in config/app.ts.

  • Toasty now fully supports Turso

    Turso mediumAdept

    Toasty, the async Rust ORM from Tokio's creator, now supports Turso in three modes behind one API: local files with optional concurrent writes (transactions automatically wrapped in BEGIN CONCURRENT), a serverless remote mode over HTTP with URL and auth token, and local-first sync with explicit pull/push calls. Only the driver constructor changes between modes, so the same models and queries run unchanged. For remote use, toasty::batch() combines independent statements into one round trip and returns typed tuple results, avoiding a network round trip per transaction statement.

  • Build your own Web Analytics Dashboard with Turso and Bolt

    Turso mediumAdept

    Bolt can generate a Next.js 14 web analytics dashboard backed by a Turso database when you feed it the database schema and a detailed requirements prompt. The walkthrough covers dumping the schema with the Turso CLI, then writing a prompt that specifies libsql-stateless-easy, shadcn/ui, server-side rendering and date-range filtering, and finally wiring up the database URL and auth token in .env. Follow-up prompts refine the output, for example adding country flags and device styling. When Bolt can't fix an error itself, the suggested remedy is to give it more context, such as the framework's latest documentation.

  • How We Built the Turso Shell in the Browser

    Turso mediumAdept

    Turso's SQLite-compatible database can run entirely in the browser via WebAssembly, persisting data to OPFS with no backend. The walkthrough builds a SQL shell with Vite, React and TypeScript. It covers importing from the @tursodatabase/database-wasm/vite export to work around a Vite dev-server WASM issue, and setting COOP/COEP headers so SharedArrayBuffer is available. It then builds a query executor that maps prepared-statement results into a table, and upgrades the textarea to a CodeMirror editor with SQL highlighting, autocomplete and a Mod-Enter keybinding.

The quest for software engineering knowledge.

Look:
Layout: