App Presets
modelrails_base is always multi-tenant at the data layer — every row is workspace-scoped through Current.workspace and the Tenanted concern. What varies across products is the presentation of that tenancy: whether users see one workspace or many, whether signup is open or invite-only, and how membership is acquired.
A preset is a named combination of four configuration knobs that collapses the multi-tenant architecture into a specific product shape. Four are recognized, and all four ship:
| Preset | bin/fork --preset |
Use this for… | Signup | A new user lands in… | More workspaces? |
|---|---|---|---|---|---|
| Solo-default | personal (the default) |
Prosumer / multi-workspace tools (Notion-style); private betas | Open or invite-only | A personal workspace (auto-created) | Yes |
| Single-tenant | shared |
Internal company tools; one-org deployments | Invite-only or SSO | The one shared workspace | No |
| Open SaaS | personal, plus join links |
B2B SaaS with per-customer orgs; community products | Open or link-gated | An org they create or join | Yes |
| Workspace-optional | none |
Event / community / personal-dashboard products; user-first auth | Open or invite-only | A workspace-agnostic home (no workspace) | Created/joined explicitly |
Each preset’s page lists the knob values it sets, under “What you get when configured.” Open SaaS is not a value of its own: it is Solo-default’s tenancy with shareable join links turned on, so a fork records personal and then follows the Open SaaS page.
Quick decision
If you’re building…
- a tool one user mostly uses solo, occasionally with a small team → Solo-default. You already have it.
- an internal tool for one company / school / team where everyone shares one workspace → Single-tenant.
- a SaaS where each customer is their own org and signup is public → Open SaaS.
- an event platform, community, or personal dashboard where workspaces are optional or created explicitly → Workspace-optional.
When in doubt, start with Solo-default — switching to any of the others is mostly removing surface (hiding the switcher, locking signup) rather than adding it.
Switching presets later
A fork records its preset in .fork.yml with bin/fork --preset, and production reads it from there (Forking).
Switching presets on a live app is a migration, not a config edit. Recording a new preset later (bin/fork --preset shared on an already-forked repo, which sets WORKSPACE_ON_SIGNUP) doesn’t migrate existing data — for example, :personal→:shared leaves every user’s personal workspace intact and adds them to the shared one. Pick a preset at setup time; mid-life changes require a deliberate migration plan. (Open SaaS has its own mid-life nuance — tightening the join-strategy allowlist — documented on its page.)
Switching to :none is a special case: it’s effectively a from-scratch product shape. Existing users keep their workspaces; the knob change only affects new signups. Landing new users on a workspace-agnostic home requires overriding authenticated_home_path (see Workspace-optional and Forking) and building a home view that works with no workspace in context. Plan this at setup time.
Two mechanics that surprise people
The first-run wizard’s step is derived, never persisted. Under the :none posture the only onboarding state on the record is onboarded_at; User#onboarding_step reads the workspace and project data to decide :workspace, :project, or :team, so the dispatcher, the guard, and the step controllers all get one answer from one place instead of re-deriving it.
Under :shared, signup pre-creates a placeholder membership, and invitation acceptance reconciles it. User#onboard_workspace joins every new user to the shared workspace as a Member (with self_join: :onboarding, so nobody is notified about their own arrival). When that user then accepts an invitation carrying a different role, Workspace#admit finds the existing kept membership and adopts the invitation’s role rather than treating it as a duplicate accept. The :personal posture is untouched by this branch. If the shared workspace is not admittable at signup time, registration still succeeds and the user simply joins nothing; a raise there would roll the account back.
Next steps
Pick the shape you’re building and follow its page end-to-end:
- Solo-default → — prosumer / multi-workspace tools; the shipped default.
- Single-tenant → — one shared workspace for an internal tool or one-org deployment.
- Open SaaS → — per-customer org workspaces with shareable join links.
- Workspace-optional → — user-first auth where workspaces are created or joined explicitly.
Then Extending ModelRails → to build your own features on top.