Skip to content

Custom Invoice Branding with Logo Upload #403

Description

@Kingsman-99

Description

StellarSplit invoices currently carry only generic platform branding, which makes them unsuitable for professional client-facing use. This issue adds a branding settings screen at /settings/branding where creators can upload a company logo, set a primary accent color, and write a short tagline that is rendered on the invoice view and PDF export. All brand assets must be stored securely and served via a CDN-friendly URL. Branding is scoped per user account and applies to all invoices created by that account.

Technical Context

Create app/settings/branding/page.tsx with a BrandingForm component using react-hook-form and zod validation. Logo upload should POST to app/api/settings/branding/logo/route.ts, which streams the file to an S3-compatible store (or Vercel Blob) and returns a CDN URL. Validate MIME type (image/png, image/jpeg, image/webp) and enforce a 2 MB size cap on the server. Store brand metadata (logoUrl, accentColor, tagline) in the user's settings record via app/api/settings/branding/route.ts. Extend components/invoice/InvoiceView.tsx and the PDF export pipeline to pull brand settings and inject them. The color picker must allow hex input and reject values with insufficient contrast against white (WCAG AA).

Acceptance Criteria

  • Logo upload accepts PNG/JPEG/WebP up to 2 MB; files exceeding the size limit or with unsupported MIME types are rejected with a specific error message before the server is called
  • Uploaded logo appears on the live invoice view at /invoice/[id] and in the PDF export without pixelation at standard print resolution (300 dpi equivalent)
  • Accent color changes are previewed in real time on the branding settings form; colors failing WCAG AA contrast against white are flagged with an inline warning
  • Branding settings persist across page reloads and are applied to all invoices belonging to the authenticated user
  • Removing branding (clearing logo/color/tagline) reverts the invoice view to platform-default styling
  • All CI checks (npm test, npm run build, ESLint/TypeScript) pass and the branch has no merge conflicts

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highuiUI styling and visual changes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions