White Label Guide - nself-org/nchat GitHub Wiki
Complete guide to customizing nself-chat for your brand.
nself-chat is designed for complete white-labeling with zero code required. Everything is configurable via:
- Setup Wizard - 9-step initial configuration
- White-Label Wizard - Advanced branding (8 steps)
- Admin Dashboard - Runtime configuration
- Environment Variables - Deployment defaults
When you first launch nself-chat, the setup wizard guides you through:
Introduction to the setup process.
{
name: string // Your name
email: string // Contact email
company: string // Company name
role: string // Your role
}{
appName: string // "My Chat App"
logo: string | null // Logo URL or uploaded file
favicon: string | null
tagline: string // "Team communication made easy"
companyName: string
}{
mode: 'light' | 'dark' | 'system'
preset: string // 'nself' | 'slack' | 'discord' | etc.
colors: {
primary: string // '#6366f1'
secondary: string
accent: string
background: string
foreground: string
}
}Toggle which features to enable:
- Channels (public, private)
- Direct Messages
- Threads
- Reactions
- File Uploads
- Voice Messages
- Polls
- Bots
- And more...
Choose authentication providers:
- Email/Password
- Magic Links
- GitHub
- Apple
- Microsoft
- Phone/SMS
- ID.me
{
mode: 'allow-all' | 'verified-only' | 'idme-roles' | 'domain-restricted' | 'admin-only'
allowedDomains?: string[]
allowedIdmeGroups?: string[]
requireApproval?: boolean
}{
mode: 'landing' | 'redirect' | 'chat'
heroTitle: string
heroSubtitle: string
showFeatures: boolean
showPricing: boolean
showTestimonials: boolean
}Preview all settings and confirm.
For advanced branding, access /admin/white-label:
- App Name
- Tagline
- Description
- Keywords (SEO)
- Upload logo
- Generate logo with presets
- Color options
- Size options
- Upload favicon source
- Auto-generate all sizes (16x16 to 512x512)
- Apple touch icons
- Android icons
- Primary color picker
- Secondary color
- Accent color
- Background/foreground
- Preset color schemes
- Font family selection
- Font sizes
- Font weights
- Line heights
Customize transactional emails:
- Welcome email
- Password reset
- Email verification
- Notification digest
- Invite email
Full landing page customization:
- Hero section
- Features section
- Pricing section
- Testimonials
- Footer
- Connect your domain
- SSL configuration
- DNS setup instructions
| Preset | Colors | Style |
|---|---|---|
| nself | Indigo/Violet | Clean, modern |
| slack | Purple/Teal | Familiar workspace |
| discord | Blurple/Dark | Gaming-inspired |
| teams | Purple/White | Professional |
| telegram | Blue/White | Messenger style |
| Green/Light | Chat focused | |
| sunset | Orange/Red | Warm tones |
| emerald | Green/Teal | Fresh, nature |
| rose | Pink/Red | Soft, friendly |
| midnight | Blue/Purple | Dark mode |
const customTheme = {
name: 'My Theme',
mode: 'dark',
colors: {
primary: '#ff6b6b',
secondary: '#4ecdc4',
accent: '#ffe66d',
background: '#1a1a2e',
foreground: '#eaeaea',
muted: '#888888',
border: '#333333',
error: '#ff4757',
success: '#2ed573',
warning: '#ffa502',
},
fonts: {
sans: 'Inter, -apple-system, sans-serif',
mono: 'JetBrains Mono, monospace',
},
radius: {
sm: '4px',
md: '8px',
lg: '12px',
full: '9999px',
},
shadows: {
sm: '0 1px 2px rgba(0,0,0,0.1)',
md: '0 4px 6px rgba(0,0,0,0.1)',
lg: '0 10px 15px rgba(0,0,0,0.1)',
},
}import { useTheme } from '@/contexts/theme-context'
function ThemeSwitcher() {
const { theme, setTheme, presets } = useTheme()
return (
<select
value={theme.preset}
onChange={(e) => setTheme({ preset: e.target.value })}
>
{presets.map((p) => (
<option key={p.id} value={p.id}>{p.name}</option>
))}
</select>
)
}| Type | Size | Format | Usage |
|---|---|---|---|
| Main Logo | 200x50px | PNG/SVG | Header |
| Square Logo | 100x100px | PNG/SVG | Sidebar |
| Favicon | 32x32px | ICO/PNG | Browser tab |
| Apple Touch | 180x180px | PNG | iOS |
| Android | 192x192px | PNG | Android |
The built-in logo generator creates logos from:
- Text (app name)
- Icon + text
- Custom icon
- Uploaded image
Options:
- Font selection
- Color scheme
- Background style
- Border radius
Automatically generates:
- favicon.ico (16x16, 32x32)
- favicon-16x16.png
- favicon-32x32.png
- apple-touch-icon.png (180x180)
- android-chrome-192x192.png
- android-chrome-512x512.png
- mstile-150x150.png
| Template | Description |
|---|---|
| Minimal | Login only |
| Simple | Hero + features |
| Marketing | Full marketing site |
| Corporate | Professional business |
| Community | Open source / community |
interface LandingPageConfig {
hero: {
title: string
subtitle: string
ctaText: string
ctaLink: string
backgroundImage?: string
showDemo?: boolean
}
features: {
enabled: boolean
title: string
items: Feature[]
}
pricing: {
enabled: boolean
title: string
plans: Plan[]
}
testimonials: {
enabled: boolean
items: Testimonial[]
}
footer: {
links: FooterLink[]
social: SocialLink[]
copyright: string
}
}| Template | Variables |
|---|---|
| Welcome |
{name}, {appName}, {loginUrl}
|
| Verification |
{name}, {verifyUrl}, {code}
|
| Password Reset |
{name}, {resetUrl}, {expiry}
|
| Invite |
{inviterName}, {channelName}, {joinUrl}
|
| Notification |
{name}, {summary}, {detailsUrl}
|
const emailStyles = {
headerColor: '#6366f1',
headerLogo: 'https://...',
bodyFont: 'Arial, sans-serif',
buttonColor: '#6366f1',
buttonRadius: '4px',
footerText: '© 2024 Your Company',
}const seoConfig = {
title: 'My Chat App - Team Communication',
description: 'The best team chat for your organization',
keywords: ['team chat', 'communication', 'collaboration'],
ogImage: 'https://example.com/og-image.png',
twitterCard: 'summary_large_image',
canonicalUrl: 'https://chat.example.com',
}Automatically generated in <head>:
<title>My Chat App - Team Communication</title>
<meta name="description" content="..." />
<meta property="og:title" content="..." />
<meta property="og:description" content="..." />
<meta property="og:image" content="..." />
<meta name="twitter:card" content="..." />-
Add CNAME record:
chat.yourdomain.com -> your-deployment.vercel.app -
Or A record:
chat.yourdomain.com -> YOUR_SERVER_IP
SSL certificates are:
- Automatic on Vercel
- Let's Encrypt on self-hosted
- Custom for enterprise
NEXT_PUBLIC_APP_URL=https://chat.yourdomain.com# Branding
NEXT_PUBLIC_APP_NAME=My Chat
NEXT_PUBLIC_PRIMARY_COLOR=#ff6b6b
NEXT_PUBLIC_LOGO_URL=https://example.com/logo.png
NEXT_PUBLIC_FAVICON_URL=https://example.com/favicon.ico
NEXT_PUBLIC_TAGLINE=Team communication made easy
# Landing
NEXT_PUBLIC_LANDING_MODE=marketing
NEXT_PUBLIC_SHOW_PRICING=true
# SEO
NEXT_PUBLIC_META_TITLE=My Chat - Team Communication
NEXT_PUBLIC_META_DESCRIPTION=The best team chat...All white-label settings are stored in AppConfig:
const { config, updateConfig } = useAppConfig()
// Update branding
await updateConfig({
branding: {
appName: 'New Name',
logo: '/uploads/new-logo.png',
tagline: 'New tagline',
},
})- localStorage - Fast initial load
- Database - Source of truth
- Environment - Deployment defaults
GET /api/config - Fetch config
POST /api/config - Save config
Before launching your white-labeled app:
- App name set
- Logo uploaded
- Favicon generated
- Color scheme configured
- Theme selected
- Landing page customized
- Email templates updated
- SEO configured
- Custom domain connected
- SSL enabled
- Auth providers configured
- Feature flags set
- Legal pages linked (privacy, terms)