--- ## Part 1 – Turn your current app into a PWA You already have: * `index.html` * `style.css` * `script.js` We’ll add: * `manifest.webmanifest` * `sw.js` * A couple of small changes to `index.html` I’ll assume your app is served from the site root (e.g. `https://mydomain.com/`) and that your icon is a PNG. You can keep everything inside `web/` in your repo; when you deploy, make sure these files end up in the same directory as `index.html`. --- ### 1. Create icons from your existing icon file Chrome expects at least: * **192×192** PNG * **512×512** PNG If your icon file is large enough (e.g. 1024×1024), generate: * `icons/icon-192.png` * `icons/icon-512.png` (Use something like GIMP, Figma, or an online “PWA icon generator”.) Folder structure (in `web/`): ```text web/ index.html style.css script.js sw.js manifest.webmanifest icons/ icon-192.png icon-512.png ``` --- ### 2. Add `manifest.webmanifest` Create `web/manifest.webmanifest`: ```json { "name": "Life Manager", "short_name": "LifeMgr", "description": "Offline-first life organizer with calendar, tags, and backups.", "start_url": "/", "scope": "/", "display": "standalone", "background_color": "#0f1014", "theme_color": "#0f1014", "orientation": "portrait", "icons": [ { "src": "/icons/icon-192.png", "sizes": "192x192", "type": "image/png", "purpose": "any maskable" }, { "src": "/icons/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any maskable" } ] } ``` > `start_url` and `scope` assume the app is at the root. If you serve from `/life-manager/`, change both to `"/life-manager/"`. --- ### 3. Wire manifest + theme color into `index.html` Modify your `
` in `web/index.html` to include the manifest and theme color. Right now you have: ```html