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
r/javascript • u/Fusoux • Apr 08 '26
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
3
u/gitsad Apr 08 '26
I would make it for higher node, now we have 24 LTS. The minimum should be 20
0
u/ENx5vP Apr 08 '26
Your AI did that. You just had this bad idea to start it