RefactKit reads its configuration from aDocumentation Index
Fetch the complete documentation index at: https://docs.refactkit.com/llms.txt
Use this file to discover all available pages before exploring further.
.env file in the project root. Start by copying the example file:
Auth
These variables configure Better Auth, which handles sessions, email/password flows, OAuth, and organization management.A random secret used to sign and verify session tokens. Generate a secure value with
openssl rand -base64 32. This must be at least 32 characters.The canonical base URL of your application. Better Auth uses this to construct callback URLs for email verification and password resets.
- Development:
http://localhost:3000 - Production:
https://your-domain.com
An API key for authenticating server-to-server calls to the Better Auth admin API (for example, managing users programmatically). You can generate this from the Better Auth dashboard or leave it unset if you do not need programmatic admin access.
The public URL of your app, exposed to the browser. The auth client uses this to construct API request URLs. Set the same value as
BETTER_AUTH_URL during development.Variables prefixed with
VITE_ are bundled into the client-side JavaScript. Never put secrets in VITE_ variables.Database
RefactKit uses Drizzle ORM with a PostgreSQL database. The recommended database provider is Supabase.A PostgreSQL connection string. Supabase provides two connection strings per project — use the Transaction pooler URL (port Find this in your Supabase dashboard under Project Settings → Database → Connection string → Transaction pooler.
6543) for serverless and edge deployments.Storage
RefactKit uploads avatars, organization logos, and gallery images to Supabase Storage. All uploads go through a server function — the service role key is never exposed to the browser.The URL of your Supabase project. You will find this in the Supabase dashboard under Project Settings → API → Project URL.
The service role secret for your Supabase project. This key bypasses Row Level Security and is used exclusively by server-side upload functions. Never expose it to the client.Find it in the Supabase dashboard under Project Settings → API → Service role secret.
Your Resend API key, used to authenticate email sending requests. Create an API key in the Resend dashboard with Full access or Sending access.
The sender address and display name shown in outgoing emails. The domain in this address must be verified in your Resend account.To verify your domain in Resend: go to Domains → Add Domain, add the provided DNS records to your domain registrar, and wait for DNS propagation.
Complete example
Here is a complete.env file with all variables filled in for a local development setup:
Never commit your
.env file to version control. The .gitignore in RefactKit already excludes it. If you deploy to Vercel, set each variable in Project Settings → Environment Variables instead of using a .env file.
