Skip to main content

Multi-Tenancy Core

Multi-database multitenancy module with SaaS management for Laravel ERP. This module is required for the SaaS edition and enables running Open Core Business Suite as a multi-tenant platform.

Features

  • Multi-Database Tenancy: Complete database isolation per tenant for security and performance
  • Tenant Registration: Public registration form for new tenants with field validation
  • Tenant Management: Full management of tenants including approval, suspension, and activation
  • Tenant Approval Queue: Review and approve/reject pending tenant registrations
  • Plan Management: Create and manage subscription plans with CRUD operations
  • Subscription Management: Track tenant subscriptions, renew, cancel, or change plans
  • Payment Management: Payment approval queue, payment history, and proof-of-payment uploads
  • Database Provisioning: Automated or manual tenant database provisioning
  • Tenant Portal: Self-service portal for tenants to manage subscriptions, billing, invoices, usage, and profile
  • SaaS Settings: Centralized settings for registration, trials, payment gateways, and provisioning
  • Offline Payments: Built-in support for offline/bank transfer payments with proof upload
  • Payment Gateway Integration: Toggle and configure Stripe, Razorpay, and PayPal gateways
  • Email Templates: Customizable email templates for tenant communications
  • Organization Lookup API: Public API for mobile apps to look up tenant organizations

Requirements

  • Open Core Business Suite (Base System)
  • Database server with permissions to create databases
  • Wildcard subdomain configuration on your server

Installation

Enable via Admin Panel

  1. Log in as administrator
  2. Navigate to Settings > Addons
  3. Find Multi-Tenancy Core and click Enable
  4. Run migrations if prompted

Enable via Command Line

php artisan module:enable MultiTenancyCore
php artisan migrate

Post-Installation

Configure your web server for wildcard subdomains to support tenant-specific URLs.

Access SaaS management through the sidebar menu (super_admin role required):

  • SaaS Management > Dashboard - Overview and statistics
  • SaaS Management > All Tenants - View and manage all tenants
  • SaaS Management > Approval Queue - Review pending tenant registrations
  • SaaS Management > Plans - Manage subscription plans
  • SaaS Management > Subscriptions - Manage tenant subscriptions
  • SaaS Management > Payment Approval Queue - Review pending payment approvals
  • SaaS Management > Payment History - View all payment history and statistics
  • SaaS Management > Database Provisioning - Manage tenant database provisioning
  • SaaS Management > SaaS Settings - Configure platform settings

Usage

Tenant Management

Navigate to SaaS Management > All Tenants to manage tenants:

  • View all tenants with datatable filtering and sorting
  • View individual tenant details
  • Edit tenant information
  • Approve or reject pending tenants
  • Suspend or activate tenant accounts

Tenant Approval

Navigate to SaaS Management > Approval Queue to:

  • Review pending tenant registration requests
  • Approve tenants to grant access
  • Reject tenants with a reason

Plan Management

Navigate to SaaS Management > Plans to:

  • Create new subscription plans with pricing and features
  • Edit existing plans
  • View plan details and assigned tenants
  • Delete unused plans

Subscription Management

Navigate to SaaS Management > Subscriptions to:

  • View all active subscriptions
  • Create new subscriptions for tenants
  • Cancel or renew subscriptions
  • Change tenant plans
  • View expiring subscriptions

Payment Management

Navigate to SaaS Management > Payment Approval Queue to:

  • Review pending offline/manual payments
  • View uploaded payment proofs
  • Approve or reject payments
  • Upload payment proofs on behalf of tenants

Navigate to SaaS Management > Payment History to:

  • View all payment history with filtering
  • View payment statistics
  • Download payment details

Database Provisioning

Navigate to SaaS Management > Database Provisioning to:

  • View tenant provisioning status
  • Auto-provision tenant databases (creates database, runs migrations, seeds data)
  • Manually provision with custom database credentials
  • View provisioning history and statistics

Tenant Portal

Tenants access their self-service portal at /tenant/ with these sections:

  • Dashboard - Tenant overview
  • Plan Selection - Choose or change subscription plan
  • Subscription - View current subscription, change plan, cancel, or resume
  • Billing - View payment instructions, upload payment proofs
  • Invoices - View and download invoices
  • Usage - Monitor resource usage
  • Profile - Update company profile
  • Support - Access support resources

Configuration

SaaS Settings

Navigate to SaaS Management > SaaS Settings to configure:

General Settings

SettingDescriptionDefault
Allow Tenant RegistrationEnable public tenant registrationEnabled
Auto-Approve TenantsAutomatically approve new registrationsDisabled
Require Email VerificationRequire email verification for new tenantsEnabled
Default PlanDefault plan for new tenants-
Enable TrialAllow trial subscriptionsEnabled
Trial DaysDuration of trial period14
Require Payment for TrialRequire payment info during trial signupDisabled
Grace Period DaysDays after subscription expiry before suspension3
Platform NameDisplay name for the SaaS platformApp Name
Support EmailSupport contact email-
CurrencyDefault currency codeUSD
Currency SymbolCurrency display symbol$
Terms URLLink to terms of service-
Privacy URLLink to privacy policy-

Database Provisioning Settings

SettingDescriptionDefault
Auto ProvisioningAutomatically provision tenant databases on approvalDisabled
DB HostDatabase server host for tenant databaseslocalhost
DB PortDatabase server port3306
DB UsernameDatabase user for creating tenant databasesroot
DB PasswordDatabase password-

Payment Gateway Settings

  • Offline Payments: Configure bank details (bank name, account name, account number, routing number, SWIFT code, bank address, payment instructions)
  • Payment Gateways: Toggle enable/disable for Stripe, Razorpay, and PayPal gateways (each gateway requires its own module)

API Endpoints

Organization Lookup (Public)

Look up a tenant organization by domain or identifier for mobile app connection.

POST /api/V1/organization/lookup

Tenant Info (Authenticated)

Get current tenant information.

GET /api/V1/tenant/info

Requires authentication and tenant context middleware.

SaaS Edition Note

This module is included only in the SaaS edition of Open Core Business Suite. It is not available in the standard single-tenant package.


Changelog: View version history