RefactKit is a full-stack SaaS starter built for developers who need multi-tenancy, authentication, and role-based access control working before they write their first line of product code. Every layer — from the database schema to the auth client — is pre-configured and type-safe, so you spend your time building features instead of plumbing infrastructure.Documentation Index
Fetch the complete documentation index at: https://docs.refactkit.com/llms.txt
Use this file to discover all available pages before exploring further.
What you get out of the box
Multi-tenant workspaces
Every resource belongs to an organization. Users can create up to five organizations and switch between them. Data isolation is enforced at the database level via
organizationId foreign keys on every tenant-scoped table.Authentication & sessions
Email/password sign-up with mandatory email verification, Google OAuth, password reset, and 7-day rolling sessions — all handled by Better Auth with secure HTTP-only cookies.
Role-based access control
Three built-in roles — Member, Admin, and Owner — with a granular permission matrix. Permissions are enforced on the server before any rendering occurs.
Type-safe database layer
Drizzle ORM with a fully typed PostgreSQL schema. Push schema changes with a single command and explore data visually with Drizzle Studio.
Transactional email
Invitation, verification, and password-reset emails are pre-wired through Resend via SMTP. Drop in your API key and they work immediately.
File storage
Server-side image uploads to Supabase Storage for avatars, organization logos, and gallery images. The service role key never touches the client.
Internationalization
Built-in i18n with English, French, Spanish, Portuguese, and Arabic (RTL) support. Typography automatically switches direction-aware fonts.
Server-side rendering
TanStack Start with Nitro v3 for SSR, universal deployment, and type-safe server functions that bridge your frontend and backend with zero boilerplate.
Tech stack
| Layer | Technology | Version |
|---|---|---|
| Meta-framework | TanStack Start | latest |
| Server engine | Nitro | v3 (beta) |
| UI framework | React | 19 |
| Authentication | Better Auth | 1.6+ |
| ORM | Drizzle ORM | 0.45+ |
| Database | PostgreSQL via Supabase | — |
| UI components | Base UI / shadcn | — |
| Styling | Tailwind CSS | v4 |
| State management | TanStack Query | 5 |
| Forms | TanStack Form | 1 |
| Resend (SMTP) | — | |
| Testing | Vitest + Playwright | — |
| Linting | Biome | — |
Who RefactKit is for
RefactKit is designed for developers building B2B or B2C SaaS products that need multiple users organized into separate workspaces. If you’re building an internal tool, a team productivity app, or any product where a company has its own isolated workspace, RefactKit removes the months of foundational work that every such product requires.RefactKit requires a PostgreSQL database. The quickstart uses Supabase, which provides a free-tier hosted PostgreSQL instance with connection pooling already configured.
Next steps
Quickstart
Clone, configure, and run your first RefactKit dev server in minutes.
Environment setup
Understand every environment variable and where to find each value.
Multi-tenancy
Learn how organizations and data isolation work across your app.
Authentication
Explore the full auth flow: sign-up, login, OAuth, and sessions.

