This guide walks you through getting RefactKit running on your machine for the first time. By the end you will have a fully functional multi-tenant app with authentication, organizations, and role-based access running atDocumentation Index
Fetch the complete documentation index at: https://docs.refactkit.com/llms.txt
Use this file to discover all available pages before exploring further.
http://localhost:3000.
RefactKit requires a PostgreSQL database. The recommended option is Supabase, which provides a free-tier hosted PostgreSQL instance with connection pooling pre-configured. Create a Supabase project before continuing — you will need the database connection string and your project URL in the next steps.
Install dependencies
RefactKit uses pnpm as its package manager. Install it if you don’t have it, then install all project dependencies.
Configure your environment
Copy the example environment file to At minimum, set these four variables to get the app running:You can generate a secure value for
.env and fill in your values.BETTER_AUTH_SECRET with:Push the database schema
RefactKit uses Drizzle ORM. Run You should see output confirming that each table —
drizzle-kit push to create all required tables in your PostgreSQL database. This reads your DATABASE_URL from .env and applies the schema defined in db/schema.ts.user, session, account, verification, organization, member, invitation, and gallery_image — was created successfully.Start the development server
Start the Vite development server. RefactKit runs on port 3000 by default.Open http://localhost:3000 in your browser. You will be redirected to the login page. Create an account using the sign-up form, verify your email, and you will land on the onboarding flow where you can create your first organization.
What you can do next
Once your dev server is running, here are the most common next steps:Add your first route
Learn how to create organization-scoped pages using TanStack Router’s file-based routing.
Extend the database schema
Add new tables to
db/schema.ts and push changes with npx drizzle-kit push.Configure email sending
Set up your Resend API key so invitation and verification emails are delivered.
Enable file uploads
Configure Supabase Storage so users can upload avatars and organization logos.
Available scripts
| Command | Description |
|---|---|
pnpm dev | Start the development server at http://localhost:3000 |
pnpm build | Build for production (Vercel/Nitro preset) |
pnpm start | Run the production build locally |
pnpm test | Run Biome checks and Vitest unit tests |
pnpm test:e2e | Run Playwright end-to-end tests |
pnpm test:coverage | Generate a coverage report in the coverage/ directory |
pnpm format | Format all files with Biome |
npx drizzle-kit push | Sync your schema to the database |
npx drizzle-kit studio | Open the Drizzle Studio database UI |

