Rebrand Engine Overview
The heart of LibreApps Desktop's automated customization system.
Overview
The Rebrand Engine is a collection of Bash and Node.js scripts that automate the process of transforming the generic LibreApps Desktop template into a branded product. It handles string replacement, theme injection, asset management, and feature toggling.
Key Scripts
scripts/build-rebrand.sh
The main entry point for the rebranding process. It orchestrates the execution of all other scripts and manages the build lifecycle.
scripts/rebrand-nav-logic.js
A specialized script that parses the settings.md file and updates the sidebar and navigation configuration to enable or disable specific pages and widgets.
Core Functions
- Configuration Parsing: Reads and validates the
rebrand/settings.mdfile. - String Replacement: Performs a global search-and-replace for app names, company names, and URLs.
- Theme Injection: Fetches and applies the chosen theme's CSS variables.
- Asset Management: Copies and links brand-specific logos, favicons, and images.
- Feature Toggling: Modifies the source code to enable or disable specific dashboard components.
Why Use the Engine?
- Consistency: Ensures that your brand is applied uniformly across the entire application.
- Speed: Reduces the time required for rebranding from days to seconds.
- Maintainability: Allows you to keep your brand configuration separate from the application logic.
Best Practices
- ✅ Do this: Run the rebrand engine in a clean environment to avoid configuration conflicts.
- ✅ Do this: Review the terminal output to ensure all rebranding steps were completed successfully.
- ❌ Don't do this: Modify the rebrand engine scripts unless you have a deep understanding of the build process.