Creating Applications With Multitenancy

Step 1: Define Your Application Schema

  • Start by Describing Your Application: write down a detailed description of your application's functionality, data models, and any specific requirements it might have. This description should include information about the types of users, the actions they can perform, and how data should be organized and accessed.

Step 2: Schema Generation

  • After inputting the description of your application into Flatlogic's AI generator, it will analyze your description and create a preliminary schema for your application. This schema will include the necessary data models, relationships, and any specific constraints based on your description.

  • After the schema is generated, review it to see if multitenancy has been included based on your application's needs. If it hasn't and you require multitenancy, enable it manually.

Step 2.1: Enable Multitenancy

- If your initial schema does not include multitenancy, you can manually add it by clicking the three dots at the top of the schema interface. Then select the multitenancy option. Note that you must also select roles and permissions as prerequisites for enabling multitenancy.

  • With multitenancy is enabled the closed organizations' entity will be automatically added to your schema. This entity represents a tenant in the multitenant architecture. And closed organization field will be added to other entities in your schema, ensuring data isolation between tenants. You cannot edit or delete this field.

Step 3: Deploy Your Application

  • Wait for Deployment: Once you've finalized your schema with multitenancy enabled, proceed to deploy your application. The deployment process might take a few minutes after which your application will be up and running with multitenancy support.

Super Admin Role

  • In a multi-tenant application, the super admin has overarching control and visibility across all tenants. This role can manage multiple tenants (organizations) within a single application instance. Super Admins can share global access, i.e. they can have an Assistant, but the organization's Admin also holds all rights within a particular tenant (organization). This capability enables you to serve multiple customers or user groups (tenants/organizations) from a single application deployment, while still providing each tenant with a secure isolated environment. As a super admin, you can efficiently allocate resources, configure tenant-specific settings, monitor usage and performance across all tenants, and implement updates or changes globally or per tenant. This approach significantly reduces operational costs and complexity, enhances scalability, and simplifies the overall management of the application.

Registration Of New User

When registering new users in the registration window you should select the organization to which the user will belong.

In the left menu of the admin dashboard, under the application name, you can see the organization to which the user belongs.

By following these steps you can successfully incorporate multitenancy into your application using Flatlogic Multitenancy, ensuring data isolation and tailored access for different organizations or user groups within your application.

If you face any difficulties, please message us on our forum, Twitter, or Facebook. We will respond to your inquiry as quickly as possible!