https://github.com/dinoscapeprogramming/syncstore
A lightweight, auto-saving JSON store using Proxy in Node.js.
https://github.com/dinoscapeprogramming/syncstore
Last synced: 3 months ago
JSON representation
A lightweight, auto-saving JSON store using Proxy in Node.js.
- Host: GitHub
- URL: https://github.com/dinoscapeprogramming/syncstore
- Owner: DinoscapeProgramming
- License: mit
- Created: 2025-05-31T23:24:21.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-01T08:07:53.000Z (about 1 year ago)
- Last Synced: 2025-08-09T16:57:37.988Z (11 months ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SyncStore
**SyncStore** is a minimalist, zero-dependency JSON store for Node.js that automatically syncs changes to disk using JavaScript's Proxy. Perfect for prototyping, small tools, and local data persistence.
## 🚀 Features
- 🔁 Auto-saves to file on every change
- ⚡ In-memory caching for fast access
- 🪞 Fully proxied — just use it like a normal object
- 🧩 Zero dependencies
## 📦 Installation
```bash
npm install syncstore.json
```
## 🛠️ Usage
```js
const SyncStore = require("syncstore.json");
const db = new SyncStore("./data.json");
// Use it like a regular object
db.username = "Alice";
db.settings = { darkMode: true };
delete db.username;
console.log(db.settings.darkMode); // true
```
All changes are saved immediately to `data.json`.
## 📁 File Format
The backing file is standard JSON:
```json
{
"settings": {
"darkMode": true
}
}
```
## ✅ Use Cases
* CLI tools
* Quick local apps
* Prototyping databases
* Config or settings storage
## 📜 License
MIT © DinoscapeProgramming