Skip to content

Develop an Origin Private File System (OPFS) caching layer for historical fractional token charts #473

Description

@Damola-Sodiq

Description

Utilize the browser's native OPFS to store megabytes of historical candlestick data locally, drastically reducing payload sizes on return visits to the dashboard.

Architecture & Context

Fetching 5 years of fractional token OHLCV (Open, High, Low, Close, Volume) data continuously wastes user bandwidth and slows down charting. OPFS provides synchronous, near-native file system I/O capabilities directly within a Web Worker.

Technical Requirements

  • Access the OPFS API using a dedicated Next.js Web Worker.
  • Implement a binary serialization format to write historical chart chunks to the local disk.
  • Sync only the missing delta (new blocks) from the backend API on subsequent loads.

Acceptance Criteria

  • Returning users load historical charts with near-zero network payload.
  • OPFS read/write speeds massively outperform standard IndexedDB implementations.
  • Storage quotas are actively monitored and older assets are LRU evicted.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions