DEV Community

Alex Devson
Alex Devson

Posted on

fjsondb — A Tiny JSON File Database for When SQLite Is Overkill

Sometimes you need to store data, but setting up a full database feels like bringing a cannon to a knife fight. You just want to save some JSON to a file and read it back later.

fjsondb is a zero-dependency JSON file database. It stores your data as plain JSON files — human-readable, easy to debug, and trivially portable.

Why Use a JSON File Database?

  • 📁 Data stored as readable JSON files
  • 🚫 No database server to install or manage
  • 🔧 No schema migrations
  • 🪶 Zero dependencies
  • ⚡ Perfect for config storage, caching, small datasets

Use Cases

  • CLI tools that need persistent settings
  • Prototypes where a real DB is premature
  • Small apps with < 10k records
  • Testing where you want human-readable test data
  • Scripts that need to remember state between runs

How It Works

Simple API — initialize with a file path, then read/write JSON objects. The data is stored as formatted JSON, so you can even edit it by hand if needed.

No ORM, no query language, no connection pooling. Just your data in a file.

When NOT to Use This

  • High-concurrency multi-user apps
  • Datasets larger than a few MB
  • Complex relational queries
  • Production web servers with heavy traffic

For everything else? fjsondb is perfect.

Get Started

GitHub: github.com/p32929/fjsondb


By @p32929 — because not every project needs PostgreSQL.

Top comments (0)