Operating model: organization, workspaces, users, and plans
This guide explains MuseRelay's current operating model: organization, workspace, users/roles, and plans/limits.
1) Functional hierarchy
- Organization: main business and billing unit.
- Workspace: working unit inside an organization.
- Users: linked to organization, then to one or more workspaces with role.
- Plan: defines limits and capabilities for the organization.
2) Organization: what it centralizes
Organization centralizes:
- Operational regional settings (
timezone,locale,time_format). - Assigned plan (
plan_id). - Relationships with workspaces, channels, bots, and subscriptions.
Main operational screen: Organization Settings.
3) Workspace: active operating context
In the panel, many operations depend on session current_workspace_id. Context middleware selects a valid workspace for the user and can create a default one if none exists for that organization.
This ensures modules run with a concrete context (data scope, permissions, and views per workspace).
4) Users and roles
- User-organization relationship:
organization_id+organization_userpivot. - User-workspace relationship:
workspace_userspivot with role and status. - Operational permissions resolve from role in active workspace.
Typical roles: owner, admin, supervisor, agent, viewer.
5) Plans and limits (current behavior)
Resource limits are enforced on key creation actions through check_limits middleware (for example: workspaces, teams, bots, AI agents, channels, operator invites).
Usage counting is evaluated at organization level (not only active workspace), keeping quota consistent globally.
Implementation note
Two plan-resolution paths currently coexist:
- Modules reading
organization.plan_iddirectly. - Modules reading active subscription in
subscriptions.
It works operationally, but unifying this source would simplify future maintenance.
6) Operating recommendation
- Set organization operational settings correctly (timezone/locale).
- Always work in the right active workspace context.
- Manage permissions by workspace role, not only global role.
- Check plan limits before scaling resources.
Summary: organization defines operation, workspace defines context, roles define permissions, and plan defines capacity.