These docs are a work in progress and may not be fully up to date. Some pages may contain internal notes for our team.
Skip to Content

Data model — Workspace

Tenant container. All resources (finders, locations, maps, sets/categories, tags, custom field definitions) are scoped to a workspace. Free-tier accounts get one workspace; paid tiers can create additional workspaces. Workspace ID is passed as a query parameter on authenticated API requests to scope reads and writes.

Table: workspaces

ColumnTypeNullableDescription
idbigintnoPrimary key
titlestringnoWorkspace display name
descriptionstringyesOptional description
tutorial_enabledbooleannoWhether the onboarding tutorial is active for this workspace
tutorial_completed_stepsjsonyesArray of step identifiers the user has completed
tutorial_skipped_attimestampyesWhen the user dismissed the tutorial
created_attimestamp
updated_attimestamp

💡 Tip: The column is title, not name. Several API responses surface it as name — check the resource/transformer layer if you see a mismatch.

Onboarding tutorial state

tutorial_enabled starts true for new workspaces. The dashboard hides tutorial prompts once all tutorial_completed_steps are recorded or tutorial_skipped_at is set. These columns have no effect on API behavior — they are purely UI hints.

Relations

RelationMethodTypeNotes
Users (owners)owners()belongsToMany Uservia workspace_user; selects only users.id
Findersfinders()belongsToMany Findervia finder_workspace pivot
Mapsmaps()belongsToMany Mapvia map_workspace pivot
Sets (Categories)sets()belongsToMany Setvia set_workspace pivot, with timestamps
Locationslocations()belongsToMany Locationvia location_workspace pivot
Tagstags()hasMany Tagdirect FK on Tag
Custom field definitionscustomFieldDefinitions()hasMany CustomFieldDefinitionordered by sort_order

⚠️ Warning: Deleting a workspace cascades to all child resources — see API — Workspaces for operational details.

Workspace scoping in the API

Authenticated requests pass ?workspace_id=<id> to scope reads and writes. The backend resolves this parameter via buildWorkspaceAwareEndpoint in the frontend API layer and validates that the user is a member of the requested workspace before allowing access.

Plan limits

The number of workspaces a user can create is gated by subscription tier. Attempting to create a workspace beyond the plan limit returns 403 with a plan upgrade message. Workspace routes are protected by the subscription_tier:free middleware — accounts below the Free tier cannot access workspace endpoints.

The subscription_tier:free middleware is a minimum-tier gate: accounts on free and above pass; accounts on none (or any tier below Free) return 403. Admins and custom-tier accounts always bypass this gate.