Accounts

Accounts are a core piece of functionality for the Appibase platform.

Personal Account

Every user has a personal account when they sign up to Appibase. A personal account is associated with a single user (represented by the "User" model) as its owner and does not allow other users on it.

GitHub is a great example of this case. Repositories can be personal or belong to an organization.

Organization Accounts

Users can create organization accounts (represented by the "Account" model) and invite other users to join them. Once created, users can switch to the accounts that they are an owner or member of.

Account Roles

Users can be assigned a role for each account they are a part of. By default, a user has the Owner and Admin roles of the organization account that they create. Invited users to an organization account can either have an Admin and/or Member roles, as set by the account Owner.

The account role determines the permissions of a user on the account they are member of.

Multitenancy

Appibase is a "multi-tenant" platform, scoping model queries to the set account. Each organization account represents a single tenant.

A tenant is a logically isolated group of users who share common access requirements with specific privileges.

In the Appibase UI, the account switching is set via prepending all routes with the current account ID: /:account_id/. A user can switch to a specific account from the accounts list.

In the Appibase API, the endpoints need to be prepended by account ID to specify the tenant e.g. /:account_id/api/v1/products for the products endpoint.