src/config/branding.ts that allows you to customize your application’s visual identity.
Brand Configuration
The brand configuration controls various aspects of your application’s appearance and metadata.Configuration Interface
Default Configuration
The default brand configuration is defined insrc/config/branding.ts:
Customizing Your Brand
1. Update Brand Name
Change the application name:- Email templates
- SEO metadata
- Application manifest
- Email subjects
2. Add Your Logo
Place your logo in thepublic/ directory and update the configuration:
- SVG: Scalable, small file size
- PNG: With transparent background
- WebP: Modern, efficient format
3. Customize Favicon
Update the favicon path:src/app/layout.tsx:
4. Configure Support Links
Add links to your support resources:- Email footers
- Navigation menus
- Legal pages
- Error pages
Theme Configuration
Color Customization
Update the theme colors to match your brand:Using Theme Colors
ShipFree uses TailwindCSS v4 with CSS custom properties. The theme colors frombranding.ts can be integrated with the global stylesheet.
Global CSS Variables
The main theme is defined insrc/app/_styles/globals.css:
Converting Hex to OKLCH
ShipFree uses OKLCH color space for better color consistency. Convert your brand colors:- Use an online converter: https://oklch.com/
- Input your hex color (e.g.,
#701ffc) - Copy the OKLCH value
- Update
globals.css:
Custom CSS
For advanced customization, you can inject custom CSS:public/custom-theme.css:
Using Brand Config in Components
Server Components
UsegetBrandConfig() in Server Components:
Client Components
Use theuseBrandConfig() hook in Client Components:
Email Templates
Brand configuration is used in email templates:Where Brand Config is Used
The brand configuration is automatically integrated throughout ShipFree:1. Email Templates
Location:src/components/emails/
- Welcome emails
- Password reset emails
- OTP verification emails
- Email footers and layouts
2. SEO & Metadata
Location:src/lib/seo.ts
3. Application Manifest
Location:src/app/manifest.ts
4. Error Pages
Location:src/app/not-found.tsx
5. Email Subjects
Location:src/components/emails/subjects.ts
Best Practices
1. Consistent Branding
- Use the same colors across all components
- Maintain consistent logo sizing and spacing
- Keep email branding aligned with web branding
2. Accessibility
- Ensure color contrast meets WCAG AA standards (4.5:1 for text)
- Provide alt text for logos
- Test theme in both light and dark modes
3. Performance
- Optimize logo files (compress images, use SVG when possible)
- Use WebP format with fallbacks
- Load custom CSS asynchronously if large
4. Brand Consistency
- Keep
branding.tsas the single source of truth - Don’t hardcode brand values in components
- Always use
getBrandConfig()oruseBrandConfig()
Example: Complete Rebrand
Here’s a complete example of rebranding ShipFree to “Acme SaaS”:- All email templates
- SEO metadata
- Application manifest
- Navigation and UI components
- Error pages