VyralCloud
Documentation

Multi-Tenancy Architecture

Understanding how VyralCloud isolates data and resources between projects.


The Project (Institution) Model

In VyralCloud, the primary unit of organization is the Project. Every resource you create—whether it's a server, volume, or network—belongs to exactly one project.

When you log in, you are always operating within the context of a "Active Project". You can see which project is active by looking at the top navigation bar.

Resource Visibility Rule

A user in Project A cannot see, access, or modify any resources in Project B, even if they are the owner of both projects. To manage Project B's resources, the user must explicitly switch their context to Project B using the project switcher.

Technical Implementation

For the technically curious, we enforce multi-tenancy at two levels:

  1. Application Level (Laravel): Global Scopes are applied to all Eloquent models. Every database query automatically appends WHERE institution_id = X, ensuring data from other tenants is never retrieved.
  2. Infrastructure Level (Cloud Provider): Resources in the underlying cloud provider are tagged with a unique institution_id label. Our sync services strictly filter resources based on this label.

Use Cases

  • Educational Institutions

    Give each student group their own Project. They have full admin rights within their sandbox but cannot touch the school's production infrastructure.

  • Development Agencies

    Create a separate Project for each Client. This simplifies billing (you can see exact costs per project) and allows you to invite client stakeholders to view only their own servers.