Strato-DB is a NoSQL-hybrid database for Node.js (≥16.4) that combines schemaless JSON storage with traditional SQLite, adding optional Event Sourcing. Current version 3.11.1 is used in production with multi-GB databases and <1ms query times when well-indexed. Classes include DB, JsonModel, EventSourcingDB, ESModel, and EventQueue. It ships TypeScript definitions for type-checked CRUD. Alternatives like better-sqlite3 offer raw SQL access, while Strato-DB provides a higher-level API with event sourcing patterns. Released under MIT.
npm install strato-dbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an in-memory SQLite DB, registers a JsonModel, inserts and searches a record.
Use import statements instead of require.
Import specific symbols: import { DB, JsonModel } from 'strato-db'Avoid relying on verbose output; implement custom logging.
Use a single process or implement external locking for event queue.
Add "type": "module" to package.json or use .mjs extension.
Use named import: import { DB } from 'strato-db'Ensure each model has a unique name, or use migrations to handle schema changes.