convex-tenants

Multi-tenant organization and team management for Convex with built-in role-based authorization and access control

Installation

npm install @djpanda/convex-tenants

About convex-tenants

A multi-tenant organization and team management component for Convex with built-in authorization via @djpanda/convex-authz

Benefits

Use cases

how to add multi-tenant organization support to Convex app

The convex-tenants component provides pre-built organization and team management schemas and mutations for Convex. It handles user invitations, role assignments, and data isolation between tenants automatically.

Convex role based access control for teams

This component integrates with @djpanda/convex-authz to provide role-based authorization at the organization and team level. You can define custom roles and permissions that automatically enforce data access rules across your Convex functions.

building SaaS with Convex multi-tenant architecture

The convex-tenants component provides the foundational multi-tenant patterns including organization hierarchies, team memberships, and isolated data access. It eliminates the need to build tenant management from scratch in your Convex backend.

Frequently asked questions

How does convex-tenants handle data isolation between organizations?

The convex-tenants component uses organization-scoped queries and mutations that automatically filter data based on the user's current organization context. It integrates with @djpanda/convex-authz to enforce access control rules at the database level.

Can I customize the roles and permissions in convex-tenants?

Yes, convex-tenants allows you to define custom roles and permissions for both organizations and teams. The component provides a flexible role system that works with the underlying @djpanda/convex-authz authorization framework.

Does convex-tenants support user invitations and team management?

The convex-tenants component includes built-in user invitation flows, team creation, and member management features. It provides Convex mutations and queries for handling the complete lifecycle of multi-tenant user management.

Is convex-tenants compatible with existing Convex authentication?

Yes, convex-tenants works with standard Convex authentication and extends it with organization and team-level authorization. It requires @djpanda/convex-authz as a dependency to provide the authorization layer on top of your existing auth setup.

Links