# OPFS Resources

## Knowledge

- [web.dev: Storage for the web](https://web.dev/articles/storage-for-the-web)
  Authoritative FE map: Cache Storage for network/load resources; OPFS for file-based content; IndexedDB for other data; quotas, eviction, persistent storage. Use for: when-to-choose framing and storage spectrum.
- [web.dev: The origin private file system](https://web.dev/articles/origin-private-file-system)
  Core OPFS guide (Thomas Steiner): origin-private virtual FS vs user-visible FS; `navigator.storage.getDirectory()`; create/read/write/delete; main thread vs worker; `FileSystemSyncAccessHandle`. Use for: primary mental model and API map.
- [MDN: Origin private file system](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system)
  Browser-facing OPFS overview: privacy to origin, root handle, async vs sync paths. Use for: normative vocabulary and quick reference.
- [MDN: StorageManager.getDirectory()](https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/getDirectory)
  Entry point that returns the OPFS root `FileSystemDirectoryHandle`. Use for: “how do I open OPFS at all?”
- [MDN: File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API)
  Handle types (`FileSystemFileHandle`, `FileSystemDirectoryHandle`, sync access handle) and how OPFS sits in the broader API. Use for: API surface map.
- [MDN: FileSystemFileHandle.createSyncAccessHandle()](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/createSyncAccessHandle)
  High-performance in-place read/write; dedicated workers + OPFS files. Use for: worker performance lesson.
- [MDN: Browser storage limits and eviction criteria](https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria)
  Quotas and eviction. Use for: design-review “will this stick?” (cross-check with storage-for-the-web).
- [web.dev: Persistent storage](https://web.dev/articles/persistent-storage)
  Best-effort vs persistent; how to request durability. Use for: deal-breaker lesson on eviction.
- [File System Living Standard (WHATWG)](https://fs.spec.whatwg.org/)
  Spec for file system handles and OPFS. Use for: edge-case verification when MDN/web.dev disagree or are thin.
- [Chrome blog: SQLite Wasm backed by OPFS](https://developer.chrome.com/blog/sqlite-wasm-in-the-browser-backed-by-the-origin-private-file-system)
  Real-world “why OPFS exists” (high-throughput DB-as-file). Use for: motivation and secondary deep-dive only — not lesson 1 required reading.
- [web.dev: The File System Access API](https://web.dev/articles/file-system-access)
  User-visible pickers (`showOpenFilePicker`, etc.). Use for: contrast only — not the OPFS storage endpoint.

## Wisdom (Communities)

- [Stack Overflow — [filesystem] + browser / OPFS keywords](https://stackoverflow.com/questions/tagged/filesystem)
  Production edge cases (handles, Safari support, worker-only sync). Use for: failure modes — verify against MDN/spec.
- [r/webdev](https://www.reddit.com/r/webdev/) and [r/PWA](https://www.reddit.com/r/PWA/)
  Product-context tradeoffs (offline files vs IDB blobs). Use for: second opinions; treat as anecdotes.
- [whatwg/fs issues](https://github.com/whatwg/fs/issues)
  Spec discussion and browser gaps. Use for: “is this still evolving?” when APIs behave differently across engines.

## Gaps

- DevTools OPFS inspection is still uneven; Chrome’s OPFS Explorer extension is a practical workaround (see web.dev OPFS article). Note when teaching debug.
- Storage Buckets API is still evolving; mention only if multi-tier eviction design becomes mission-critical.
- Full SQLite-wasm production setup is out of mission scope unless the learner wants a dedicated follow-on.
