Skip to main content

Example: Multi-Client Setup

How to manage multiple branded deployments from a single codebase.

Overview​

For agencies and SaaS providers, LibreApps Desktop's rebrand engine can be used to generate unique dashboard builds for different clients.

Scenario​

You have two clients:

  1. Client A (EcoTrack): Green theme, focus on Analytics.
  2. Client B (FinFlow): Blue theme, focus on CRM and eCommerce.

Implementation Steps​

1. Create Client Settings​

Create two separate settings files:

  • rebrand/settings-ecotrack.md
  • rebrand/settings-finflow.md

2. Configure EcoTrack​

In settings-ecotrack.md:

- **App Name**: EcoTrack
- **Theme Name**: Candy (Customized for green)
- **Analytics**: [x]
- **CRM**: [ ]

3. Configure FinFlow​

In settings-finflow.md:

- **App Name**: FinFlow
- **Theme Name**: LibreApps
- **Analytics**: [ ]
- **CRM**: [x]
- **eCommerce**: [x]

4. Run Builds​

Execute the rebrand script for each client:

# Build for EcoTrack
./scripts/build-rebrand.sh --config rebrand/settings-ecotrack.md --output build/web/ecotrack

# Build for FinFlow
./scripts/build-rebrand.sh --config rebrand/settings-finflow.md --output build/web/finflow

5. Run Client Builds​

Start each client's server:

# Start EcoTrack (port 3002)
cd build/web/ecotrack && PORT=3002 node .next/standalone/server.js

# Start FinFlow (port 3003)
cd build/web/finflow && PORT=3003 node .next/standalone/server.js

Access each client at:

Benefits​

  • Single Source of Truth: Maintain one core codebase while serving multiple clients.
  • Automated Deployment: Integrate these commands into your CI/CD pipeline for automated client updates.
  • Isolation: Each client gets a dedicated build directory with only the features they need.

Best Practices​

  • ✅ Do this: Use a consistent naming convention for your client settings files.
  • ✅ Do this: Automate the build process using a CI/CD tool like GitHub Actions.
  • ❌ Don't do this: Manually manage client-specific code branches; use the rebrand engine to handle variations.