Swoff Swoff

Framework Guides

Framework-specific setup instructions and adapter implementations.

Guides

Step-by-step instructions for integrating Swoff into your framework of choice using the new JSON configuration system.

Available Guides

GuideDescription
React EcosystemHooks, components, and adapter for React applications
Vue EcosystemComposables, components, and adapter for Vue apps
Svelte EcosystemStores, components, and adapter for Svelte projects
Contributing AdaptersHow to build and submit adapters for new frameworks

Configuration

All framework guides now use the new JSON configuration system:

{
  "$schema": "https://swoff.netlify.app/schema/v1.json",
  "enabled": true,
  "version": "from-package",
  "serviceWorker": {
    "strategy": {
      "default": "cache-first",
      "patterns": {
        "/api/*": "network-first",
        "/static/*": "cache-first"
      }
    }
  },
  "features": {
    "mutationQueue": true,
    "pwa": {
      "enabled": true,
      "preventDefaultInstall": false
    }
  }
}

Migration

GuideDescription
Migration GuideMigrate from manual service worker coding to JSON config

Learning Path

Concepts (/docs/concepts/)

Core Architecture (/docs/core/)

Patterns (/docs/patterns/) ← Framework-agnostic code

Integration (/docs/integration/) ← Understand the bridge

Framework Guides (you are here) ← Framework-specific setup

Next Steps

On this page