UNPKG

@trap_stevo/star-vault

Version:

Unleash the future of data management with the ultimate platform for secure, scalable, and dynamic data operations. Power the next generation of applications by combining advanced encryption, revolutionary real-time querying, and seamless synchronization

93 lines (65 loc) β€’ 2.46 kB
# πŸš€ @trap\_stevo/star-vault **Unleash the future of data management** with the ultimate platform for secure, scalable, and dynamic data operations. Power the next generation of applications by combining advanced encryption, revolutionary real-time querying, and seamless synchronization to create an ecosystem where data transforms into action. --- ## 🌌 Features - πŸ” **Optional Encryption** – Secure sensitive data at rest with `SecurityCore` - βš™οΈ **Sharded Storage Engine** – Efficiently scales writes across shards - 🧠 **In-Memory Caching** – High-speed read layer with `StarCache` - πŸ“œ **Write-Ahead Logging** – Resilient logs with rotation and retention policies - πŸ” **Advanced Query Engine** – Chainable and expressive queries with filtering, search, sorting, and spatial support - πŸš€ **Real-Time Event Emission** – Listen to data changes with fine-grained control - πŸ›‘οΈ **Authentication Layer** – Optional handler to authorize every operation - 🌠 **Collection Wildcards** – Seamlessly operate across multiple collections --- ## ✨ Getting Started ### Installation ```bash npm install @trap_stevo/star-vault ``` ### Basic Usage ```js const StarVault = require("@trap_stevo/star-vault"); const vault = new StarVault( "./data", "./logs", 4, "869MB", "1w", { enableEncryption : true, masterKey : "supersecretkey", authHandler : (auth) => auth.token === "valid-token" } ); vault.create("users", { id : "001", name : "Nova" }, { source : "init" }, { token : "valid-token" }); ``` --- ## πŸ“ˆ Querying ```js const results = vault.query("users") .where({ role : "admin" }) .sort({ name : 1 }) .select(["id", "name"]) .limit(10) .execute(); ``` --- ## 🎧 Listening to Changes ```js vault.listen("create", "users/*", (path, data) => { console.log("New user created:", path, data); }); ``` --- ## 🌐 Wildcard Collection Queries ```js vault.query("logs/*/2025") .recent("timestamp", "7d") .execute(); ``` --- ## ✨ License See License in [LICENSE.md](./LICENSE.md) --- ## πŸš€ Transform Data into Action StarVault transcends traditional data systemsβ€”offering a full-fledged database engine and cosmic foundation that propels secure, reactive, and intelligent data-driven architectures.