Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

pwa-storefront

БесплатноБез исполняемых скриптовНе проверен

Turn your store into an installable Progressive Web App with offline product browsing, push notifications, and home screen access for mobile shoppers

finsilabsот finsilabs★ 69 звёзд на GitHub

Об этом скилле

PWA Storefront

Overview

A Progressive Web App (PWA) storefront combines the reach of the web with native-app-like capabilities: offline catalog browsing, push notifications, home screen installation, and fast repeat loads from cache. Service workers intercept network requests and implement caching strategies that keep the store functional on flaky connections. This skill covers implementing a service worker with Workbox, creating a Web App Manifest, caching product catalogs, and sending push notifications for order updates.

When to Use This Skill

  • When your customers are in regions with unreliable mobile internet connectivity
  • When you want to enable "Add to Home Screen" for higher re-engagement rates without a native app
  • When repeat page loads should be instant by serving assets from cache
  • When you want to send push notifications for order status updates, back-in-stock alerts, or promotions
  • When building a mobile-first storefront that needs to compete with native apps in UX quality

Prerequisites & Platform Notes

This skill is written for custom/headless storefronts (Node.js, Python, or similar backend). The code examples use TypeScript/Node.js and can be adapted to any stack.

Shopify: Shopify Hydrogen is Shopify's headless framework. MACH/composable patterns apply when using Shopify as the commerce backend with a custom frontend, or when mixing Shopify with other best-of-breed services. WooCommerce: WooCommerce can serve as a headless backend via its REST API and WPGraphQL. These patterns apply when decoupling the frontend from WordPress. Magento: Magento's GraphQL API and PWA Studio support headless architectures. These composable patterns apply to Magento as a backend service in a MACH stack.

You'll need:

  • Node.js 18+ (or adapt to your backend language)
  • PostgreSQL (or your preferred relational database)
  • Redis for caching/queues
  • An email sending service (SendGrid, AWS SES, or Postmark)
  • CDN (Cloudflare, CloudFront, or Fastly)

Core Instructions

  1. Create the Web App Manifest

    The manifest makes the app installable on Android and iOS (iOS has partial support):

    // public/manifest.json
    {
      "name": "My Commerce Store",
      "short_name": "MyStore",
      "description": "Fast, reliable shopping from anywhere",
      "start_url": "/?source=pwa",
      "display": "standalone",
      "background_color": "#ffffff",
      "theme_color": "#1a1a2e",
      "orientation": "portrait-primary",
      "icons": [
        { "src": "/icons/icon-72x72.png", "sizes": "72x72", "type": "image/png" },
        { "src": "/icons/icon-192x192.png", "sizes": "192x192", "type": "image/png", "purpose": "any maskable" },
        { "src": "/icons/icon-512x512.png", "sizes": "512x512", "type": "image/png", "purpose": "any maskable" }
      ],
      "screenshots": [
        { "src": "/screenshots/home.png", "sizes": "390x844", "type": "image/png", "form_factor": "narrow" }
      ],
      "categories": ["shopping"],
      "share_target": {
        "action": "/search",
        "method": "GET",
        "params": { "title": "q" }
      }
    }
    

    Link in your HTML:

    <link rel="manifest" href="/manifest.json">
    <meta name="theme-color" content="#1a1a2e">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="default">
    <link rel="apple-touch-icon" href="/icons/icon-192x192.png">
    
  2. Register a service worker with Workbox

    npm install workbox-webpack-plugin
    # or for Vite:
    npm install vite-plugin-pwa
    

    Using vite-plugin-pwa (recommended for Vite/Next.js projects):

    // vite.config.ts
    import {VitePWA} from 'vite-plugin-pwa';
    
    export default {
      plugins: [
        VitePWA({
          registerType: 'autoUpdate',
          workbox: {
            globPatterns: ['**/*.{js,css,html,svg,png,webp,woff2}'],
            runtimeCaching: [
              {
                urlPattern: /^https:\/\/fonts\.googleapis\.com/,
                handler: 'CacheFirst',
                options: {cacheName: 'google-fonts-cache', expiration: {maxAgeSeconds: 60 * 60 * 24 * 365}},
              },
              {
                urlPattern: /\/api\/products/,
                handler: 'StaleWhileRevalidate',
                options: {
                  cacheName: 'products-cache',
                  expiration: {maxEntries: 500, maxAgeSeconds: 60 * 60 * 24}, // 24h
                  cacheableResponse: {statuses: [0, 200]},
                },
              },
              {
                urlPattern: /\/api\/collections/,
                handler: 'NetworkFirst',
                options: {
                  cacheName: 'collections-cache',
                  networkTimeoutSeconds: 3,
                  expiration: {maxEntries: 50, maxAgeSeconds: 60 * 60},
                },
              },
            ],
          },
          manifest: {/* inline manifest or path */},
        }),
      ],
    
Полный SKILL.md на GitHub

Установить pwa-storefront в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

claude-code
cursor
gemini-cli
copilot
codex-cli
kiro
opencode

Вложенные файлы

evals/push-notifications-and-offline-ux/criteria.jsonevals/push-notifications-and-offline-ux/task.mdevals/service-worker-caching-strategies/criteria.jsonevals/service-worker-caching-strategies/task.mdevals/web-app-manifest-and-installability/criteria.jsonevals/web-app-manifest-and-installability/task.mdtile.json

FAQ

Что делает скилл pwa-storefront?

Turn your store into an installable Progressive Web App with offline product browsing, push notifications, and home screen access for mobile shoppers

Как установить скилл pwa-storefront?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл pwa-storefront запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить pwa-storefront с