This commit is contained in:
Stefan Lazic committed 2026-08-04 09:57:58 +01:00
1 parent 546613e677
commit 4785510144
82 files changed
+4903 -287

No files matched your search

+20 -10
View File
@@ -1,22 +1,32 @@
import type { MetadataRoute } from "next";
import { getBranding } from "@/lib/business/branding";
/**
* Next.js's manifest file convention — auto-served at /manifest.webmanifest
* with the <link rel="manifest"> tag injected automatically, so nothing in
* layout.tsx needs to reference this directly. Single business per
* deployment (see docs/implementation-plan.md), so the name/colors are
* static rather than read from the Business row.
* with the <link rel="manifest"> tag injected automatically. Dynamic as of
* Phase 8: name/description/colors reflect the installed business (see
* src/lib/business/branding.ts) rather than the internal product name.
*
* `icons` intentionally stays pointed at the app's own pre-generated,
* correctly-sized/maskable PWA icon set rather than a business's single
* `appIconUrl` — there's no image-processing pipeline in this app to
* derive the required 192/512/maskable variants from one arbitrary
* uploaded URL (see docs/phase-8-summary.md, "Known limitations"), so
* this is fallback rule #2 ("business name + a neutral generated icon"),
* applied deliberately rather than risking a broken/non-square install
* icon.
*/
export default function manifest(): MetadataRoute.Manifest {
export default async function manifest(): Promise<MetadataRoute.Manifest> {
const branding = await getBranding();
return {
name: "NextChair — Barber Booking",
short_name: "NextChair",
description: "Book your next barber appointment in seconds — services, staff and loyalty rewards in one place.",
name: branding.name,
short_name: branding.shortName,
description: branding.description || "Book your next appointment in seconds.",
start_url: "/home",
scope: "/",
display: "standalone",
background_color: "#f4f6f4",
theme_color: "#111b15",
background_color: branding.backgroundColor,
theme_color: branding.themeColor,
orientation: "portrait-primary",
icons: [
{ src: "/icons/icon-192.png", sizes: "192x192", type: "image/png", purpose: "any" },