HCL Commerce Version 9.1.18.0 or later

Custom store implementation for PWA

You can build a custom store for Progressive Web Application (PWA) with the required configuration.

The following files are required for configuration:
  • Custom store's manifest.json
  • All static assets referenced in manifest.json

Sample manifest

  1. The following is a sample Ruby manifest.json file, located in the Public/Ruby folder of the Next.js store git bundle.

    {
        "id": "Ruby",
        "version": "1.0.0",
        "short_name": "Ruby",
        "name": "Ruby",
        "description": "Ruby NextJs PWA Store",
        "icons": [
            {
            "src": "/Ruby/favicon-16x16.png",
            "sizes": "16x16",
            "type": "image/png"
            },
            {
            "src": "/Ruby/favicon-32x32.png",
            "sizes": "32x32",
            "type": "image/png"
            },
            {
            "src": "/Ruby/apple-touch-icon.png",
            "sizes": "180x180",
            "type": "image/png"
            },
            {
            "src": "/Ruby/favicon-192x192.png",
            "sizes": "192x192",
            "type": "image/png"
            },
            {
            "src": "/Ruby/favicon-256x256.png",
            "sizes": "256x256",
            "type": "image/png"
            },
            {
            "src": "/Ruby/favicon-512x512.png",
            "sizes": "512x512",
            "type": "image/png"
            },
            {
            "src": "/Ruby/favicon.svg",
            "type": "image/svg",
            "sizes": "any"
            }
        ],
        "screenshots": [
            {
            "src": "screenshot-desktop.png",
            "sizes": "2500x1424",
            "type": "image/png",
            "form_factor": "wide",
            "label": "Home screen of RubyB2B App"
            },
            {
            "src": "screenshot-mobile.png",
            "sizes": "782x1456",
            "type": "image/png",
            "form_factor": "narrow",
            "label": "Home screen of RubyB2B App"
            }
        ],
        "start_url": "/ruby/",
        "display": "standalone",
        "theme_color": "#ffffff",
        "background_color": "#ffffff"
    }
  2. Copy the created static files to the web server in the corresponding deployment folder.

    For example: /SETUP/app/CustomStore

Browser compatibility

Support for the PWA installation prompts varies by browser and platform. For more information, see browser support.