nuxthub
Use when building NuxtHub v0.10.6 applications - provides database (Drizzle ORM with sqlite/postgresql/mysql), KV storage, blob storage, and cache APIs. Covers configuration, schema definition, migrations, multi-cloud deployment (Cloudflare, Vercel), and the new hub:db, hub:kv, hub:blob virtual modu
By onmax · 1,882 installs
npx skills add onmax/nuxt-skills --skill nuxthub
Source repository · Upstream listing
NuxtHub v0.10.6
Full stack Nuxt framework with database, KV, blob, and cache. Multi cloud support (Cloudflare, Vercel, Deno, Netlify).
For Nuxt server patterns: use nuxt skill (server.md)
For content with database: use nuxt content skill
Loading Files
Consider loading these reference files based on your task:
[ ] [references/wrangler templates.md](references/wrangler templates.md) if manually configuring wrangler.jsonc for Cloudflare deployment
[ ] [references/providers.md](references/providers.md) if deploying to Vercel, Netlify, Deno, AWS, or configuring external database/storage providers
DO NOT load all files at once. Load only what's relevant to your current task.
Installation
Configuration
Advanced Config
remote mode: When enabled, connects to production D1/KV/R2 during local development instead of local emulation. Useful for testing with production data.
Database replica (v0.10.6+): Configure read replicas to distribute database load. Queries use replicas automatically while writes go to primary.
Database
Type safe SQL via Drizzle ORM. db and schema are auto imported on server side.
Schema Definition
Place in server/db/schema.ts or server/db/schema/ .ts :
PostgreSQL variant:
Database API
Migrations
Migrations auto apply during npx nuxi dev and npx nuxi build . Tracked in hub migrations table.
Database Providers
Dialect Local Production
sqlite .data/db/sqlite.db D1 (Cloudflare), Turso ( TURSO DATABASE URL , TURSO AUTH TOKEN )
postgresql PGlite postgres js ( DATABASE URL ), neon http (v0.10.2+, DATABASE URL )
mysql mysql2 ( DATABASE URL , MYSQL URL )
KV Storage
Key value storage. kv is auto imported on server side.
Constraints: max value 25 MiB, max key 512 bytes.
KV Providers
Provider Package Env Vars
Upstash @upstash/redis UPSTASH REDIS REST URL , UPSTASH REDIS REST TOKEN
Redis ioredis REDIS URL
Cloudflare KV KV binding in wrangler.jsonc
Deno KV Auto on Deno Deploy
Vercel KV REST API URL , KV REST API TOKEN
Blob Storage
File storage. blob is auto imported on server side.
Blob API
Upload Helpers
Vue Composables
Blob Providers
Provider Package Config
Cloudflare R2 BLOB binding in wrangler.jsonc
Vercel Blob @vercel/blob BLOB READ WRITE TOKEN
S3 aws4fetch S3 ACCESS KEY ID , S3 SECRET ACCESS KEY , S3 BUCKET , S3 REGION
Cache
Response and function caching.
Route Handler Caching
Function Caching
Cache Invalidation
Cache key pattern: ${group}:${name}:${getKey(...args)}.json (defaults: group='nitro', name='handlers' 'functions' 'routes')
Deployment
Cloudflare
NuxtHub auto generates wrangler.json from your hub config no manual wrangler.jsonc required:
Observability (recommended): Enable logging for production deployments:
Create resources via Cloudflare dashboard or CLI:
Deploy: Create [Cloudflare Workers project](https://dash.cloudflare.com/?to=/:account/workers and pages/create), link Git repo. Bindings auto configured at build time.
Environments: Use CLOUDFLARE ENV=preview for preview deployments.
See [references/wrangler templates.md](references/wrangler templates.md) for manual wrangler.jsonc patterns and [references/providers.md](references/providers.md) for all provider configurations.
Other Providers
See [references/providers.md](references/providers.md) for detailed deployment patterns for:
Vercel: Postgres, Turso, Vercel Blob, Vercel KV
Netlify: External databases, S3, Upstash Redis
Deno Deploy: Deno KV
AWS/Self hosted: S3, RDS, custom configs
D1 over HTTP
Query D1 from non Cloudflare hosts:
Requires: NUXT HUB CLOUDFLARE ACCOUNT ID , NUXT HUB CLOUDFLARE API TOKEN , NUXT HUB CLOUDFLARE DATABASE ID
Build time Hooks
Type Sharing
WebSocket / Realtime
Enable experimental WebSocket:
Deprecated (v0.10)
Removed Cloudflare specific features:
hubAI() Use AI SDK with Workers AI Provider
hubBrowser() Puppeteer
hubVectorize() Vectorize
NuxtHub Admin Sunset Dec 31, 2025
npx nuxthub deploy Use wrangler deploy
Quick Reference
Feature Import Access
Database import { db, schema } from 'hub:db' db.select() , db.insert() , etc.
KV import { kv } from 'hub:kv' kv.get() , kv.set() , etc.
Blob import { blob } from 'hub:blob' blob.put() , blob.get() , etc.
All are auto imported on server side.
Resources
[Installation](https://hub.nuxt.com/docs/getting started/installation)
[Migration from v0.9](https://hub.nuxt.com/docs/getting started/migration)
[Database](https://hub.nuxt.com/docs/database)
[Blob](https://hub.nuxt.com/docs/blob)
[KV](https://hub.nuxt.com/docs/kv)
[Cache](https://hub.nuxt.com/docs/cache)
[Deploy](https://hub.nuxt.com/docs/getting started/deploy)