Logo

Command Palette

Search for a command to run...

Teams & RBAC

Workspace-level isolation with owner, admin, and member roles.

Team Model

Every user gets a Default Team on registration. Additional teams can be created and switched between freely. All subscriptions, API keys, strategy instances, and billing are scoped to a team.

ResourceScope
Strategy subscriptionsTeam
Running instancesTeam
API keysTeam or User
Wallet / CRDTS balanceUser (team owner pays)
Notification preferencesUser

Roles & Permissions

RoleCapabilities
OwnerFull control — billing, team deletion, member management, all settings
AdminManage members, activate strategies, manage instances
MemberView strategies and instances; limited write access

Permissions are enforced on the API by the rbac middleware:

// apps/api/src/middleware/rbac.ts
router.delete("/teams/:slug", requirePermission("team:delete"), handler);

Team Switching

The sidebar Team Switcher lets users move between teams instantly. The active team is stored in the session cookie so server components always have the right context.

Invitations

Owners and admins can invite users by email with a pre-assigned role. Invitees receive an email with a token-based acceptance link at /teams/join. Ownership can also be transferred to another member.

Data Isolation

Every Mongoose document that belongs to a team carries a teamId index. Queries always filter by the resolved team from the session — there is no cross-tenant data leakage.