Skip to content

BanditIntInc/DataVault

Repository files navigation

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/datavault

Quick 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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors