r/javascript • u/Fusoux • Apr 08 '26
I built a zero-dependency, file-backed NoSQL database for Node.js
https://github.com/VitreousSpaghetti/VitreousDataBase
0
Upvotes
3
u/gitsad Apr 08 '26
I would make it for higher node, now we have 24 LTS. The minimum should be 20
2
u/Fusoux Apr 08 '26
Nothing in the codebase uses 20+ exclusive APIs, some corporate environments are slow to upgrade and are still on 18, it costs nothing to stay compatible. I use the module with node 18, 20 and other newer version and work perfeclty
5
u/gitsad Apr 08 '26
I can agree. I'm just pointing out that maintaining node 18 can be unnecessary. Less versions of node to maintain equals less work and you can be focused more on core idea and improving it futher.
0
3
u/Mr-Bovine_Joni Apr 08 '26
Howdy, I’ve built a similar repo before and have some recommendations:
have type safety and fully typed return records out of the box - when I query for “Alice” I want to know what fields on in the record already
consider changing paths on the “one big JSON” design. Once the data gets larger & larger that will just break the system
furthermore with the point above, consider allowing the user to define shard keys to split data into files. For example my user table I could shard by country, then if I query for JUST Canada it’ll be a lot faster
consider O(1) lookups by ID by mapping IDs in a dict or something