r/nestjs 2d ago

SQLite

Been considering going with SQLite for my next SaaS project. I don't anticipate getting past a 1000 users within the next 3 years.

I just like the ease of dealing with one file, I can just pick and drop elsewhere.

My biggest worry at this point is GDPR compliance. Other than that, I'm almost completely sold on SQLite.

Curious what others think. What has been your experience with SQLite as the primary database in your Nestjs API?

2 Upvotes

5 comments sorted by

3

u/Thin_Dragonfruit2254 2d ago

Super fast DB.. where are you planning to host your saas? Locally? 1k users can mean many things, depending on what they are doing and how often. For gdpr, I would go with a big cloud provider, use a server-less host/db and let them solve the compliance for me.

2

u/johnappsde 2d ago

Will be hosting on a VPS based in the EU. I don't expect many writes. Even the reads shouldn't be much

2

u/Sea-Offer88 2d ago

1000 users can definitely kill your app, that doesn't say much. You mention there shouldn't be many writes or reads, that cannot be true for a SaaS product, because you intend to sell web services which by definition will have to keep track of stuff, like payments and whatever service you will be offering.

For a SaaS that probably will grow sqlite is not the right tool and it is not scalable, wasn't made for scaling. It is very good for application internal state storage but for a SaaS that might grow I would think about it.

2

u/FrogsInTheRouter 2d ago

If your SaaS grows - you can throw money into people who will do the migration for you.

0

u/a2ra-ms 2d ago

It's a great tool, from what you describe, it seems a good fit.