RefactKit is built on Nitro v3, which compiles your application to a self-contained output that runs on any hosting target. The default build command outputs a Vercel-compatible bundle and requires no customDocumentation Index
Fetch the complete documentation index at: https://docs.refactkit.com/llms.txt
Use this file to discover all available pages before exploring further.
vercel.json beyond the minimal version declaration already committed to the repository. This page walks you through a Vercel deployment, covers alternative targets, and provides a production checklist to follow before you go live.
Vercel deployment (recommended)
Vercel is the primary deployment target. The build command is already configured inpackage.json with the correct Nitro preset:
package.json
.output/ in Vercel’s expected format, including edge-compatible function routing.
Deploy to Vercel
Push your repository to GitHub, GitLab, or Bitbucket
Create a new repository and push your RefactKit project. Vercel will connect
to it for continuous deployment.
Import the project in Vercel
Go to vercel.com/new, import your repository, and
let Vercel detect the framework settings. It will pick up the
build script
from package.json automatically.Set environment variables
In the Vercel dashboard, go to Settings → Environment Variables and add
the following. These are the minimum required variables for the application
to boot:
| Variable | Description |
|---|---|
DATABASE_URL | Your Supabase PostgreSQL connection string (Transaction pooler, port 6543) |
BETTER_AUTH_SECRET | A 32-character random secret — see the warning below |
BETTER_AUTH_URL | Your production domain, e.g. https://yourapp.com |
VITE_SUPABASE_URL | Your Supabase project URL |
SUPABASE_SERVICE_ROLE_KEY | Your Supabase service role key |
RESEND_API_KEY | Your Resend API key for transactional emails |
EMAIL_FROM | From address, e.g. My App <noreply@yourdomain.com> |
VITE_APP_URL | Your production domain |
Run database migrations
Before (or immediately after) your first deployment, synchronize your Drizzle
schema with the production database. Run this against your production
You can also run this locally with the production URL set in a
DATABASE_URL:.env.production
file, or from a CI step before deployment.Other deployment targets
Because RefactKit uses Nitro v3, you can target any platform Nitro supports by changing theNITRO_PRESET environment variable at build time. No application code changes are required.
- Cloudflare Workers
- Node.js server
- AWS Lambda
- Netlify
.output/ directory using the Wrangler CLI:Cloudflare Workers runs on the V8 isolate runtime. Verify that your
database driver supports edge environments — Supabase’s
postgres.js
driver requires the Node.js compatibility flag on Cloudflare.Production checklist
Run through this checklist before sending traffic to a new deployment:All environment variables are set
Verify every variable from the reference — particularly
BETTER_AUTH_SECRET,
BETTER_AUTH_URL, DATABASE_URL, and VITE_SUPABASE_URL — is set in your
hosting provider’s environment configuration. Missing variables cause silent
runtime failures.Database schema is up to date
Run
npx drizzle-kit push against the production database to apply any
schema changes included in this deployment. If you use Better Auth’s
organization plugin, check the Better Auth changelog for any new columns
required by your installed version.BETTER_AUTH_URL matches your domain
The
BETTER_AUTH_URL value must exactly match the domain users will access.
A mismatch causes OAuth callback failures and broken email verification
links. If you use a custom domain, update this variable before pointing
DNS.Supabase storage bucket exists
Confirm that an
avatars bucket exists in your Supabase project with
public read access enabled. If it doesn’t exist, create it in the Supabase
dashboard or run the initialization SQL from the storage documentation.Email sending is verified
Send a test email from the Resend dashboard using the domain configured in
EMAIL_FROM. Transactional emails including invitations and password resets
will fail silently if the sending domain is unverified.
