@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
Markdown
# π @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.