Providers
@katlux/providers is the isomorphic data and caching layer for Katlux applications. It abstracts HTTP communication, client/server state management, and pluggable cache strategies into a unified ADataProvider interface that all data-consuming components accept.
Description
Manage data fetching, pagination, filtering and sorting across flat and tree structures. Choose from four variants per data type: Client-local, Server-local, API-client, and API-server — all sharing the same reactive interface.
Plug-in caching backends with a single option. Available strategies: Memory, Session, LocalStorage, IndexedDB, Cookie, Application (server-side), or register your own custom cache strategy.
The underlying HTTP engine powering all API-based data providers. Supports deduplication, queuing, cache-key namespacing, and SSR cookie forwarding.
Persistent PWA offline mutation queue supporting IndexedDB, LocalStorage, and Memory backends with FIFO flushing and dead-letter error handling.
Framework-agnostic tag registry mapping providers to resource tags. Automatically refreshes GET data upon mutation completion.
Zero-dependency, hardware-accelerated AES-256-GCM client-side encryption pipeline. Protects sensitive data (PII, financial records, GDPR-regulated fields) by encrypting payloads before transmission and decrypting transparently on the client. Features an SSR security guard (decryptOnSSR: false) that prevents plaintext from ever entering server memory or SSR transfer payloads.
Install the providers package alongside the core toolkit:
Then configure Nuxt to transpile and auto-import from @katlux/providers:
Import the provider class you need, call setAPIUrl() or setData(), and pass the instance directly to any data-consuming component.