Whitelabel branding via NEXT_PUBLIC env vars: AppLogo component + configurable metadata

brauliogusmao adds a thin branding layer that lets you swap the app name, logo, and HTML metadata via build-time env vars, with no code changes required. Six logo call sites are updated; spinners and status icons are left alone.

brandinginfrastructure

Commit 9dfa9ca introduces frontend/src/config/brand.ts, which reads NEXT_PUBLIC_APP_NAME and NEXT_PUBLIC_LOGO_URL, and a new AppLogo component in frontend/src/components/chat/app-logo.tsx. That component renders either a custom <img> (when LOGO_URL is set) or the original MikeIcon. The six branding-level usages of MikeIcon across AppSidebar, InitialView, TRChatPanel, WorkflowList, the chat page header, and site-logo.tsx are switched over. Loading spinners keep MikeIcon directly, which is the right call.

Commit 4556c94 extends the same pattern to layout.tsx, reading NEXT_PUBLIC_APP_TITLE, NEXT_PUBLIC_APP_DESCRIPTION, and NEXT_PUBLIC_APP_URL to replace hardcoded OpenGraph and Twitter card metadata. APP_TITLE falls back to ${APP_NAME} - Plataforma Jurídica com IA if not set.

All env vars are NEXT_PUBLIC_*, so they get inlined at build time with no server-side config.

Two things to handle before adopting: no .env.example entries are added documenting the new vars, and there's no CSP/image-src treatment for NEXT_PUBLIC_LOGO_URL. If you're pulling in a logo from an external host, verify it's on your img-src allowlist.

So what Worth a look if you're deploying a whitelabeled instance. The abstraction is minimal, the call-site changes are mechanical to audit, and all six logo swaps are in one commit. Add the vars to your `.env.example` and check image CSP before shipping.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

2 commits from brauliogusmao/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
9dfa9ca9 feat: centraliza configuração de marca em brand.ts + componente AppLogo Braulio Gabriel Gusmao 2026-05-12 ↗ GitHub
commit body
Cria src/config/brand.ts com NEXT_PUBLIC_APP_NAME e NEXT_PUBLIC_LOGO_URL.
Cria AppLogo que renderiza imagem customizada ou o ícone SVG padrão.
Substitui usos de MikeIcon como logo nos componentes de interface;
usos como spinner/status permanecem com MikeIcon.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4556c948 feat: título da aba do navegador configurável via variáveis de ambiente Braulio Gabriel Gusmao 2026-05-12 ↗ GitHub
commit body
Substitui metadados hardcoded por NEXT_PUBLIC_APP_TITLE,
NEXT_PUBLIC_APP_DESCRIPTION e NEXT_PUBLIC_APP_URL. Usa NEXT_PUBLIC_APP_NAME
como fallback para o título quando APP_TITLE não for definido.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-387.md from inside the repo you want the changes in.

⬇ Download capture-thread-387.md