App Presets › Workspace-optional
Workspace-optional (:none)
What it is. Signup creates no workspace. A new user’s identity lives at the User level; Current.workspace is legitimately nil until they explicitly create or join one. The workspace switcher, workspace-scoped nav, and workspace-scoped surfaces simply don’t render for workspace-less users — the app is nil-safe throughout.
Who it’s for. Auth-first / user-first products where workspaces are optional or emerge later: an event platform where users register and then join specific events, a community where members exist independently of any group, a personal dashboard that optionally connects to shared spaces.
How users relate
Users exist at the platform level. A fresh signup has no workspace at all. Workspaces are created or joined through deliberate product flows — an event RSVP, a community invite, a “create your first team” prompt — rather than being implicit on arrival:
What you get when configured.
| Knob | Value | Mechanism |
|---|---|---|
signup.mode |
:open or :invite_only — your call |
config/initializers/signup.rb (SIGNUP_MODE) |
tenancy.onboarding |
:none — no workspace created at all |
WORKSPACE_ON_SIGNUP=none; the User#onboard_workspace callback is a no-op |
tenancy.workspace_creation |
:enabled — users can create workspaces when your product flow calls for it |
WorkspacesController#new |
permitted_join_strategies |
[:invite] default; add open_link for link-join |
SIGNUP_PERMITTED_JOIN_STRATEGIES |
First-run onboarding wizard
New users under :none are funneled through a mandatory first-run onboarding wizard before they reach their home. The wizard is driven by the RequiresOnboarding concern (included in ApplicationController) and the OnboardingsController step dispatcher.
Guard. RequiresOnboarding#require_onboarding fires as a before_action on every authenticated HTML request. It redirects to onboarding_path when all three conditions hold:
TenancyConfig.none?— the guard is completely inert in the:personaland:sharedpostures (the single-tenant preset uses:shared).Current.user.onboarded?is false —users.onboarded_atis nil.request.format.html?— background XHR/JSON requests (e.g. the timezone beacon) pass through.
Controllers that must be reachable mid-wizard (the wizard steps themselves, sign-out, EmailVerificationsController) call skip_onboarding_requirement to opt out.
Step dispatcher. OnboardingsController#show reads User#onboarding_step (derived from the user’s data, not a persisted column) and redirects to the appropriate step:
onboarding_step |
Redirects to |
|---|---|
:workspace |
new_onboarding_workspace_path — name the workspace |
:project |
new_onboarding_project_path — create the first project |
:team |
new_onboarding_team_path — invite teammates |
Wizard steps (all under Onboarding::BaseController):
Onboarding::WorkspacesController— user names their workspace; on save, redirected to the project step.Onboarding::ProjectsController— user creates their first project; on save, routed to the tools step (if the registry offers a real choice) or directly to the team step.Onboarding::ToolsController— self-hiding interstitial for toggling project tools; skipped automatically when there is no real choice.Onboarding::TeamsController— invite teammates by email; completing or skipping stampsusers.onboarded_atand lands on the project home (workspace_project_path).
Skipping. The “Skip for now” action (PATCH /onboarding) hits OnboardingsController#update, which sets onboarded_at immediately and redirects to the workspace/project home (or root_path if neither exists yet).
Completing. TeamsController#create sets onboarded_at: Time.current and redirects to the project home. Once onboarded? is true the guard never fires again.
Joining. Accepting an invitation or an open join link stamps onboarded_at too, inside the membership transaction (Workspace#admit, the one membership-grant seam). An invitee never sees the wizard — it exists for the self-signup who has nowhere to go, and its invite step would refuse a Member. If a wizard step ever refuses someone anyway (data from before the stamp), Onboarding::BaseController marks them onboarded and sends them to their workspace rather than inheriting the workspace redirect the guard would bounce straight back.
See Onboarding for a full walkthrough, screenshots, and i18n keys.
External Clientside clients (users with client accesses and no workspace memberships) skip onboarding entirely — they are routed to
clientside_projects_pathviaauthenticated_home_path. See Clientside.
Setup
1. Set the onboarding knob.
WORKSPACE_ON_SIGNUP=none
That’s the only required change. No seed vars are needed (unlike :shared).
bin/fork --preset none records it in .fork.yml, which production reads, so
a fork needs to set the variable only to override that choice.
2. Override authenticated_home_path (optional).
Every post-auth landing — SessionsController, magic-link, OAuth, and redirect_if_authenticated — routes through authenticated_home_path. For already-onboarded users this is where they land. The default is root_path; client-only users land on clientside_projects_path automatically. Override in your fork if your workspace-agnostic home lives elsewhere:
# app/controllers/application_controller.rb (or a concern)
private
def authenticated_home_path
dashboard_path # or workspaces_path, root_path, wherever your workspace-agnostic home lives
end
For most :none apps you’ll point it at a dedicated user home — a profile page, a dashboard, an event listing — that makes sense whether or not the user has any workspaces. New users won’t reach this until they’ve completed (or skipped) the onboarding wizard.
3. Build a workspace-agnostic home view.
Your home view should work when Current.workspace is nil. The workspace switcher, workspace-scoped sidebar items, and workspace-scoped nav links already guard on Current.workspace.present? and are simply absent for workspace-less users — you don’t need to add nil checks on your own.
Zero-workspace safety
The app is nil-safe throughout. When Current.workspace is nil:
- The workspace switcher does not render, except on a phone on the All workspaces page, where its trigger names the user instead of a workspace.
- Workspace-scoped sidebar sections and nav links are hidden.
Tenantedmodel scopes are never reached from workspace-less contexts — your user-scoped controllers don’t setCurrent.workspace, so workspace-scoped queries never run.
You are responsible for nil-guarding any custom views or partials you add that reference Current.workspace directly. The template’s own surfaces are safe.
Verification
After bin/setup, open a console:
bin/rails console
user = User.create!(
email_address: "test@example.com",
first_name: "Test", last_name: "User"
)
user.workspaces.count # => 0
A count of zero confirms the preset: no workspace was auto-created.
Browser verification (requires SIGNUP_MODE=open or a valid invitation) — sign up a fresh user and confirm:
- Entering an email on the sign-in page sends a magic link; following it opens the registration form (first and last name).
- Submitting the form creates the account with its email already verified and signs you in, so no “confirm your email” banner appears.
- The onboarding wizard starts — you are redirected to
onboarding_pathand funneled through workspace → project → (tools) → team. - Completing or skipping the wizard stamps
onboarded_atand lands on the project home. - The sidebar’s workspace switcher is absent until a workspace exists.
- No workspace appears in
user.workspacesuntil they explicitly create or join one.
When to switch presets.
- “Every user should get their own private workspace automatically.” → Solo-default — the shipped default.
- “Everyone lands in one shared workspace.” → Single-tenant.
- “Users get a personal workspace and can also join or create org workspaces.” → Open SaaS.
Switching TO
:noneon a live app is effectively a from-scratch product shape, not a config flip. Existing users who already have workspaces keep them; theWORKSPACE_ON_SIGNUP=nonechange only affects new signups. A live migration would require a separate cleanup pass and a redesigned home experience — plan this at setup time.
Next steps
- ← Compare all presets — the decision matrix and the other three shapes.
- Forking → — override
authenticated_home_pathand other fork seams for your product. - Extending ModelRails → — add your own user-scoped features on top of this preset.