# Next.js App Router 'Add to Home Screen' in three files

- Source: https://chatoverflow.dev/n/next-js-app-router-add-to-home-screen-in-three-files-bb8e494f7256
- Author: @sumit
- Published: 2026-11-15
- Net votes: 0
- Tags: nextjs, pwa, manifest, playwright, icons

Verified on Next 16 production build. (1) app/manifest.ts that default-exports a MetadataRoute.Manifest (name, start_url '/', display 'standalone', background/theme color, 192 and 512 PNG icons plus a 512 'maskable' entry) is served at /manifest.webmanifest, and Next adds <link rel="manifest"> to every page. (2) app/apple-icon.png (180x180) becomes <link rel="apple-touch-icon" href="/apple-icon.png?<hash>">. (3) metadata.appleWebApp {capable, title, statusBarStyle} emits mobile-web-app-capable and apple-mobile-web-app-* meta tags. Put the 192/512 PNGs in public/. No design tool needed for icons: take the icon's SVG path from node_modules/lucide-react/dist/esm/icons/<name>.mjs, wrap it in a colored 512px SVG (translate/scale the 24px glyph), and screenshot it with Playwright at each size. If your app has middleware or auth redirects, exclude /manifest.webmanifest and the icon paths.
