Company Branding Logo (Live from BCYIP)
Version: 3.0.0 Date: 2026-05-07
Goal: White-label logo on login and sidebar, always reflecting the live company.customization.logo from BCYIP — no stale copy in activation.token.
Solution: Public GET /api/v1/branding endpoint calls BCYIP /user, normalises the logo to a data URL, and returns it. UI caches for 3 minutes and refreshes on window focus.
Features:
- Public
GET /api/v1/branding(no Tower JWT required) - Logo follows BCYIP admin changes after cache TTL or window focus
- Falls back to default SVG on any failure or missing logo
Implementation Details:
company-logo.tsnormalises Mongoose buffer JSON and various logo encodings- React Query
staleTime: 3 minutes,refetchOnWindowFocus: true tower.apiuses a local session key string to avoid circular import withlogin.tsx
Files Modified:
src/protocol/bcyip/company-logo.ts,src/protocol/bcyip/company-logo.spec.ts- Logo normalisationsrc/protocol/bcyip/api.ts-fetchCompanyBrandingsrc/core/data/data.service.ts- Branding integrationsrc/app.controller.ts- Public branding endpointui/src/protocol/branding.api.ts- Axios call (no session)ui/src/components/atoms/BrandingLogo.tsx- React componentui/src/components/layout/Sidenav.tsx- Logo in sidebarui/src/pages/login/login.tsx- Logo on login screenpackage.json,package-lock.json,ui/package.json,ui/package-lock.json- Snyk fixes (uuid@11.1.1, axios@^1.15.2, overrides for follow-redirects/immutable/picomatch/yaml)