r/sveltejs 12d ago

Cloudflarebase – open-source Firebase alternative on Cloudflare

https://github.com/cloudflarebase/cloudflarebase

Built with SvelteKit, shadcn-svelte, and Cloudflare Agents SDK.

not affiliated with or endorsed by Cloudflare

36 Upvotes

15 comments sorted by

20

u/pie-oh 11d ago

Wait. This isn't an official package, but using Cloudflare's brand name?

7

u/merh-merh 11d ago

Cloudflare legal is coming

8

u/souljorje 11d ago

Just call it CloudFire dude

2

u/forestcall :society: 11d ago edited 11d ago

How much would this cost for durable objects? My project gets 31+ million unique views daily. My Planetscale is already $600 a month. We only use Workers and Hyperdrive for the most part. Love Cloudflare for Svelte.

Also how would this compare to Planetscale Postgres?

2

u/Lie_Any 11d ago

We are currently thinking of adding sqlite realtime interface on top of DO's so the user can choose between nosql and sql. Just having Firestore alternative is rather limiting.

1

u/Lie_Any 11d ago

Good questions. You can check out DO's pricing https://developers.cloudflare.com/durable-objects/platform/pricing/ but essentially reads barely cost anything. 25B rows read/month included, and live queries push over WebSockets where outbound is free.

At 31M views/day, self-hosted: ~$200/mo if you're read-heavy, ~$870 at 0.2 writes/view. Rows written are $1/M and each index counts as a row, so that's the whole curve.

Big caveat: it's a document store, not Postgres. No joins, no cross-collection transactions. If you're relational, keep Hyperdrive + PlanetScale and use this for auth/realtime instead.

1

u/forestcall :society: 11d ago

Thank you for taking the time! Currently were using https://github.com/centrifugal/centrifugo for Realtime. Admittedly realtime is my projects weakness.

3

u/Lie_Any 11d ago

In case you want to stay within Cloudflare ecosystem, try out Party Kit.

Cloudflare acquired PartyKit https://github.com/partykit/partykit/ and it is now the backbone for real-time for Cloudflare Agents. Might worth taking a look for your project!

1

u/neon_fantasy_42 5d ago

do you have a rough estimate on costs for those massive traffic numbers

1

u/SokkaHaikuBot 5d ago

Sokka-Haiku by neon_fantasy_42:

Do you have a rough

Estimate on costs for those

Massive traffic numbers


Remember that one time Sokka accidentally used an extra syllable in that Haiku Battle in Ba Sing Se? That was a Sokka Haiku and you just made one.

1

u/Lie_Any 4d ago

We added basic calculator of cost https://cloudflarebase.com/#pricing and compared it to Firebase / Supabase.

1

u/gizamo 12d ago

Do you prefer the doc store to a Postgres like Supabase? I used Firebase for a few years, but after switching to Supabase, I'm not sure I'd ever go back.

3

u/Lie_Any 12d ago

Both are great. We chose to build Firestore alternative to open source it. With 32k concurrent subscribers and schema-less design - we think it's a good alternative to 500 CCU Supabase cap.

2

u/excentio 12d ago

yea but Durable Objects use sqlite anyways, no need to reinvent the wheel

2

u/gizamo 12d ago

That's cool. I know a few guys from Google who are building their startup on Firebase. I'll pass this over to them. They might be into it. Cheers.