youdata
v0.2.0
Published
YouData is a fast, lightweight, compact single-file embedded database for Node.js with WAL recovery, schemas, transactions, gateways, and CLI tools.
Maintainers
Readme
YouData
YouData is an open-source, single-file embedded database for Node.js. It is built from scratch with a compact append-only binary log, in-memory indexes, deterministic compaction, collections, queries, accounts, an HTTP Gateway, and a global CLI.
Install
npm install youdata
npm install -g youdataLibrary
import { open } from 'youdata';
const db = open('./data/main.ydb');
const users = db.collection('users');
users.set('maycol', { name: 'Maycol', plan: 'free' });
console.log(users.get('maycol'));
console.log(users.find({ plan: 'free' }));
db.createAccount('admin', 'change-this-password', 'admin');
db.gateway({ port: 6380 }).start();CLI
youdata init ./data/main.ydb
youdata stats ./data/main.ydb
youdata compact ./data/main.ydb
youdata account create admin change-this-password admin ./data/main.ydb
youdata gateway 6380 ./data/main.ydb
youdata shell ./data/main.ydbThe file is a portable .ydb binary containing the complete database. Writes are appended for speed. compact removes obsolete records and rebuilds a minimal file without ZIP, GZip, or third-party storage engines.
Design
- Single portable database file
- Custom length-prefixed binary records
- Append-only writes for fast mutation
- In-memory Map indexes for constant-time key access
- Explicit compaction for minimal storage
- Collections with
get,set,add,delete,find,first,count, and iteration - Built-in account credentials and bearer sessions
- Optional HTTP Gateway for external services
- Zero runtime dependencies
License
YouData is distributed under the YouData Personal Use License.
You may use and modify it for personal, private, and non-commercial purposes. Private forks and private copies are allowed. You may not publish, redistribute, sublicense, sell, release, or offer the original or a modified fork as a public package, public service, hosted service, or commercial product.
See LICENSE for the complete terms. Copyright © 2026 SoyMaycol (Zyn).
