Skip to content

Conversation

@jasonbrd
Copy link
Contributor

@jasonbrd jasonbrd commented Dec 2, 2025

Add White Labeling Support for Custom Branding

Summary

Adds comprehensive white labeling capabilities allowing organizations to customize the application's branding at build time through environment variables. Supports custom logos, default theme selection, and color scheme customization without code modifications.

Features

  • Custom Logo Support: Configure custom SVG logos via NEXT_PUBLIC_CUSTOM_LOGO environment variable with automatic fallback to default
  • Default Theme Configuration: Set default light/dark theme via NEXT_PUBLIC_DEFAULT_THEME with user preference persistence
  • Color Customization: Override application colors through CSS variables - changes apply automatically to all UI components
  • Docker Build Integration: Pass branding configuration as build arguments for containerized deployments
  • Graceful Fallbacks: All configurations include fallback handling for missing files or invalid values

Technical Changes

  • Created Logo component with dynamic source loading and error handling
  • Implemented ThemeService for theme management and localStorage persistence
  • Updated Tailwind config to use CSS custom properties for runtime color switching
  • Modified Dockerfile to accept and pass white label environment variables
  • Synchronized theme state across app initialization, user settings, and server responses

Documentation

  • Added comprehensive docs/WHITE_LABEL.md with configuration examples and troubleshooting
  • Included example logo template at public/logos/example-logo.svg
  • Created .env.local.whitelabel.example with all configuration options

Usage Example

docker build \
  --build-arg NEXT_PUBLIC_CUSTOM_LOGO="company-logo.svg" \
  --build-arg NEXT_PUBLIC_DEFAULT_THEME="dark" \
  --build-arg NEXT_PUBLIC_BRAND_NAME="Acme Corp" \
  -t <repo_name> .

karelyrodri and others added 9 commits December 2, 2025 14:05
…antDriveDataSources

- Introduced a dropdown to select between OneDrive and SharePoint when the Microsoft tab is active.
- Updated integration handling to use the selected Microsoft service.
- Refactored DataSourceSelector to improve integration name display.
- Enhanced folder history management in DataSourcesTableScrollingIntegrations with functional updates to avoid stale closures.
- Improved the service selection label to include connection status indicators for OneDrive and SharePoint.
- Refactored the dropdown to include an icon representing the selected Microsoft service.
- Updated styling for better user experience and accessibility.
- Introduced helper functions to retrieve supported Microsoft services and their display names.
- Updated the service selector to conditionally render based on the number of supported services.
- Enhanced the user interface for selecting between OneDrive and SharePoint with improved logic and structure.
support node 18

Node 20

Removing test components

revert back to node 18 support

Revert docker handling
persist user pref in localStorage

localStorage fix

theme persistence

theme service order correction

Default theme fix
@karnsab karnsab merged commit b0a1b0e into gaiin-platform:dev Dec 2, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants