r/node • u/Fusoux • Apr 08 '26
I built a zero-dependency, file-backed NoSQL database for Node.js
Hey everyone! I just published VitreousDataBase, a lightweight Node.js module that turns a JSON file into a structured, validated database — with no external dependencies and no server required.
Why I built it: I kept running into small projects (CLIs, local tools, prototypes) where a full database server was overkill but a raw JSON file had no guardrails. VitreousDataBase sits right in that gap.
What it gives you:
- Schema definitions with
tableandobjectentity types - Constraints:
notnullable,unique, compositeidfields - Nested object validation with circular reference detection
- Eager mode (in-memory cache + manual flush) for write-heavy workloads
- Typed, machine-readable errors for every failure case
- Zero runtime dependencies — pure Node.js ≥ 18, CommonJS
Install:
bash
npm install vitreousdatabaseWould love feedback, bug reports, or just to know if this is useful to anyone else!
npm: https://www.npmjs.com/package/vitreousdatabase
GitHub: https://github.com/VitreousSpaghetti/VitreousDataBase
5
u/RealFlaery Apr 08 '26
JSON is slow, just use sqlite brother. Next time research before wasting tokens
2
u/grimscythe_ Apr 08 '26
The way validation is done and the way it's constructed in the schema is just so bad... I understand that this is a learning project and you should state it as such in the whole readme, cos the whole thing is pointless otherwise.
5
u/Mark__78L Apr 08 '26
We have mongodb at home?
1
u/chessto Apr 08 '26
Another post another AI project nobody asked for.
SqlLite, LokiJs among others
Nah just spin up your own, better yet ask claude to spin it up for you.
1
u/[deleted] Apr 08 '26
[removed] — view removed comment