Meet your new little database.
MongoDB-powered storage for offline Windows apps, with a smaller setup story.
What is BsonLite?
BsonLite is a Node.js SDK that packages a custom MongoDB 4.0.28 engine, the MongoDB 6.16.0 Node driver, connection management and encryption into one BsonLite.cjs file. Your app uses familiar MongoDB collections and queries. The SDK starts a separate local engine process behind that API.
The current version is 0.6.0-rc.1, a tested Windows x64 release candidate. It is designed for offline desktop applications and local Node.js backends. Customers do not separately install MongoDB, compilers, libsodium, EFS or BitLocker.
Your first connection
const BsonLite = require('./BsonLite.cjs');
async function main() {
await BsonLite.connect();
// Start your server or desktop application here.
}
main().catch(error => {
console.error(error.code, error.message);
process.exitCode = 1;
});Place the validated SDK beside your entry file. A name is optional. Startup prints connection status and the chosen database port; it does not insert or print your documents.
A simple mental model
- BsonLite.cjs is the SDK you distribute with your Node application.
- Database/ holds the project data and metadata. Live data files are natively encrypted.
- The executable, account-protected key vault and temporary TLS files live outside the project, in private Windows application data.
- Your application queries ordinary BSON values in memory through an authenticated, mutually encrypted local connection.
The engine is embedded in the SDK and extracted privately to execute. BsonLite is not an in-process engine like SQLite, and the CJS is not a standalone executable.
Where to go next
Read Installation to run the starter, Connection lifecycle to share a database across files, and CRUD operations for your first records. The Query library has searchable copyable examples with illustrative sample results. See Compatibility before choosing BsonLite for a production application.
Documentation for BsonLite 0.6.0-rc.1. View SDK source · Download the validated SDK