clone

a deno framework for local-first web apps that open instantly, work offline and sync when users choose

feat/141-effect-library
lofi / docs / recipes / README.md
README.md 2.5K rendered
1# Optional installed-app recipes23These recipes add OS-facing PWA capabilities only when a product has a concrete use case. They are4not part of the generated starter and unsupported browsers keep the normal web experience.56```mermaid7flowchart LR8 Need["Concrete product need"] --> Support{"Support and fallback understood?"}9 Support -- "no" --> Web["Keep the normal web flow"]10 Support -- "yes" --> OptIn["Add manifest/runtime recipe"]11 OptIn --> Validate["Validate external input"]12 Validate --> Test["Test direct, installed, offline, and unsupported paths"]13```1415## Available1617- [Inbound and outbound Web Share](web-share.md) — share text or links through the OS sheet and18 receive an untrusted draft through an optional installed-app share target.19- [Launch handling and client reuse](launch-handler.md) — safely focus or navigate an existing20 installed window while preserving ordinary launch behavior elsewhere.21- [File handling and import previews](file-handler.md) — validate explicitly associated files into22 transient drafts before the user confirms persistence.23- [Custom-protocol item links](protocol-handler.md) — parse one product-owned `web+` scheme into24 allow-listed collaborative-list identifiers without arbitrary redirects.25- [Related-application discovery](related-app-discovery.md) — hide redundant companion onboarding26 from exact verified-app matches without changing authentication or PWA installability.27- [Cross-origin app-window scope](scope-extension.md) — keep product-owned secondary-origin paths28 inside an installed window after reciprocal deployment verification.29- [Desktop window controls overlay](window-controls-overlay.md) — use noncritical titlebar space30 without obscuring system controls, while preserving the standalone layout.3132## Contract for every recipe3334- Keep the capability absent until the application opts in.35- State the product use case and current browser/OS support.36- Feature-detect and preserve a useful ordinary-web fallback.37- Ask for permission only after a user action that explains the value.38- Treat launch payloads, files, URLs, messages, and subscription data as untrusted input.39- Explain whether an install, reinstall, manifest refresh, or worker update is required.40- Test direct browser navigation, installed launch, offline startup, unsupported browsers, malformed41 input, and removal of the capability.4243Foreground recovery remains lofi's portable baseline. A recipe never moves Jazz sync or OPFS into44the service worker without a separate architecture decision.