Open sscarduzio opened 7 months ago
That is a really nice idea. There are a couple of setbacks but it's certainly worth exploring.
Nonetheless, I do like that approach. I'll explore it some more and report back 😊
Thanks!
Another approach would probably be "DB" and "Server" Adapters so you could swap around the backend and DB as you like.
E.g. on Cloudflare the D1 (sqlite) and R2 (S3) are free up to a huuuge amount of requests and memory. Also you can host on Pages and use 100k Worker calls a day for free.
If I could deploy to Cloudflare by just linking this repo and creating an D1 and R2 this would be a no brainer.
I think this could actually be done fairly easy since svelte supports many hosting solutions out of the box. The DB adapters should be just some config and interfaces + class impls really.
@domlen2003 I agree making the db more agnostic so it can work with D1, etc is worth exploring. I looked into removing the db altogether and it's not feasible mainly because of the "max downloads" variable that needs to be incremented.
Why did you need the database at all? Available files could just be pulled by S3. Every file in S3 has metadata you can fill with extra info if needed. If you drop Postgres this can be a frontend only tool, quite neat.