Files
zeekay 7f4c5ae88e feat(brand): create @safe-global/brand workspace
Exposes a Brand type and a default brand object whose values match
upstream Safe strings. Per-brand builds override via NEXT_PUBLIC_BRAND_*
(web) or EXPO_PUBLIC_BRAND_* (mobile) env vars.

Single source of truth for product name, URLs, support contacts, and
asset paths. No 'Safe' / 'safe.global' literal lives in apps/ or
packages/*/src/ once the codemod passes land.
2026-05-15 02:46:09 -07:00
..

@safe-global/brand

White-label brand tokens for the Safe wallet monorepo.

Why

The Safe wallet codebase is the upstream OSS reference. Lux Safe, Hanzo Vault, and future partner builds all ship from the same source. To keep them in lock- step we keep brand strings (product name, URLs, support contacts, asset paths, primary color) out of the source — they live here, in one file, behind one type — and per-brand builds override them via env vars.

Shape

import { brand } from '@safe-global/brand'

brand.name // "Safe{Wallet}"  (or "Lux Safe", "Hanzo Vault", …)
brand.domain // "safe.global"
brand.email // "[email protected]"
brand.helpUrl // "https://help.safe.global"
brand.logoUrl // "/images/safe-logo-green.png"
brand.primaryColor // "#12FF80"

See src/index.ts for the full Brand interface.

Setting brand values at build time

Web uses NEXT_PUBLIC_BRAND_*, mobile uses EXPO_PUBLIC_BRAND_*. The brand module reads whichever is set, so a single env file can drive both apps.

# apps/web/.env.lux
NEXT_PUBLIC_BRAND_NAME="Lux Safe"
NEXT_PUBLIC_BRAND_DOMAIN="safe.lux.network"
NEXT_PUBLIC_BRAND_EMAIL="[email protected]"
NEXT_PUBLIC_BRAND_HELP_URL="https://help.lux.network"
NEXT_PUBLIC_BRAND_LOGO_URL="/brand/lux/logo.svg"

The repo ships three sample env files in apps/web/:

  • .env.safe — upstream Safe defaults (sanity check)
  • .env.lux — Lux Safe
  • .env.hanzo — Hanzo Vault

scripts/select-brand.sh <slug> copies the selected env file and the matching asset directory into place, then the normal Next build picks them up.

Rule

There is exactly one way to render the product name. It is brand.name. There is no 'Safe' string literal in source files. If you find one, replace it.