ShopySeed

Teams & Invitations

Manage organizations, team members, roles, and invitations in ShopySeed.

Teams & Invitations

ShopySeed is built around multi-tenant organizations. Each user can belong to multiple organizations, and each organization has its own members, roles, and subscription.

Organizations

Creating an Organization

Organizations are created during the onboarding flow (/onboarding) after a user's first login. Each organization gets:

  • A unique name and slug
  • A dedicated database schema for tenant isolation
  • A default Free plan subscription
  • The creator assigned as Owner

Switching Organizations

Users with multiple organizations can switch between them via the organization selector in the dashboard sidebar. The current organization context is stored in OrgContext and sent as X-Organization-Id header on API requests.

Roles

ShopySeed implements 4 roles with hierarchical permissions:

RoleInvite MembersManage MembersBillingDelete Org
Owner
Admin
Member
Viewer

Roles are enforced both on the backend (via RolesGuard) and frontend (UI conditionals).

Team Invitations

Inviting a Member

  1. Owner or Admin clicks "Invite Member" on the Team page (/dashboard/team)
  2. Enters the invitee's email and selects a role
  3. Backend creates an OrganizationInvitation with a unique token
  4. An invitation email is sent with a link to accept

Invitation Details

  • Expiry: 7 days
  • Duplicate check: Cannot send two pending invitations to the same email
  • Existing user check: If the email is already a member, a 409 Conflict is returned

Accepting an Invitation

  1. Invitee clicks the link → /auth/accept-invite/[token]
  2. If not logged in, redirected to register/login first
  3. Backend validates the token, checks email match, and creates the membership
  4. Invitation is marked as accepted

Plan Limits

Invitations respect the organization's plan member limit:

  • Free: 3 members max
  • Pro: 10 members max
  • Enterprise: Unlimited

If the organization is at or over its limit (e.g., after a downgrade), new invitations are blocked. Existing members are not removed — they just can't add more until they upgrade or reduce team size.

API Endpoints

MethodEndpointDescription
GET/organizationsList user's organizations
POST/organizationsCreate a new organization
GET/organizations/:idGet organization details
PATCH/organizations/:idUpdate organization
DELETE/organizations/:idDelete organization (Owner only)
GET/organizations/:id/membersList members
POST/organizations/:id/inviteInvite a member by email
POST/organizations/accept-invite/:tokenAccept an invitation
PATCH/organizations/:id/members/:userId/roleChange member role
DELETE/organizations/:id/members/:userIdRemove a member

Over-Limit Handling

When an organization has more members than their plan allows (typically after a downgrade):

  • A warning banner appears on the Team page explaining the situation
  • The Invite button is disabled
  • A link to upgrade is provided
  • Existing members continue to work normally — no one is locked out

On this page