Codapult
PreisePluginsDoku
Codapult

Das SaaS-Boilerplate für Macher

Produkt

  • Preise
  • Plugins
  • Dokumentation

Unternehmen

  • Kontakt
  • GitHub

Rechtliches

  • Datenschutzrichtlinie
  • Nutzungsbedingungen

© 2026 Codapult. Alle Rechte vorbehalten.

Alle Artikel

Getting Started

  • Introduction
  • Quick Start
  • Project Structure

Configuration

  • Environment Variables
  • App Configuration

Authentication

  • Authentication
  • OAuth Providers
  • Two-Factor & Passwordless
  • Enterprise SSO (SAML)

Database

  • Database
  • Migrations

Teams

  • Teams & Organizations
  • Permissions & RBAC

Payments

  • Payments & Billing
  • Stripe Setup
  • LemonSqueezy Setup
  • Polar Setup
  • Payment Webhooks

Api

  • API Layer
  • tRPC
  • GraphQL

Ai

  • AI Features

Email

  • Email
  • Email Templates

Infrastructure

  • Infrastructure
  • File Storage
  • Background Jobs

Ui

  • UI & Theming

I18n

  • Internationalization

Content Management

  • Content Management

Admin

  • Admin Panel

Security

  • Security

Monitoring

  • Analytics & Monitoring

Modules

  • Module Architecture

Plugins

  • Plugin System
  • AI Kit Plugin
  • CRM Plugin
  • Helpdesk Plugin
  • Email Marketing Plugin

Deployment

  • Deployment
  • Troubleshooting

Upgrading

  • Upgrading Codapult

Developer Tools

  • MCP Server
  • Testing
Teams

Teams & Organizations

Multi-tenancy with organizations, roles, permissions, and team invitations.

Overview

Codapult provides built-in multi-tenancy through organizations. Users can create teams, invite members, assign roles, and manage settings — all with fine-grained role-based access control (RBAC).

Roles & Hierarchy

Every organization member has one of four roles, ordered from most to least privileged:

RoleLevelCapabilities
Owner4Full control — delete org, manage billing, all actions
Admin3Manage members, settings, billing, resources
Member2Create and edit resources, view billing
Viewer1Read-only access to org resources and settings

Global admins (user.role === 'admin') bypass all organization-level permission checks.

Permissions & RBAC

Codapult uses role-based access control with 15+ permission definitions. For the full permission map, helper functions, guard usage, and how to add custom permissions, see the dedicated Permissions & RBAC page.

Invitations

Organization owners and admins can invite new members by email:

  1. Admin sends an invitation from Dashboard → Team → Invite Member
  2. An email with a unique token is sent to the invitee
  3. The invitee clicks the link and lands on /invite/[token]
  4. After accepting, they become a member with the assigned role

Invitations have an expiration date. Expired invitations cannot be accepted — the admin must resend.

Invitation Statuses

StatusDescription
pendingSent, awaiting acceptance
acceptedInvitee joined the organization
expiredToken expired before acceptance

Database Tables

Three tables power the teams module:

organization

ColumnTypeDescription
idtext (PK)Unique ID (nanoid)
nametextDisplay name
slugtextURL-safe unique identifier
imagetextAvatar URL (optional)
brandingtextJSON-encoded theme overrides
created_attimestampCreation date
updated_attimestampLast modified date

organization_member

ColumnTypeDescription
idtext (PK)Unique ID
organization_idtext (FK)References organization.id
user_idtext (FK)References user.id
roletextowner, admin, member, viewer
created_attimestampJoined date

organization_invitation

ColumnTypeDescription
idtext (PK)Unique ID
organization_idtext (FK)References organization.id
emailtextInvitee email address
roletextAssigned role on acceptance
tokentextUnique invitation token
statustextpending, accepted, expired
invited_bytext (FK)References user.id
expires_attimestampExpiration date
created_attimestampInvitation sent date

Server Actions

All team mutations are in src/lib/actions/organizations.ts:

ActionDescriptionRequired Permission
Create organizationCreates a new teamAuthenticated user
Update organizationUpdates name, avatar, brandingorg:update
Delete organizationPermanently deletes the teamorg:delete
Invite memberSends an email invitationmember:invite
Change member rolePromotes or demotes a membermember:update-role
Remove memberRemoves a member from the teammember:remove

UI Components

  • TeamSwitcher — dropdown in the dashboard sidebar for switching between organizations
  • Team settings page — manage name, avatar, and billing at Dashboard → Settings → Team
  • Members list — view, invite, and manage members at Dashboard → Team

SCIM Provisioning

For enterprise customers, Codapult supports SCIM (System for Cross-domain Identity Management) for automated user provisioning and deprovisioning from identity providers like Okta, Azure AD, and OneLogin. SCIM endpoints live in src/lib/scim/. See the Security documentation for more details.

Module Removal

The teams module is independently removable. See the Modules documentation for step-by-step removal instructions.

Next Steps

  • Database — schema conventions and query patterns
  • Payments & Billing — subscription management tied to organizations
  • Authentication — user accounts and sign-in methods
MigrationsPermissions & RBAC