Branding
Rebrand the app in one pass from a single source of brand constants.
Soar Electron ships with literal starter branding on purpose: app id
com.soarstarter.electron, product name Soar Electron, slug soar-electron,
and deep-link scheme soar-electron://. Your commercial app should replace
those values early, then verify the native surfaces that depend on them.
Source of truth
Application code reads brand identity from shared/constants.ts. Both Electron
processes and the renderer import this file instead of scattering brand strings
through the app.
Prop
Type
Two static files cannot import TypeScript: electron-builder.yml and
package.json. The rebrand script keeps them in sync with the constants.
One-pass rebrand
Run pnpm rebrand from the template root. Every flag is optional; the script
rewrites only the values you pass.
pnpm rebrand \
--name "Acme" \
--app-id com.acme.app \
--slug acme \
--scheme acme \
--repo https://github.com/acme/app \
--email support@acme.comAdd --dry-run to preview the files that would change without writing them:
pnpm rebrand --name "Acme" --scheme acme --dry-run--homepage and --license are optional. When omitted, they are derived from
--repo.
pnpm rebrand rewrites exactly three files together:
shared/constants.ts, electron-builder.yml, and package.json.
What stays manual
The script handles identity values, not every brand asset. Finish the pass by updating these manually:
| Item | Where |
|---|---|
| App and tray icons | resources/build/icon.svg and resources/build/tray/icon-template.svg; follow docs/APP_ICONS.md to regenerate PNG, ICNS, and ICO outputs. |
| Screenshots and demo media | Replace any product screenshots you keep after removing the Showcase. |
| Locale copy | Update app/locales/{en,zh}/... so names, support text, and onboarding copy match your product. |
| Supabase redirect URLs | Add the new scheme in Supabase Authentication URL Configuration, for example acme://. |
| Billing success bounce | Point Creem/Supabase success URLs at the new scheme, for example acme://billing. |
| Legal content | Set EULA_URL / EULA_VERSION, replace license links, and review CREDITS.md. |
Icons
Icon source files live under resources/build/. Edit only the SVG sources, then
regenerate derived assets:
cd resources/build
sips -s format png --resampleHeightWidth 512 512 icon.svg --out icon.pngdocs/APP_ICONS.md contains the full command set for icon.icns, icon.ico,
macOS menu-bar template icons, and Windows/Linux tray icons. Packaged builds let
electron-builder auto-detect resources/build/icon.{icns,ico,png}.
Verify
After rebranding, run the normal gate and at least one unpacked build:
pnpm format:check
pnpm lint:check
pnpm typecheck
pnpm test
CSC_IDENTITY_AUTO_DISCOVERY=false pnpm build:unpackThen check the native identity:
- The main window title and About page show the new
APP_NAME. electron-builder.ymluses the newappId,productName, executable name, and protocol scheme.- The installer/app artifact uses the new slug.
- The Windows AppUserModelID still matches
APP_ID. - A packaged app opens the new deep link, for example
acme://settings.
