Deeb - JSON Database
Prounced how you like, Deeb is an Acid(ish) Compliant JSON based database for small websites and fast prototyping.
Inspired by flexibility of Mongo and light weight of SqLite, Deeb is a tool that turns a set of JSON files into a light weight database.
Deeb's ability to turn groups JSON files into a database allows you to simply open a json file and edit as needed.
Check out the quick start below, or the docs to learn more.
Quick Start
- Add Deeb to your
Cargo.tomlfile
- Optionally, Create a JSON file for your database. Deeb will also create one for you if you like.
Terminology
- Instance: A single .json file managed by Deeb. Each instance can store multiple entities and serves as a lightweight, self-contained database.
- Entity: Similar to a table (SQL) or collection (MongoDB), an entity groups documents of a consistent type within an instance.
- Document: An individual record within an entity. Documents are stored as JSON objects and represent a single unit of data (e.g., a user, message, or task).
- Create a deeb instance and perform operations.
use *;
use json;
use Error;
async
Features
- ACIDish Compliant: Deeb is an ACIDish compliant database. We get close as we can for a light weight JSON based DB.
- JSON-Based Storage: Deeb uses lightweight JSON files as the underlying data store, providing human-readable structure and seamless integration with any system that speaks JSON.
- Schemaless: Deeb doesn't require a predefined schema like traditional SQL or strongly-typed NoSQL databases. However, by using Rust generics, you can enforce type safety at compile time. This means Deeb stays flexible at runtime, while giving you confidence at build time.
- Transactions: Perform multiple operations as a single unit — commit them all at once or roll them back if something fails.
- Querying: Deeb supports querying, nested queries, and combination queries.
Roadmap
- Basic CRUD Operations
- Transactions
- Indexing
- Querying
- Migrations
- Benchmarks
- Associations
- Documentation
- Tests
- Examples
- Logging
- Error Handling
- CI/CD
- Improve Transactions - Should return updated object instead of Option
- Implement traits and proc macros to streamline usage -
User.find_many(...)