RefactKit is built around the idea that every piece of data belongs to an organization. A single user account can be a member of multiple organizations, and switching between them gives you a completely separate workspace — separate members, separate data, separate settings. This is multi-tenancy: one application, many isolated tenants.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 an organization is
An organization (also called a workspace) is the top-level container for your product’s data. When someone signs up for your app and completes onboarding, they create their first organization. From that point on, everything they do — uploading files, inviting teammates, creating records — happens inside that organization’s context. Organizations have three identifying attributes:- Name — a human-readable label shown in the UI (e.g., “Acme Corp”)
- Slug — a URL-safe identifier derived from the name (e.g.,
acme-corp) that appears in every workspace URL - Logo — an optional image shown in the sidebar and org switcher
logo_url and slug.
How data isolation works
Every table that holds tenant-specific data includes anorganizationId foreign key that references the organization table. For example, the built-in gallery_image table looks like this:
organizationId so queries filter to the correct tenant automatically.
The session record also tracks which organization is currently active for a given browser session:
The URL slug pattern
Every workspace route lives under/organizations/$slug/. The $slug segment matches the organization’s unique slug, making URLs human-readable and bookmarkable.
Dashboard
/organizations/acme-corp/dashboardMembers
/organizations/acme-corp/membersGallery
/organizations/acme-corp/gallerySettings
/organizations/acme-corp/settingssrc/routes/_app/organizations/$slug/your-page.tsx and define the route like this:
$slug param is always available from context.params.slug inside the loader, and from Route.useParams() inside the component.
Creating organizations
Each user account can belong to up to 5 organizations and each organization can have up to 100 members. Users can create a new organization from the organizations list page or through the in-app dialog.Open the organizations list
Navigate to
/organizations. You’ll see all organizations you belong to, with your role badge on each card.Create a new organization
Click Create new (or the dashed empty-state card if you have none). Enter a name — the slug is derived automatically.
Switching between organizations
You can belong to multiple organizations at the same time. Switch between them by navigating back to/organizations and clicking a different workspace card, or use the organization switcher in the sidebar.
Switching organizations does not sign you out. Your session persists across workspaces — only the active organization context changes.
activeOrganizationId on their session server-side. Any server functions that read organization-scoped data use this context to return the correct records.
Conceptual overview
member table has a row connecting their userId to that organizationId. The server validates this on every request before any UI renders.
