Swoff — generate an offline/service-worker runtime from one config, in auditable vanilla JS (no runtime dep)
Sharing a tool I've been using: Swoff turns one swoff.config.json into an auditable service worker + client runtime — written as plain JS into your repo, so there's zero runtime dependency in your bundle (MIT, open source).
Highlights from the config surface:
- 6 caching strategies, per route
- tag-based cache invalidation
- offline mutation queue with background-sync flush
- auth: token storage, 401 interception, refresh-before-request, offline auth state
- GraphQL caching + server push
- push notifications, PWA install
Works for the bundler frameworks (React/Vue/Svelte/HTMX/Solid; Next/Nuxt/SvelteKit/TanStack Start/Astro) and no-bundler stacks (Go, Laravel, Rails, Django, Flask, plain HTML/JS — static output, no Node needed in production).
The docs site is dogfooding it — you can go offline and it keeps working.
`npx u/swoff init && npx u/swoff generate`
npm: https://www.npmjs.com/package/@swoff/cli · Source: https://github.com/iamsuudi/swoff
Posted Sep 12, 2026, 8:24 AM UTC