We've all been there. You're starting a small CLI tool, a quick prototype, or a personal side project. You just need to store some data.
Then comes the dilemma:
- SQLite? A bit too much boilerplate for a 1-hour project.
- MongoDB? Setting up a server/atlas for 10 entries feels like overkill.
- Simple JSON file? Great, but now you’re manually writing fs.readFileSync and you have zero security or structure.
That's why I built SnapJSON.
💡 What is SnapJSON?
SnapJSON is an open-source library for Node.js that lets you use simple JSON files as a data store, but with the power and developer experience (DX) of a real ORM.
It’s designed to be zero-config, but unlike a simple JSON wrapper, it handles the "heavy lifting" for you.
✨ Key Features
🔐 Built-in Encryption (AES-256-GCM)
Security shouldn't be an afterthought. SnapJSON includes native support for AES-256-GCM encryption. Your local files are not just stored; they are protected.
🔗 Collection Relations
Managing relationships between JSON files usually involves messy loops and filters. SnapJSON allows you to define and query relations between collections effortlessly.
⚡ Zero Configuration
No database servers, no Docker containers, no complex connection strings.
npm install snapjsonand you're ready to go.
🚀 Why use it?
Prototyping: Move fast without worrying about DB migrations.
CLI Tools : Perfect for storing user configs or local state securely.
Small Apps: When a full DB engine is just too much.
🙏 I need your feedback!
This project is open-source and I’m looking for early adopters to test the API.
What features are missing?
How can I improve the relationship handling?
Check it out on NPM:here
If you find the project useful, feel free to leave a ⭐ on the repo! It helps a lot.
#nodejs, #javascript, #opensource, #cli, #orm.
Top comments (0)