Installation
OIMDB is published as scoped npm packages. Install only what your project needs.
Core
The core library is required for all other packages:
npm install @oimdb/core
React
npm install @oimdb/react @oimdb/core
Redux Adapter
npm install @oimdb/redux-adapter @oimdb/core redux
Async
For IndexedDB, remote stores, or other async backends:
npm install @oimdb/async @oimdb/core
Persist
@oimdb/persist is the storage-agnostic engine; the concrete storage backends ship as separate packages. Install the engine plus the backend(s) you need:
# in-memory (tests, SSR)
npm install @oimdb/persist @oimdb/persist-memory @oimdb/core
# localStorage
npm install @oimdb/persist @oimdb/persist-localstorage @oimdb/core
# IndexedDB
npm install @oimdb/persist @oimdb/persist-idb @oimdb/core
# JSON dump (SSR dehydrate/hydrate transport)
npm install @oimdb/persist @oimdb/persist-json @oimdb/core
# async key-value (React Native AsyncStorage, Cordova native storage)
npm install @oimdb/persist @oimdb/persist-async-kv @oimdb/core
Snapshot Manager
npm install @oimdb/snapshot-manager @oimdb/core
Requirements
- Node.js 18+ for development (Node 20+ recommended)
- TypeScript 5+ recommended for full type inference
- React 18+ when using
@oimdb/react
Monorepo Development
If you are working on OIMDB itself:
git clone https://github.com/abaikov/oimdb.git
cd oimdb
npm install
npm test
npm run build
Run the documentation site locally:
npm run docs:dev