@banditintinc/datavault
v0.7.0
Published
Framework-agnostic smart cache and observer data service. Fetch, cache, map, and broadcast any data source to any consumer — as a library or a microservice.
Maintainers
Readme
DataVault
A framework-agnostic TypeScript data service that acts as a smart cache and observer hub. Fetch, cache, map, and broadcast any data source to any consumer — as an embedded library or a standalone microservice.
Install
npm install @banditintinc/datavaultQuick start
import { DataVault } from '@banditintinc/datavault';
const ds = new DataVault({ storage: 'indexeddb' });
ds.registerDefinition({
key: 'users',
url: 'https://api.example.com/users',
type: 'rest',
cacheTTL: 60_000,
});
ds.get('users', {
id: 'UserList',
onUpdate: (data) => renderTable(data),
});Modes
| Mode | Description | |---|---| | Library | Import directly into any frontend or Node app — runs in-process | | Microservice | Run as a standalone HTTP + WebSocket server — any client connects over the network |
Documentation
Full documentation is available in the Wiki.
| Topic | | |---|---| | Getting started | Getting-Started | | Library mode | Library-Mode | | Microservice mode | Microservice-Mode | | API reference | API-Reference | | Storage adapters | Storage-Adapters |
License
MIT © David Pardini
