Skip to content

feat(whitelabel): add in the ability to whitelabel via envvars#887

Merged
waleedlatif1 merged 5 commits intostagingfrom
improvement/helm
Aug 6, 2025
Merged

feat(whitelabel): add in the ability to whitelabel via envvars#887
waleedlatif1 merged 5 commits intostagingfrom
improvement/helm

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

Add in the ability to whitelabel via envvars

Type of Change

  • New feature

Testing

N/A

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Aug 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs 🛑 Canceled (Inspect) Aug 6, 2025 2:02am
sim ❌ Failed (Inspect) Aug 6, 2025 2:02am

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR introduces comprehensive whitelabeling functionality that allows organizations to customize the application's branding through environment variables. The implementation enables runtime configuration of brand elements including company name, logo, colors, custom CSS, support URLs, and legal page links without requiring code changes.

The changes span multiple layers of the application:

Environment Configuration: Adds 15 new client-side environment variables in env.ts with proper Zod validation for brand customization (name, logo URLs, colors, support email, documentation URLs, etc.)

Core Branding System: Introduces a new branding module (lib/branding/branding.ts) that provides getBrandConfig() and useBrandConfig() functions to access brand configuration with fallbacks to default 'Sim' values

Email Templates: Updates all email components (invitation, password reset, OTP verification, workspace invitation, batch invitation, footer) to use dynamic branding instead of hardcoded 'Sim' references

UI Components: Modifies navigation, authentication layout, and search modal to display custom logos and documentation URLs based on environment variables

Layout & Metadata: Implements BrandedLayout component for global brand application and dynamic metadata generation for SEO and PWA manifest with brand-specific values

Helm Configuration: Adds comprehensive whitelabel configuration examples in values.yaml and values-whitelabeled.yaml for Kubernetes deployments

The architecture uses NEXT_PUBLIC_* prefixed environment variables to ensure client-side availability while maintaining backward compatibility through fallback patterns. This enables the same codebase to be deployed with different branding configurations, particularly useful for enterprise customers and multi-tenant deployments.

Confidence score: 2/5

  • This PR introduces significant functionality but contains several critical issues that could cause production problems
  • Score reflects environment variable validation gaps, security concerns with CSS injection, and inconsistent branding implementation in structured data
  • Pay close attention to lib/branding/branding.ts, lib/branding/metadata.ts, components/branded-layout.tsx, and the Helm values files

18 files reviewed, 6 comments

Edit Code Review Bot Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – sim August 6, 2025 01:57 Inactive
@waleedlatif1 waleedlatif1 merged commit e43e78f into staging Aug 6, 2025
5 checks passed
@waleedlatif1 waleedlatif1 deleted the improvement/helm branch August 6, 2025 02:01
waleedlatif1 added a commit that referenced this pull request Aug 6, 2025
* feat(whitelabel): add in the ability to whitelabel via envvars

* restore site.webmanifest

* fix(dynamic): remove force-dynamic from routes that don't need it (#888)

* Reinstall dependencies

* Update docs
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…udioai#887)

* feat(whitelabel): add in the ability to whitelabel via envvars

* restore site.webmanifest

* fix(dynamic): remove force-dynamic from routes that don't need it (simstudioai#888)

* Reinstall dependencies

* Update docs
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.

1 participant