ScaffoldHub - v2
  • Introduction
  • Modeling
    • Two-way Relationships
  • Setup
    • Backend
    • Frontend
    • File Storage
    • Emails with SendGrid
    • Payments with Stripe
  • Debugging
  • Deployment
    • Database
      • SQL
      • MongoDB
    • Backend
      • Google Cloud - App Engine
      • Google Cloud - Run
      • Under construction...
    • Frontend
      • Firebase Hosting
      • Heroku w/ Subdomains
      • Under construction...
  • Features
    • Projects
    • Preview
    • Tenants
      • Single-Tenant
      • Multi-Tenant
      • Multi-Tenant (w/ subdomains)
    • Payments
    • Security
    • Authentication
      • Sign-in and Sign-up
      • Invitation
      • Password Reset
      • Password Change
      • Email Verification
    • Audit Logs
    • Settings
    • Internationalization (I18n)
    • Entity
      • Form
      • Filter and List
      • Export
      • Import
    • API Documentation
  • Architecture
    • Security
    • File Storage
    • Internationalization (I18n)
    • Payments
    • Typescript Support
    • Rate limiting
    • Technologies Versions
    • Under construction...
  • Recipes
    • Testing the API with Postman
    • Enterprise sign-in with WorkOS
    • Under construction...
  • Support
  • Changelog
    • Documentation
    • Scaffolds
  • Custom Development
  • Legacy Scaffolds
  • Go to ScaffoldHub
Powered by GitBook
On this page
  • Sign-up via the root domain
  • Sign-up via the subdomain
  • Managing Workspaces

Was this helpful?

  1. Features
  2. Tenants

Multi-Tenant (w/ subdomains)

PreviousMulti-TenantNextPayments

Last updated 4 years ago

Was this helpful?

The Multi-Tenant w/ Subdomains mode works similarly to the strategy, but each workspace is accessed via its subdomain.

The term workspace is just a label, you can to anything you find appropriate to your business model. Examples are Organizations, Companies, Teams, etc.

Each workspace has its own , , , and .

Sign-up via the root domain

After a new user signs up via the root domain, they are asked to create a new workspace and assign a subdomain to it.

The user will be set as admin and redirected to the workspace's subdomain.

Sign-up via the subdomain

Users that sign-up via the subdomain are accessing a workspace that already exists and already has an admin.

In this case, new users will need the admins' approval to join.

You can override this behavior on the code and assign default permissions for users.

The file that contains this logic is backend/src/services/auth/authService.ts.

Managing Workspaces

Read the section for more details.

If users came to the subdomain by , they will have the roles the admin previously assigned to them. In that case, they will go straight to the application.

Users can switch, create, edit or delete workspaces on the Workspaces page that can be accessed via the User's menu. Permission to edit and delete a specific workspace depends on the the user has on that workspace.

Architecture > Security
invitation
role
Multi-Tenant
rename it
Users
Audit Logs
Settings
Entities