Hi!
As I was working on a side project, I noticed I wanted to use SQLite like a Document Database on the server.
So I built Doculite. DocuLite lets you use SQLite like Firebase Firestore. It's written in Typescript and an adapter on top of sqlite3 and sqlite.
Reasons:
1) Using an SQL Database meant having less flexibility and iterating slower.
2) Alternative, proven Document Databases only offered client/server support.
3) No network. Having SQLite server-side next to the application is extremely fast.
4) Replicating Firestore's API makes it easy to use.
5) Listeners and real-time updates enhance UX greatly.
6) SQLite is a proven, stable, and well-liked standard. And, apparently one of the most deployed software modules right now. (src: https://www.sqlite.org/mostdeployed.html)
What do you think? Feel free to comment with questions, remarks, and thoughts.
Happy to hear them.
Thanks
The npm sqlite package used to have sqlite3 as a direct dependency in older major versions and most of the support issues were against sqlite3 instead of sqlite. Taking that dependency out and having the user inject it into sqlite instead removed 99% of the support issues. It's also really nice that sqlite has no dependencies at all.
If you go the adapter pattern route, you can support other sqlite libraries like better-sqlite3. Sometimes sqlite/sqlite3 doesn't fit a user's use-case and alternative libraries do.
Same deal with the pub/sub mechanism. You have the Typescript types defined to create abstractions. Would be nice to see adapters for Redis streams / kafka / etc, as in-memory pub/sub may not cut it after a certain point.
Great start on your library!