From 0b749350d87061de13adf578b72926d547356f4c Mon Sep 17 00:00:00 2001 From: nxtkofi Date: Fri, 15 May 2026 19:41:49 +0200 Subject: [PATCH] feat(pwa): add lightweight manifest support --- public/pwa/apple-touch-icon.svg | 4 ++++ public/pwa/icon.svg | 4 ++++ public/pwa/maskable-icon.svg | 5 +++++ src/app/layout.tsx | 11 +++++++++++ src/app/manifest.ts | 28 ++++++++++++++++++++++++++++ 5 files changed, 52 insertions(+) create mode 100644 public/pwa/apple-touch-icon.svg create mode 100644 public/pwa/icon.svg create mode 100644 public/pwa/maskable-icon.svg create mode 100644 src/app/manifest.ts diff --git a/public/pwa/apple-touch-icon.svg b/public/pwa/apple-touch-icon.svg new file mode 100644 index 0000000..8c33436 --- /dev/null +++ b/public/pwa/apple-touch-icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/pwa/icon.svg b/public/pwa/icon.svg new file mode 100644 index 0000000..8c33436 --- /dev/null +++ b/public/pwa/icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/pwa/maskable-icon.svg b/public/pwa/maskable-icon.svg new file mode 100644 index 0000000..5df992d --- /dev/null +++ b/public/pwa/maskable-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 8c848b0..a305514 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -14,6 +14,17 @@ const geistMono = Geist_Mono({ subsets: ['latin'], variable: '--font-mono' }); export const metadata: Metadata = { title: 'SaaS Template', description: 'Create SaaS in a day!', + applicationName: 'SaaS Template', + appleWebApp: { + capable: true, + title: 'SaaS Template', + statusBarStyle: 'default', + }, + icons: { + icon: [{ url: '/pwa/icon.svg', sizes: 'any', type: 'image/svg+xml' }], + apple: [{ url: '/pwa/apple-touch-icon.svg', sizes: 'any', type: 'image/svg+xml' }], + other: [{ rel: 'mask-icon', url: '/pwa/maskable-icon.svg' }], + }, }; export default async function RootLayout({ diff --git a/src/app/manifest.ts b/src/app/manifest.ts new file mode 100644 index 0000000..a4fdf9c --- /dev/null +++ b/src/app/manifest.ts @@ -0,0 +1,28 @@ +import type { MetadataRoute } from 'next'; + +export default function manifest(): MetadataRoute.Manifest { + return { + name: 'SaaS Template', + short_name: 'SaaS', + description: 'Create SaaS in a day!', + start_url: '/', + scope: '/', + display: 'standalone', + background_color: '#ffffff', + theme_color: '#09090b', + icons: [ + { + src: '/pwa/icon.svg', + sizes: 'any', + type: 'image/svg+xml', + purpose: 'any', + }, + { + src: '/pwa/maskable-icon.svg', + sizes: 'any', + type: 'image/svg+xml', + purpose: 'maskable', + }, + ], + }; +}