One file. A lot less setup.
The custom engine, driver and connection lifecycle travel together. Your users don’t install a separate database.
const BsonLite = require('./BsonLite.cjs');
await BsonLite.connect();
A portable MongoDB-based database for Node.js and Windows.
Store and query BSON documents locally, with native encryption.
One portable file. Automatic engine setup.
const BsonLite = require('bsonlite-sdk');
async function main() {
await BsonLite.connect();
const notes = BsonLite.collection('notes');
// Your application starts here.
}
main().catch(console.error);
Illustrative app preview. BsonLite runs in your Node application.
bsonlite-sdk.The npm package brings BsonLite into your Node.js application. It uses the same connection and collection API as the standalone file.
Run npm i bsonlite-sdk in your project, then import the package and connect. The database engine is included.
npm i bsonlite-sdkconst BsonLite = require('bsonlite-sdk');
async function main() {
await BsonLite.connect('myapp');
// Start your application here.
}
main().catch(console.error);Already using an older BsonLite database? Read the migration guide before upgrading.
Browse collections, filter documents and run queries from BsonLite Console. Install the single .exe setup and open it from your desktop. A terminal CLI is available separately or in the combined bundle.
With the updated BsonLite, start your app, open Console and click Connect. Or enter your own connection URL.

Spend your time on the thing you’re making.
BsonLite brings the local database pieces together,
so your application can get on with it.
The custom engine, driver and connection lifecycle travel together. Your users don’t install a separate database.
const BsonLite = require('./BsonLite.cjs');
await BsonLite.connect();
Collections, BSON values, indexes and aggregation. Use familiar syntax within the bundled engine profile.
const notes = await BsonLite.collection('notes')
.find({ done: false }).toArray();
Live database files and temporary spills are encrypted by the custom native storage engine.
// Encryption is prepared automatically.
await BsonLite.connect();
BsonLite selects a local port and prepares certificates and credentials behind the scenes.
127.0.0.1automaticmTLS + SCRAMawait BsonLite.connect();
const state = BsonLite.status();
Keep application data in your project’s Database folder. The runtime and protected vault live outside it.
private app data// No server address to configure.
await BsonLite.connect();
Create a password-protected backup of a stopped store, then restore to a new location.
// Close the store before creating a backup.
await BsonLite.disconnect();
Write familiar document queries.
Let BsonLite take care of the local setup.
const users = BsonLite.collection('users');
const makers = await users
.find({ role: 'maker', active: true })
.sort({ name: 1 })
.toArray();
[
{
"name": "Alex",
"role": "maker",
"active": true
},
{
"name": "Maya",
"role": "maker",
"active": true
}
]
Sample records only. Run the code in Node.js with BsonLite connected.
A desktop idea, a local tool, your next prototype.
Give it a database that feels at home.
Keep database access in your trusted main process and build an offline interface around it.
Desktop integrationKeep collections, filters and local records close to the application that uses them.
CRUD operationsStart with a few documents. Add indexes and aggregation as your local workflow develops.
Indexes and queriesTry the working starter, see the port and health response, then connect your own modules.
Get the starterInstall the package in your Node.js project.
npm i bsonlite-sdk
One awaited call prepares the engine and its secure local connection.
await BsonLite.connect();
Call a collection from your application modules and start working with data.
BsonLite.collection('notes')
BsonLite on the outside.
A familiar engine underneath.
BsonLite uses a custom MongoDB 9.0.4 engine, so you can use the document queries, indexes and aggregation operators supported by that version and its standalone configuration. BsonLite is an independent project, not an official MongoDB product. The BsonLite manages encryption, connections, backup, migration and shutdown.
Understand the security modelThe modern database is experimental, with a defined engine profile and remaining production validation. Read the exact profile →
Good documentation belongs beside good code.
Everything you need to understand your next step.
From your first connection to the API details.
Start reading Query libraryCopy CRUD, BSON, index and aggregation examples.
Explore examples SecurityThe protection model, evidence and release limits.
Read the model Source & downloadsThe BsonLite, matching engine source and component notices.
Explore the buildThe important details,
without a scavenger hunt.
Keep your data close. Give your next idea a little room.
await BsonLite.connect();If BsonLite helps your work, you can support development, testing and documentation with a coffee. Contributions are optional.
Buy me a coffee