Sometimes you don't need Postgres. Sometimes you don't even need SQLite. You just need to store some JSON and read it back. That's fjsondb.
What Is It?
A fast, file-based JSON database for Node.js. No server, no configuration, no dependencies. Just your data in a JSON file.
Why?
- Prototyping and you need persistence NOW
- Small tools that don't justify a real database
- Configuration storage
- Local caching
- Any project where "just use a JSON file" is the right answer
Usage
import { FJsonDB } from 'fjsondb';
const db = new FJsonDB('mydata.json');
// Write
await db.set('users.john', { name: 'John', age: 30 });
// Read
const john = await db.get('users.john');
// Delete
await db.delete('users.john');
That's it. No schema, no migrations, no ORM. Just get/set/delete.
Features
- ⚡ Fast — file I/O with intelligent caching
- 📦 Zero dependencies — just Node.js
- 🔑 Dot notation — nested paths like
users.john.email - 💾 Persistent — survives restarts
- 🔒 Atomic writes — no corrupted files
- 📝 TypeScript — full type support
When NOT to Use This
- Multi-user applications
- Data larger than ~100MB
- Complex queries or relations
- Production databases with high concurrency
For everything else, fjsondb is probably all you need.
👉 GitHub: https://github.com/p32929/fjsondb
What's your go-to for quick-and-dirty data storage in Node.js?
Top comments (0)