Nkey is an experimental database project designed to explore data structures such as key-value stores and trees. It starts simple, with fast in-memory CRUD operations, and will evolve to support hierarchies, indexes, and persistence layers.
-
Lightweight in-memory storage
-
File-based JSON persistence
-
Fast CRUD operations (Create, Read, Update, Delete)
-
Key-Value model as the foundation
-
Collections support (multiple logical tables)
Planned support for:
-
Tree-based structures (BST, B-Tree)
-
Indexes for faster queries
-
Fluent API for chaining operations
npm install git+https://github.com/WellizxSilva/nkey.git
# using yarn
yarn add https://github.com/WellizxSilva/nkey.gitUsage examples are avaiable on the docs folder
This project uses Vitest for unit testing. Run the tests with:
npm install
npm run test
# using yarn
yarn install
yarn test✅ In-memory key-value store (MemoryStorage)
✅ Error handling (KeyAlreadyExistsError, KeyNotFoundError)
✅ Unit tests with Vitest
✅ JSON-based persistence (JSONStorage)
✅ Collections support
🔜 Tree structures (BST, B-Tree)
🔜 Indexes for optimized queries
🔜 Fluent API for chaining operations
This repository is intended for study, experimentation, and learning purposes. Feel free to explore, fork, and contribute.