Comprehensive White Label Configuration System - #10
Open
ngo275 wants to merge 1 commit into
Open
Conversation
- Add WHITE_LABEL_CONFIG to src/lib/config.ts with environment variable support - Create useWhiteLabelTranslations hook for dynamic branding replacement - Update all layout components to use white label configuration - Modify email templates and subject lines to use configurable app name - Update app metadata, Stripe integration, and authentication configuration - Replace hardcoded references throughout localization files - Update legal documents to use configurable values - Add comprehensive documentation and environment variable examples - Maintain backward compatibility with sensible defaults Co-Authored-By: Shu <ngo38114@gmail.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Comprehensive White Label Configuration System
This PR implements a complete white label configuration system for the AppAgent repository, making the application fully configurable for branding, domain, email addresses, and other key identifiers.
🎯 Overview
The white label configuration system allows users to customize:
🔧 Implementation Details
Core Configuration (
src/lib/config.ts)Custom Translation Hook (
src/hooks/useWhiteLabelTranslations.ts)Created a custom hook that wraps Next.js's
useTranslationsto automatically replace hardcoded values with white label configuration at runtime, maintaining compatibility with the existing i18n system.📁 Files Updated
Configuration & Core
src/lib/config.ts- Added WHITE_LABEL_CONFIGsrc/hooks/useWhiteLabelTranslations.ts- Custom translation hooksrc/lib/white-label-utils.ts- Utility functionsLayout Components
src/components/layouts/landing-page.tsxsrc/components/layouts/dashboard.tsxsrc/components/layouts/settings.tsxsrc/components/layouts/plain.tsxEmail System
src/lib/resend.ts- Email sender configurationsrc/lib/emails/send-*.ts- All email subject linessrc/components/emails/*.tsx- Email templatesApp Metadata & Integration
src/app/layout.tsx- App metadata and OpenGraphsrc/lib/payment/stripe/index.ts- Stripe integrationsrc/lib/auth.ts- Authentication configurationLocalization & Content
locales/en.json- English translationslocales/ja.json- Japanese translationssrc/markdown/*.mdx- Legal documentsDocumentation
WHITE_LABEL_CONFIG.md- Comprehensive configuration guide.env.sample- Environment variable examplesREADME.md- Updated with white label information🧪 Testing Performed
✅ Local Development Testing
yarn devand verified application loads correctly✅ Code Quality
yarn lint --fixsuccessfully✅ Browser Verification
🚀 Usage
Environment Variables
Backward Compatibility
🔍 Key Features
.envfiles📋 Migration Guide
For existing deployments wanting to customize branding:
.env.sample🔗 Related
✨ Benefits