High-performance encrypted database engine with Node.js SDK
EmojiDB is an embedded database written in Go that encrypts all data, headers, and schemas into emoji sequences. Features automatic binary downloads, schema evolution, and military-grade encryption.
npm install @ikwerre-dev/emojidbThe engine binary is automatically downloaded for your platform (Mac, Linux, Windows).
import EmojiDB from '@ikwerre-dev/emojidb';
const db = new EmojiDB();
await db.connect();
await db.open('my_app.db', 'super-secret-key');Define schemas before storing data to enforce structure and data integrity.
await db.defineSchema('users', [
{ Name: 'id', Type: 0, Unique: true },
{ Name: 'username', Type: 1, Unique: true }
]);| Type ID | Data Type | Example |
|---|---|---|
0 |
Integer | 123 |
1 |
String | "robinson" |
2 |
Boolean | true |
3 |
Float | 10.5 |
4 |
Map | { "a": 1 } |
Schemas are persisted as readable JSON files in emojidb/*.schema.json.
await db.migrate();Syncs all tables from your local emojidb/*.schema.json file.
await db.migrate('users', [...fields]);await db.migrate('users', true);Validates all rows and drops any that don't match the new schema or contain duplicates.
await db.pull();Regenerates local schema files from the current database state.
await db.insert('users', {
id: 1,
username: 'emoji_king',
active: true
});const users = await db.query('users', { id: 1 });
console.log(users);
// Output: [{ id: 1, username: 'emoji_king', active: true }]await db.update('users', { id: 1 }, { username: 'robinson_honour' });await db.delete('users', { id: 1 });const count = await db.count('users', { active: true });await db.dropTable('logs');await db.flush('users');EmojiDB provides military-grade encryption:
- AES-GCM Encryption: All data encrypted at rest
- Emoji Encoding: Ciphertext encoded as emojis for obfuscation
- Master Key Rotation: Built-in support via
db.rekey()
All database artifacts are stored in the emojidb/ directory:
*.db: Encrypted data*.safety: Crash recovery logssecure.pem: Optional master key file
Automated builds for:
- macOS: ARM64 (M1/M2/M3) and Intel x64
- Linux: x64 and ARM64
- Windows: x64 and ARM64
Built by Robinson Honour