4
3 Comments

Anyone Using Sanity Instead of Firebase?

The next app I'm building is on the edge between something that could be built in a CMS and something that needs to be custom. I started to lay out the data model in Firestore, but it feels like I'm going to be reinventing a CMS.

I looked at Sanity and it looks super close to everything I need. You can do joins and all kinds of stuff that's still a pain in Firstore and you'd get the CMS backend for free.

Has anyone went down the road of trying to use Sanity instead of Firstore? My thought was to continue to use Firebase Auth and Analytics and move everything else to Sanity. I think you could even manage users and stuff there too by firing off cloud functions to write to it on create.

Saw no blogs about it so I'm guessing there's something I'm missing. Any advice would be appreciated!

posted to Icon for group Developers
Developers
on July 29, 2020
  1. 2

    Sanity is great because it gives so much straight out the box but on the free plan you are limited to 100k API calls per month (0r 500K to the CDN API) vs 20k per day on Firebase. If you run out of free quota, or switch to a higher plan, Sanity becomes quite a bit more expensive.

    I worked on a project earlier this year switching a client from Sanity over to Firebase because they wanted to reduce and group costs. However, if your can fit into a Sanity plan (particularly the free one) it's a solid choice.

    1. 2

      That makes sense. If we see the same success with this product that we did with its sibling then we'll blast through that pretty fast. Reckon I'll stick with what I know for now so I'm not locked in.

  2. 1

    I work a lot with Sanity and it's a great product for content that doesn't change often - the customization options, flexible and easy API, amazing image pipeline and great editing UI make it my go-to option for every marketing / content / e-commerce website I stumble across.

    That said, I think it's still pretty weak for apps supporting user data. Like scoticus said above, you'll have higher costs, and won't have authentication baked-in. Write operations are also a bit slow and wouldn't be as smooth as Firestore.

    Last year I built an app that mixed both: Firestore for user data, and Sanity for company-generated content (it was a paid directory of articles, videos and audios). Worked pretty well and the client is happily paying $0/pm, so that may be an option for you. Just be sure to use cached API requests or maybe query Sanity data during build time if you intend to have huge amounts of traffic.

Trending on Indie Hackers
This Week in AI: The Gap Is Getting Clearer User Avatar 45 comments 1 small portfolio change got me 10x more impressions User Avatar 28 comments AI Is Destroying the Traditional Music Business and Here’s Why. User Avatar 22 comments A Tiny Side Project That Just Crossed 100 Users — And Somehow Feels Even More Real Now User Avatar 13 comments From 1k to 12k visits: all it took was one move. User Avatar 11 comments Tell me what your business does, I’ll show you the growth loops you’re probably missing. User Avatar 10 comments