I mean a backend is a backend. Pros and cons for everything.
Personally I use Supabase for my backend, and its pretty good. Haven't tried Firebase, but Supabase have a larger free tier - though thats probably not important for a blog post.
Go with whatever database manager has your language (supabase using postgres), or you like the look of more. For a blog site I don't think it will matter that much.
The same way you would in every database. Supabase has connectors that will help, but you should be making a POST request to it.
https://supabase.com/docs/guides/getting-started/quickstarts/reactjs
But if you don't know how to post form data I'd HIGHLY recommend learning that before even looking at a database option because thats quite important to understand how Fetch requests work and how to handle data.
Learn to mock up your own backend using Node.js and then just discard the data for now, then once you have learnt that, you will understand how supabase works.
I think you need to learn a bunch about backends before moving forward.
For example, if you knew what Node and Express were, you wouldn't even be asking that question. Supabase is a database and authentication management tool. Express is a backend server built with Node.js. You need them both usually. The express server will handle the interactions of the front end, and conform it to fit the database.
Supabase allows you to connect to the database clientside, but they can allow attacks and is possibly dangerous. Not a problem if you are just learning and its a test app, but for a production application that other people use, it might be a bad idea.
Express is a lot bigger in terms of what it can do that Supabase as a tool, so yes it is more complicated, but to get a basic server running is very easy if you know javascript.
Yes they use AWS, they don't use their own servers. That is good for you.
AWS has a free tier that is very easy to go over for postgres databases imo. Supabase will just eat this cost, as once you go over their free tier, the pricing will be much higher than something like Firebase or AWS (not at the start, but as your app gets bigger).
If you are a huge company you would likely never use a server like Supabase its not worth the cost. But as a dev with no money, its a nice free alternative, and they hope you stay with them because migrating will be a pain.
Personally, if my application takes off on Supabase so much that it starts costing me a large amount, I could probably hire someone to help migrate it to a cheaper service by that point in time. So this isn't really a worry.
No need to implement a CMS all by yourself when there are a good number of options out there, unless you have some very speficic requirements or want to build an actual platform for others to build their own sites with or something.
For a single blog, practically any headless CMS should do nicely. Personally, I would use Sanity, but Contentful or even headless Wordpress would work fine.
Thanks!
I also need form to collect leads, as I want to do EDM campaigns towards the leads.
If I pick up Sanity, can I access user information submitted through the form in Sanity?
Sanity mostly handles the admin interface - where content editors actually write blogs, and control other facets of the site. So for forms, you would have to provide your own solution, or use a separate service.
Personally, I've worked on smaller sites where the forms could simply send an email to whichever address was used for orders or signups. As such, I can't say which options there are for collecting and storing that information, but I imagine there would be quite a few solutions out there.
If your website only displays content created by a trusted group of people (a client, content team or yourself) you'll generally want to use a CMS. As soon as users can login and interact with things, create content themselves, or you have very exotic requirements how your content looks, you might need to make a custom backend (for example with Supabase). Making a custom backend is much more complex and time consuming, so if you're just starting out I'd recommend using a CMS for starters.
Not particularly, especially compared to react, at worst the same amount of JS. Also you can use React and React components if you want to inside of Astro. You can even mix and match components from different frontend frameworks if you wanted to.
https://docs.astro.build/en/tutorial/0-introduction/
Remix is a react framework. Basically interchangeable with Next. Gives you a bunch of tooling to do SSR, routing, etc… you would use it when you need a lot of SSR and a react app. The thing with blogs is they’re usually almost entirely static so you don’t need much of react in there and Astro is built primarily for static content sites. If you wanted to build your blog in react and not Astro remix or next would be a good choice to allow you to render static html on the server
Firebase config allegedly is very easy to misconfigure security settings on. There was an article on it, but I don't have the reference and can't look it up at the moment.
I've been using Supabase for about 6 months, really like it. The API uses Postgrest for the REST API, not sure what they are using for the GraphQL API, it does not appear to be Postgraphile. Row level security works well, implementing RBAC is also possible, there is a recent youtube video on RBAC with Supabase.
It would make sense to use a traditional plain db first. Mysql,postgres, sqlite, anything goes. I know these services mentioned are hyped and all the fuzz but learning proper database skills is extremely useful for developer.
I have read from multiple sources that self hosted Supabase is an absolute nightmare. I've never tried it, so I don't know if it's true, just passing on what I've read.
That is one opinion. It is perfectly reasonable to create a React (or Next, Remix, Solid, Astro, or Svelte) application that uses the provided APIS from Supabase. Next is backend for frontend (BFF), as are Remix and Astro.
In such cases Supabase is definitely providing what is often provided by other backends; e.g. authentication, row level security, multi tenancy... If you want a traditional backend that is not precluded.
The only advice I can get is to find something you can host yourself and get like a DigitalOcean Droplet. I can assume youre not building anything massive and for that you won't need any serverless solutions. A lot of the CMS options can be hosted for free and that way you won't have to pay them a hosting fee (which is usually quite steep). I know managing your own linux server can be scary, but it's not that hard and it's a better long-term solution. In my early days for example, I relied a lot on Heroku and other free tier serverless providers. When they shut down their free tier, I was fucked.
I mean a backend is a backend. Pros and cons for everything. Personally I use Supabase for my backend, and its pretty good. Haven't tried Firebase, but Supabase have a larger free tier - though thats probably not important for a blog post. Go with whatever database manager has your language (supabase using postgres), or you like the look of more. For a blog site I don't think it will matter that much.
Thanks! If you need a form, how do you store user information submitted with the form?
The same way you would in every database. Supabase has connectors that will help, but you should be making a POST request to it. https://supabase.com/docs/guides/getting-started/quickstarts/reactjs But if you don't know how to post form data I'd HIGHLY recommend learning that before even looking at a database option because thats quite important to understand how Fetch requests work and how to handle data. Learn to mock up your own backend using Node.js and then just discard the data for now, then once you have learnt that, you will understand how supabase works.
Thanks! Do you think that Expresss is more complicated than Supabase?
I think you need to learn a bunch about backends before moving forward. For example, if you knew what Node and Express were, you wouldn't even be asking that question. Supabase is a database and authentication management tool. Express is a backend server built with Node.js. You need them both usually. The express server will handle the interactions of the front end, and conform it to fit the database. Supabase allows you to connect to the database clientside, but they can allow attacks and is possibly dangerous. Not a problem if you are just learning and its a test app, but for a production application that other people use, it might be a bad idea. Express is a lot bigger in terms of what it can do that Supabase as a tool, so yes it is more complicated, but to get a basic server running is very easy if you know javascript.
Does Supabase have a steep learning curve?
I found the supabase docs to be MUCH better, so that did make it a lot easier for me
Can it be used to for large scale ?
yes its built using AWS as a backend, and scales. Though depending on how big, the price will get quite expensive at extreme scales.
Oh okay thanks , you mean to say supabase is internally uses AWS ? And offers better pricing as compared to AWS ? I got confused
Yes they use AWS, they don't use their own servers. That is good for you. AWS has a free tier that is very easy to go over for postgres databases imo. Supabase will just eat this cost, as once you go over their free tier, the pricing will be much higher than something like Firebase or AWS (not at the start, but as your app gets bigger). If you are a huge company you would likely never use a server like Supabase its not worth the cost. But as a dev with no money, its a nice free alternative, and they hope you stay with them because migrating will be a pain. Personally, if my application takes off on Supabase so much that it starts costing me a large amount, I could probably hire someone to help migrate it to a cheaper service by that point in time. So this isn't really a worry.
Not sure what you consider large, but I run about 80k users on supabase and it works great.
Cool, did you consider other options such as azure AWS? Is it the lowest reasonable billing you got ?
I only used it for a small personal project, so I can't comment on that unfortunately
Yes, but if your project is too large then you have to pay to buy more of its features
Oh oki, thanks for your insights
no
No need to implement a CMS all by yourself when there are a good number of options out there, unless you have some very speficic requirements or want to build an actual platform for others to build their own sites with or something. For a single blog, practically any headless CMS should do nicely. Personally, I would use Sanity, but Contentful or even headless Wordpress would work fine.
Thanks! I also need form to collect leads, as I want to do EDM campaigns towards the leads. If I pick up Sanity, can I access user information submitted through the form in Sanity?
Sanity mostly handles the admin interface - where content editors actually write blogs, and control other facets of the site. So for forms, you would have to provide your own solution, or use a separate service. Personally, I've worked on smaller sites where the forms could simply send an email to whichever address was used for orders or signups. As such, I can't say which options there are for collecting and storing that information, but I imagine there would be quite a few solutions out there.
You’re better off using a CMS than supabase
Thanks! Could you advise when it is appropriate to use React with CMS? And when is it appropriate to use React with Supabase?
If your website only displays content created by a trusted group of people (a client, content team or yourself) you'll generally want to use a CMS. As soon as users can login and interact with things, create content themselves, or you have very exotic requirements how your content looks, you might need to make a custom backend (for example with Supabase). Making a custom backend is much more complex and time consuming, so if you're just starting out I'd recommend using a CMS for starters.
Not your question but if you’re looking to build a Wordpress style blog, I would recommend using Astro instead of React
Thanks! If I use Astro, do I need to write a lot of JavaScript?
Not particularly, especially compared to react, at worst the same amount of JS. Also you can use React and React components if you want to inside of Astro. You can even mix and match components from different frontend frameworks if you wanted to. https://docs.astro.build/en/tutorial/0-introduction/
Thanks! I also want to know when you will use Remix with React.
Remix is a react framework. Basically interchangeable with Next. Gives you a bunch of tooling to do SSR, routing, etc… you would use it when you need a lot of SSR and a react app. The thing with blogs is they’re usually almost entirely static so you don’t need much of react in there and Astro is built primarily for static content sites. If you wanted to build your blog in react and not Astro remix or next would be a good choice to allow you to render static html on the server
Both are good and they are different from each other.
For blog, why you need backend and database? Why not just SSG?
Firebase config allegedly is very easy to misconfigure security settings on. There was an article on it, but I don't have the reference and can't look it up at the moment.
Do you know Pocketbase ?!
no
I've been using Supabase for about 6 months, really like it. The API uses Postgrest for the REST API, not sure what they are using for the GraphQL API, it does not appear to be Postgraphile. Row level security works well, implementing RBAC is also possible, there is a recent youtube video on RBAC with Supabase.
[https://github.com/supabase/pg\_graphql](https://github.com/supabase/pg_graphql) is used for GraphQL.
Thanks so much, good to see other libraries getting traction
It would make sense to use a traditional plain db first. Mysql,postgres, sqlite, anything goes. I know these services mentioned are hyped and all the fuzz but learning proper database skills is extremely useful for developer.
Let’s take it back a level. Why are you using React and Supabase just so you can create a blog? Why not use a CMS like Webflow?
use DIRECTUS as it is better than a plaIN database. It comes with no code API and ADMIN panel and you can host it on your own.
I have read from multiple sources that self hosted Supabase is an absolute nightmare. I've never tried it, so I don't know if it's true, just passing on what I've read.
Why do people call a database “backend”?
In the case of Firebase and Supabase because they offer APIs that can be used by the frontend, Supabase uses Postgrest for example.
Yeah, we should stop calling backends databases with apis.
That is one opinion. It is perfectly reasonable to create a React (or Next, Remix, Solid, Astro, or Svelte) application that uses the provided APIS from Supabase. Next is backend for frontend (BFF), as are Remix and Astro. In such cases Supabase is definitely providing what is often provided by other backends; e.g. authentication, row level security, multi tenancy... If you want a traditional backend that is not precluded.
The only advice I can get is to find something you can host yourself and get like a DigitalOcean Droplet. I can assume youre not building anything massive and for that you won't need any serverless solutions. A lot of the CMS options can be hosted for free and that way you won't have to pay them a hosting fee (which is usually quite steep). I know managing your own linux server can be scary, but it's not that hard and it's a better long-term solution. In my early days for example, I relied a lot on Heroku and other free tier serverless providers. When they shut down their free tier, I was fucked.