One portable SDK MongoDB inside Native encryption

Portable Database.
One portable file.

Big ideas shouldn’t need a database installation guide.
Drop BsonLite into your Node project, connect, and build
an offline Windows app with your data close by.

0.6.0-rc.1 · A new little beginning
my-next-idea / index.jsBsonLite.cjs
const BsonLite = require('./BsonLite.cjs');

async function main() {
  await BsonLite.connect();

  const notes = BsonLite.collection('notes');
  // Your application starts here.
}

main().catch(console.error);
My little workspace
My notes3 records
Build something usefulKeep a good idea close.
Make room for offlineYour data, right here.
Find a better workflowA little less setup.
127.0.0.1automatic port

Illustrative app preview. BsonLite runs in your Node application.

Local engine. Secure connection. Your data.
Windows x64Node.js 20+No MongoDB installation
CommonJS + ESMBSON & collectionsEncrypted live filesOffline by design
A little less friction. A lot more building.

Your app should start.
Your database should just be there.

That’s the BsonLite idea.
One file.The SDK you add to your project
No extra install.The MongoDB engine comes along
Offline first.Your data stays close to your app
Keep the good parts. Simplify the setup.

Skip the setup stuff.

Spend your time on the thing you’re making.
BsonLite brings the local database pieces together,
so your application can get on with it.

One file. A lot less setup.

The custom engine, driver and connection lifecycle travel together. Your users don’t install MongoDB.

my-next-idea/
BsonLite.cjs SDK
index.js
Database/ your data
javascript
const BsonLite = require('./BsonLite.cjs');
await BsonLite.connect();
Installation guide

Queries that feel familiar.

Collections, BSON values, indexes and aggregation. Use familiar syntax within the MongoDB 4.0 profile.

notes collection
Build something useful open
Make it work offline open
Find a better workflow done
javascript
const notes = await BsonLite.collection('notes')
  .find({ done: false }).toArray();
Explore collections

Encryption comes along.

Live database files and temporary spills are encrypted by the custom native storage engine.

Your data, encrypted.
XChaCha20-Poly1305 · native storage
javascript
// Encryption is prepared automatically.
await BsonLite.connect();
How protection works

A connection of its own.

BsonLite selects a local port and prepares certificates and credentials behind the scenes.

Local connection illustration
Host127.0.0.1
Portautomatic
AuthenticationmTLS + SCRAM
javascript
await BsonLite.connect();
const state = BsonLite.status();
Connection lifecycle

A store that stays close.

Keep application data in your project’s Database folder. The runtime and protected vault live outside it.

Database/Encrypted live files
Runtime + key vaultprivate app data
javascript
// No server address to configure.
await BsonLite.connect();
Files and storage

Back up. Bring it back.

Create a password-protected backup of a stopped store, then restore to a new location.

MyApp.backupEncrypted backup archive
A separate password. A recovery plan.
javascript
// Close the store before creating a backup.
await BsonLite.disconnect();
Backup and restore
A familiar language for your ideas

Your queries. Your way.

Write the MongoDB code you know.
Let BsonLite take care of the local setup.

javascript
const users = BsonLite.collection('users');

const makers = await users
  .find({ role: 'maker', active: true })
  .sort({ name: 1 })
  .toArray();
Illustrative output

Find matching records

[
  {
    "name": "Alex",
    "role": "maker",
    "active": true
  },
  {
    "name": "Maya",
    "role": "maker",
    "active": true
  }
]

Sample records only. Run the code in Node.js with BsonLite connected.

From idea to first connection

Three little steps.
Then it’s your turn.

01

Drop it in.

Put the SDK beside the JavaScript you’re already building.

BsonLite.cjs
02

Make the connection.

One awaited call prepares the engine and its secure local connection.

await BsonLite.connect();
03

Build your thing.

Call a collection from your application modules and start working with data.

BsonLite.collection('notes')
Under the hood. In the open.

A small API.
The real details.

Real MongoDB at the heart.
A simpler way into your local app.

BsonLite bundles a custom MongoDB engine with native storage encryption. The wrapper manages connection, backup, migration and shutdown.

Understand the security model
  • Encrypted live storageDatabase blocks, journals and temporary spills.
  • Authenticated local accessAutomatic loopback port, mTLS and rotating credentials.
  • A protected key per storeWindows DPAPI CurrentUser protects the vault.

The engine profile0.6.0-rc.1

MongoDB engine4.0.28 · custom native build
Node.js driver6.16.0
Storage engineWiredTiger 3.1.1
Native encryptionlibsodium 1.0.22
SDK version0.6.0-rc.1
Built-in protection
Live filesXChaCha20-Poly1305
Local connectionsMutual TLS + SCRAM-SHA-256
Store keysWindows DPAPI CurrentUser

MongoDB 4.0 is end-of-life. This standalone release candidate has a defined compatibility profile and remaining production validation.Read the exact profile

A few good questions

Glad you
asked.

The important details,
without a scavenger hunt.

Still curious? Say hello

No. The validated CJS embeds the custom engine and required JavaScript dependencies. Your application still needs Node.js 20+ or a compatible packaged runtime.

The distribution is a single SDK file, but its architecture is different. BsonLite starts a separate, authenticated local MongoDB engine. The executable is extracted into private application data.

By default, in ./Database inside your project’s working directory. The protected key vault, extracted engine and temporary TLS sessions stay outside the project in private Windows application data.

It supports queries available in MongoDB 4.0.28 within the configured standalone profile. Server-side JavaScript is disabled. Replica-set transactions, change streams, Atlas Search and newer server operators are outside that profile.

Use an encrypted backup and its password with the matching Windows architecture and engine profile. Copying Database alone does not copy its account-bound data key. Cross-PC restore still requires field validation.

Version 0.6.0-rc.1 has passed the native Windows workflow. It remains a release candidate: clean Windows Home/Pro, packaged desktop apps, power-loss behavior and independent security review remain additional release work. MongoDB 4.0 is end-of-life.

Ready to build something?

Keep your data close. Give your next idea a little room.

await BsonLite.connect();
One portable SDK. A whole lot of possibility.