From 1f7d1f4eea4260de24cae9606ead6e126496d58a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 17 Jan 2026 09:20:55 +0000 Subject: [PATCH] feat: add full PWA support with manifest, icons, and iOS install prompt - Added `app/manifest.ts` to generate `manifest.webmanifest`. - Created placeholder PWA icons in `public/`. - Implemented `components/pwa/ios-install-prompt.tsx` for iOS users. - Added a basic Service Worker in `public/sw.js` and registration component `components/pwa/sw-registration.tsx` to satisfy Android installation criteria. - Updated `app/layout.tsx` with PWA metadata and registration components. --- app/layout.tsx | 13 +++++ app/manifest.ts | 34 ++++++++++++ components/pwa/ios-install-prompt.tsx | 73 ++++++++++++++++++++++++++ components/pwa/sw-registration.tsx | 22 ++++++++ public/icon-192.png | Bin 0 -> 3131944 bytes public/icon-512.png | Bin 0 -> 3131944 bytes public/icon-maskable.png | Bin 0 -> 3131944 bytes public/sw.js | 14 +++++ 8 files changed, 156 insertions(+) create mode 100644 app/manifest.ts create mode 100644 components/pwa/ios-install-prompt.tsx create mode 100644 components/pwa/sw-registration.tsx create mode 100644 public/icon-192.png create mode 100644 public/icon-512.png create mode 100644 public/icon-maskable.png create mode 100644 public/sw.js diff --git a/app/layout.tsx b/app/layout.tsx index a092d4fe..abd33a83 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -10,6 +10,8 @@ import { Sidebar } from '@/components/sidebar' import { Analytics } from "@vercel/analytics/next" import { SpeedInsights } from "@vercel/speed-insights/next" import { Toaster } from '@/components/ui/sonner' +import { IosInstallPrompt } from '@/components/pwa/ios-install-prompt' +import { SwRegistration } from '@/components/pwa/sw-registration' import { MapToggleProvider } from '@/components/map-toggle-context' import { ProfileToggleProvider } from '@/components/profile-toggle-context' import { CalendarToggleProvider } from '@/components/calendar-toggle-context' @@ -36,6 +38,15 @@ export const metadata: Metadata = { metadataBase: new URL('https://www.qcx.world'), title, description, + appleWebApp: { + capable: true, + statusBarStyle: 'default', + title: 'QCX' + }, + icons: { + icon: '/icon-192.png', + apple: '/icon-192.png' + }, openGraph: { title, description @@ -87,6 +98,8 @@ export default function RootLayout({