Web App Manifest Setup for PWA
Web App Manifest — JSON file describing app for browser and OS. Defines icons, name, colors, orientation and install behavior.
Complete manifest.json
{
"name": "TechnoStore — buy electronics online",
"short_name": "TechnoStore",
"description": "Smartphones, laptops, accessories. Fast delivery.",
"start_url": "/?utm_source=pwa&utm_medium=manifest",
"scope": "/",
"display": "standalone",
"display_override": ["window-controls-overlay", "standalone"],
"orientation": "any",
"theme_color": "#1a73e8",
"background_color": "#ffffff",
"lang": "en",
"dir": "ltr",
"categories": ["shopping", "lifestyle"],
"icons": [
{
"src": "/icons/icon-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any"
},
{
"src": "/icons/icon-192-maskable.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/icons/icon-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any"
},
{
"src": "/icons/icon-512-maskable.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
],
"screenshots": [
{
"src": "/screenshots/catalog-mobile.webp",
"sizes": "390x844",
"type": "image/webp",
"form_factor": "narrow",
"label": "Product catalog"
},
{
"src": "/screenshots/product-mobile.webp",
"sizes": "390x844",
"type": "image/webp",
"form_factor": "narrow",
"label": "Product card"
},
{
"src": "/screenshots/catalog-desktop.webp",
"sizes": "1280x800",
"type": "image/webp",
"form_factor": "wide",
"label": "Catalog — desktop"
}
],
"shortcuts": [
{
"name": "Cart",
"short_name": "Cart",
"url": "/cart?utm_source=pwa",
"icons": [{ "src": "/icons/cart-96.png", "sizes": "96x96", "type": "image/png" }]
},
{
"name": "Search",
"short_name": "Search",
"url": "/search?utm_source=pwa",
"icons": [{ "src": "/icons/search-96.png", "sizes": "96x96", "type": "image/png" }]
}
],
"protocol_handlers": [
{
"protocol": "web+technoshop",
"url": "/products?q=%s"
}
]
}
HTML connection
<head>
<link rel="manifest" href="/manifest.json">
<!-- iOS — Safari doesn't read manifest for these params -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="TechnoStore">
<!-- iOS icons -->
<link rel="apple-touch-icon" href="/icons/apple-touch-icon-180.png">
<link rel="apple-touch-icon" sizes="152x152" href="/icons/apple-touch-icon-152.png">
<link rel="apple-touch-icon" sizes="120x120" href="/icons/apple-touch-icon-120.png">
<!-- iOS splash screens (optional) -->
<link rel="apple-touch-startup-image"
media="(device-width: 390px) and (device-height: 844px)"
href="/splashscreens/iphone12.png">
<!-- Windows tile -->
<meta name="msapplication-TileColor" content="#1a73e8">
<meta name="msapplication-TileImage" content="/icons/icon-144.png">
<meta name="theme-color" content="#1a73e8">
</head>
Display modes
| Value | Description |
|---|---|
browser |
Normal browser tab |
minimal-ui |
Minimal navigation elements |
standalone |
Without address bar, like native app |
fullscreen |
Full screen without browser UI |
display_override — array with priority: browser chooses first supported. window-controls-overlay — for Desktop PWA shows custom titlebar.
Maskable icon
Maskable icon adapts to shape (circle, square, squircle). Important: icon content must be in safe zone — central circle 80% of size.
Check: maskable.app — upload icon and see how it looks in masks.
Dynamic manifest for multilingual site
// routes/web.php
Route::get('/manifest.json', [ManifestController::class, 'index']);
// ManifestController.php
public function index(Request $request): JsonResponse
{
$locale = app()->getLocale();
$manifest = [
'name' => __('pwa.name'),
'short_name' => __('pwa.short_name'),
'description' => __('pwa.description'),
'start_url' => "/?lang={$locale}&utm_source=pwa",
'lang' => $locale,
'theme_color' => '#1a73e8',
'background_color' => '#ffffff',
'display' => 'standalone',
'scope' => '/',
'icons' => $this->getIcons(),
'shortcuts' => $this->getShortcuts($locale),
];
return response()->json($manifest)
->header('Content-Type', 'application/manifest+json');
}
Validation
- Chrome DevTools → Application → Manifest — all fields, icons, installability
- Lighthouse → PWA — check all requirements
- PWABuilder.com — full audit and App Store packages
Setup time: several hours for correct manifest with all icon sizes.







