Registry / database / velox-database

velox-database

JSON →
library1.0.3jsnpmunverified

High-performance embedded key-value database with proprietary binary format, AES-256-GCM / ChaCha20-Poly1305 encryption, and atomic writes. Current stable version is 1.0.3, which enforces required encryption keys for all databases. Released under MIT license, with TypeScript types included. Uses a Write-Ahead Log (WAL), snapshotting, compaction, and an in-memory LRU cache. Differentiators: zero-config, military-grade encryption, TTL support, ACID transactions, CLI monitoring, and client libraries for PHP, Kotlin, Java, C++. Node.js >=18 required.

npm install velox-database
INSTALL
IMPORT
SIG · VELOX-DATABASE
V
velox-database
databasejavascriptv1.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

VeloxDB
import VeloxDB from 'velox-database'
const VeloxDB = require('velox-database')
ESM-only package since v1.0.0; CommonJS require() will fail.
VeloxDBConfig
import type { VeloxDBConfig } from 'velox-database'
TypeScript type import for configuration object.
VeloxDB (default)
const db = new VeloxDB({ path: './data', encryptionKey: '...' })
const db = new VeloxDB('./data')
In v1.0.3, the constructor expects a configuration object with an encryptionKey; passing a string path without encryptionKey throws an error.
VeloxDB (CLI usage)
npx velox-db --help
npx velox database
The CLI binary is `velox-db`, not `velox-database`.

Initializes VeloxDB with encryption key, inserts a JSON object and a TTL key, reads them back, and closes.

import VeloxDB from 'velox-database'; const db = new VeloxDB({ path: './my-database', encryptionKey: process.env.DB_KEY ?? 'your-strong-encryption-key-min-32-chars-long!!' }); await db.ready(); await db.set('user:1', { name: 'Alice', score: 100 }); const user = await db.get('user:1'); console.log('User:', user); await db.set('session:abc123', { token: 'xyz' }, { ttl: 3600 }); console.log('TTL remaining:', await db.ttl('session:abc123')); await db.close();
Debug
Known issues
breakingv1.0.3 removes default encryption key. encryptionKey is now required.
fix
Provide a strong encryptionKey in the constructor options. Databases created with previous versions cannot be opened without the original key.
affects: >=1.0.3
gotchaConstructor expects an object, not a string path. Passing a string throws an error.
fix
Use new VeloxDB({ path: './data', encryptionKey: '...' }) instead of new VeloxDB('./data').
affects: >=1.0.3
deprecatedDefault encryption key is removed; relying on default is now a breaking error.
fix
Upgrade to v1.0.3 and provide an explicit encryptionKey.
affects: <1.0.3
gotchaThe package is ESM-only and cannot be imported with require().
fix
Use import VeloxDB from 'velox-database' or dynamic import().
affects: >=1.0.0
gotchaCLI command is velox-db, not velox-database.
fix
Run npx velox-db --help for CLI usage.
affects: >=1.0.0
gotchaNode.js >=18 is required; lower versions will fail to load native modules.
fix
Upgrade Node.js to 18.0.0 or higher.
affects: >=1.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module
Using CommonJS require() to load an ESM-only package.
fix
Switch to import statement or use dynamic import().
VeloxDBError: encryptionKey is required
Missing encryptionKey in constructor options (v1.0.3+).
fix
Add encryptionKey to the config object passed to the constructor.
TypeError: db.ready is not a function
Forgot to call db.ready() after construction.
fix
Add await db.ready() before any read/write operations.
Error: Cannot find module 'velox-database'
Package not installed in the current project.
fix
Run npm install velox-database.
Upgrade
Version history
1.0.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
14
Meta
1
OpenAI (training)
1
Resources
velox-database — npm install velox-database · libregistry