feat(t-paliad-065): firm-agnostic branding via single FIRM_NAME constant
Paliad ships firm-agnostic per CLAUDE.md ("survives firm renames") but
landing copy, email templates, page titles, and form placeholders still
hard-coded "Hogan Lovells" / "HL Patents". Replaces every user-facing
firm reference with a single source of truth: internal/branding.Name on
the server and frontend/src/branding.ts in the bundle, both reading
FIRM_NAME at startup/build time and defaulting to "HLC".
Server: branding package + boot log; auth, invite, admin_users error
strings; courts/offices/models comments; mail templates thread
{{.Firm}} via injected payload default. Files handler keeps the
upstream "HL Patents Style.dotm" path (must match mWorkRepo's blob
name) but renders the user-visible DownloadName from branding.Name.
Frontend: branding.ts read via Bun.build define so process.env.FIRM_NAME
is statically substituted into client bundles (no runtime process
reference); index/login/downloads/kostenrechner/Sidebar/ProjectFormFields
and every i18n.ts string templated against ${FIRM}.
ALLOWED_EMAIL_DOMAINS whitelist intentionally untouched — email
domains and display name rotate independently.
Verified: go build/vet/test clean; bun run build clean; FIRM_NAME=Acme
override produces "Acme" in HTML and JS bundles end-to-end.
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
_ "time/tzdata"
|
||||
|
||||
"mgit.msbls.de/m/patholo/internal/auth"
|
||||
"mgit.msbls.de/m/patholo/internal/branding"
|
||||
"mgit.msbls.de/m/patholo/internal/db"
|
||||
"mgit.msbls.de/m/patholo/internal/handlers"
|
||||
"mgit.msbls.de/m/patholo/internal/services"
|
||||
@@ -27,6 +28,10 @@ func main() {
|
||||
port = "8080"
|
||||
}
|
||||
|
||||
// Surface the firm name in the boot log so a deployer can confirm
|
||||
// FIRM_NAME took effect without curl-ing a rendered page.
|
||||
log.Printf("branding: firm=%q (override with FIRM_NAME)", branding.Name)
|
||||
|
||||
supabaseURL := os.Getenv("SUPABASE_URL")
|
||||
supabaseAnonKey := os.Getenv("SUPABASE_ANON_KEY")
|
||||
if supabaseURL == "" || supabaseAnonKey == "" {
|
||||
|
||||
Reference in New Issue
Block a user