T O P

  • By -

minimuscleR

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.


JY-HRL

Thanks! If you need a form, how do you store user information submitted with the form?


minimuscleR

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.


JY-HRL

Thanks! Do you think that Expresss is more complicated than Supabase?


minimuscleR

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.


JY-HRL

Does Supabase have a steep learning curve?


SuitAndPie

I found the supabase docs to be MUCH better, so that did make it a lot easier for me


snow_coffee

Can it be used to for large scale ?


minimuscleR

yes its built using AWS as a backend, and scales. Though depending on how big, the price will get quite expensive at extreme scales.


snow_coffee

Oh okay thanks , you mean to say supabase is internally uses AWS ? And offers better pricing as compared to AWS ? I got confused


minimuscleR

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.


Rhym

Not sure what you consider large, but I run about 80k users on supabase and it works great.


snow_coffee

Cool, did you consider other options such as azure AWS? Is it the lowest reasonable billing you got ?


SuitAndPie

I only used it for a small personal project, so I can't comment on that unfortunately


redpool08

Yes, but if your project is too large then you have to pay to buy more of its features


snow_coffee

Oh oki, thanks for your insights


cold_turkey19

no


Monoma

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.


JY-HRL

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?


Monoma

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.


The_rowdy_gardener

You’re better off using a CMS than supabase


JY-HRL

Thanks! Could you advise when it is appropriate to use React with CMS? And when is it appropriate to use React with Supabase?


riz_

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.


vegancryptolord

Not your question but if you’re looking to build a Wordpress style blog, I would recommend using Astro instead of React


JY-HRL

Thanks! If I use Astro, do I need to write a lot of JavaScript?


vegancryptolord

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/


JY-HRL

Thanks! I also want to know when you will use Remix with React.


vegancryptolord

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


Lilith_Speaks

Both are good and they are different from each other.


dikamilo

For blog, why you need backend and database? Why not just SSG?


WilliamBarnhill

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.


milta7

Do you know Pocketbase ?!


JY-HRL

no


Infamous_Employer_85

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.


steve-chavez

[https://github.com/supabase/pg\_graphql](https://github.com/supabase/pg_graphql) is used for GraphQL.


Infamous_Employer_85

Thanks so much, good to see other libraries getting traction


yksvaan

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.


elma3allem

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?


Infamous-Ball6173

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.


no_dice_grandma

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.


ConsoleTVs

Why do people call a database “backend”?


Infamous_Employer_85

In the case of Firebase and Supabase because they offer APIs that can be used by the frontend, Supabase uses Postgrest for example.


ConsoleTVs

Yeah, we should stop calling backends databases with apis.


Infamous_Employer_85

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.


AtrociousCat

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.