Using Strapi With Supabase Deployed To Render

Поділитися
Вставка
  • Опубліковано 11 вер 2024
  • Using Strapi With Supabase Deployed To Render But Why
    Ever heard of Strapi? It's a headless CMS revolutionizing how we develop websites, mobile applications, eCommerce sites, and more.
    With Strapi, you don't need backend knowledge to create an API. Set up your content models, and the system crafts an API for you!
    Now, imagine pairing that with Supabase, the open-source alternative to Firebase.
    With Supabase, you kickstart your projects powered by a Postgres database, integrated Authentication, instant APIs, and even real-time subscriptions.
    In this tutorial, we dive deep into merging the best of both worlds by integrating Strapi with Supabase.
    And the cherry on top? I'll guide you through deploying your project to Render without a dime or a credit card.
    But a word of caution: Just because we CAN do something, doesn't mean we SHOULD. Stay tuned till the end of the video to discover why!
    Don't forget to hit that 'Like' button and subscribe for more content-rich tutorials! 🔥
    ---------------------------------------------------------------------------------------------------------------------
    Check out my other videos.
    ---------------------------------------------------------------------------------------------------------------------
    Want to see how I use ChatGPT to study? Check out this video.
    • Solving Fibonacci Recu...
    Javascript vs React how soon should you learn it?
    • React vs Vanilla JavaS...
    Check out my story and how I got hired?
    • How To Get Hired As A ...
    Check out my first cringe video here. This was one of my first videos.
    • Should You Become A We...

КОМЕНТАРІ • 49

  • @ItsLeonardoGranetto
    @ItsLeonardoGranetto 2 місяці тому +2

    why is this crazy? I took you 15 Minutes to set up. In my case now for example, I've started with Supabase and now I need a System to write and create Blog-Posts. Instead of building an admin panel and doing all from scratch, just do THAT and it's done.
    Nice video!

    • @CodingAfterThirty
      @CodingAfterThirty  2 місяці тому

      Lol. After going through the process of making the video, I realized it was not as wild as I thought it to be initially.
      There are definitely use cases for this example. It is just not officially recommended by Strapi.
      I still prefer just using a regular Postgresql instance running on the same server as the strapi instance.
      Thanks for checking out the video.

  • @laygir
    @laygir 11 місяців тому +6

    If you happen to take this approach I'd suggest to not forget to enable row level security on tables, use service role key and adjust storage policy to prevent anon keys deleting objects or entries in db 🙌

  • @sujalvanjare06
    @sujalvanjare06 Місяць тому +1

    It's still working.. Thank you for this i was using free postgress database from render it used to expire after 90 days but now they changed it to 30 days, keep the good work man Thank you.

  • @WebDevCody
    @WebDevCody 11 місяців тому +1

    I don’t remember at this point, but does strapi use SQLite by default or does it need a Postgres db?

    • @CodingAfterThirty
      @CodingAfterThirty  11 місяців тому

      Yeah. It uses SQLite by default.

    • @Offiziersmesser
      @Offiziersmesser 8 місяців тому

      @@CodingAfterThirty if i started out with sqlite and I had loaded some content which is stored in the .tmp/data.db file ,how can I transfer this data to supabase database?

  • @leibelhecht
    @leibelhecht 5 місяців тому +1

    I'm actually considering this architecture for a large production project. My only question is whether to use strapi or supabase for auth

    • @CodingAfterThirty
      @CodingAfterThirty  5 місяців тому

      I personally would not use Supabase as a Strapi database. My personal opinion.
      But if I was my question would be? Are you using Strapi admin just to make it easy for folks to add data to your supabase instance? But your front end will be consuming supabase? If so use Supabase auth.

  • @KuroManX
    @KuroManX 7 місяців тому +2

    Thanks for this video I liked this approach.
    I have one stance of Strapi running on my VPS and sincerely I hate configuring the infrastructure, is there any other approach similar to the one used in this video, with simple deploy for DB and Storage? Strapi cloud isn't a good option in my case since it will be 6x more expensive due to my country's currency. Sanity seems to be a good option too, but I am more comfortable with Strapi and I like the dynamic zones approach.

    • @CodingAfterThirty
      @CodingAfterThirty  7 місяців тому +1

      I typically like using Neon DB for database, Cloudinery for files and either Render or digital ocean, but digital ocean does not have a free tear.

  • @lyric5615
    @lyric5615 7 місяців тому +1

    I think some things got mixed up here strapi comes with sqlite database by default but what if you wanted a postgreDB as storage .That doesn't nessesarily mean data is feched from supabase on front end but when you call the strapi endpoint it feches data from the supabase db

    • @CodingAfterThirty
      @CodingAfterThirty  7 місяців тому

      Strapi allows you to choose multiple database options. I feel that you should use one or the other.
      Although this example shows how you can use Supabase, I would prefer to use it in its intended way.
      And yes, by default, Strapi comes with SQLite, which most people use in development.
      So, different environments can support other databases.
      I typically just stick with SQLite in dev and Postgres in production.
      And I prefer running my db in the same place where I deploy my app.
      I typically will run selfie

  • @rec-trick
    @rec-trick 11 місяців тому +3

    So why do we need Strapi if Subabase can do everything?

    • @CodingAfterThirty
      @CodingAfterThirty  11 місяців тому +2

      You don’t get an admin area to manage content creation and ability to customize back end through controllers, policies, middleware and services.
      And create custom plugins.
      And you are right depending on your project you would pick the best technology.
      In your case it might be Supabase.
      For stuff that I build, revolves around lots of content. And Strapi makes sense for me.
      To be honest. Depending on the project requirements I would pick what ever tech makes sense.
      Lol. I like both Strapi and Supabase.
      Just like I like Remix and Next.
      At the end of the day, I build things for customers.
      They are the boss.
      Great point though.

    • @alsherifkhalaf7385
      @alsherifkhalaf7385 11 місяців тому +4

      The opposite direction, why Supabase when Strapi can do everything that Supabase can do ?

    • @CodingAfterThirty
      @CodingAfterThirty  11 місяців тому +1

      @@alsherifkhalaf7385 I think if you just need a database and an API supabase is amazing. But if you have alot of content that many people need to manage, editors, publishers and so on, Strapi is the way to go.
      Also supabase supports vector data storage, which is really exciting. I am currently using pinecone, and it is pricey for my particular project.
      I don't mind spending money where it matters, but at the moment supabase vector storage makes sense.
      So i am in the process of converting one of my ai plugins to supabase.

    • @alsherifkhalaf7385
      @alsherifkhalaf7385 11 місяців тому

      @@CodingAfterThirty I agree, Strapi is better when you need a dashboard with nice ui and many editing features .

  • @dananjayachathuranga7113
    @dananjayachathuranga7113 8 місяців тому +1

    Thank u for the video. love u man😘. i have a question freelancing . when we deliver product to client do we need give acess for this platform like supabase , netlify , render ect ?

    • @CodingAfterThirty
      @CodingAfterThirty  8 місяців тому +4

      That’s a good question, it is really up to you, and how you setup the agreement.
      If I were to build a project for a client. I would use tech that would be easy for none developers.
      Like a headless CMS like Strapi that I show in this video.
      I would also not use Supabase if I am using Strapi.
      I would also deploy the project an a platform that is easier to use or manage.
      Like digital ocean app or Strapi cloud.
      And frontend in Netlify or Vercel.
      After I finish the product I would give them one of these options.
      1. Turn over the project to them and be done.
      2. Turn over the project to them and stay as a retainer, where if they need help they can hire me hourly.
      And I personally would not hold any accounts.
      I would instead, when need to update something, would log into users account instead.
      That way the majority of responsibility is on them.

    • @hostbybits-webhostingforre6845
      @hostbybits-webhostingforre6845 2 місяці тому

      Deliver the product and provide access to it.
      If the client agrees to ongoing maintenance, ensure you have an account for your access.
      Some freelancers retain access and occasionally disappear, leaving clients unable to update or upgrade their products.
      This is a bad practice that can result in clients losing their product due to the lack of updates/upgrades

  • @justin9494
    @justin9494 8 місяців тому +2

    subbed

    • @CodingAfterThirty
      @CodingAfterThirty  8 місяців тому

      Thank you for checking out the video and your support.

  • @user-ww4ff2mk2z
    @user-ww4ff2mk2z 11 місяців тому +1

    I watched the first 5 minutes.
    Are you saying that DB as a service is the same as Strapi (CMS)? Or I missed something?

    • @CodingAfterThirty
      @CodingAfterThirty  11 місяців тому +2

      Lol. I think I made sense at 5 min and 30 seconds.
      I think the point I tried to make is that they both serve slightly different needs.
      And one should chose accordingly, and not use both.
      Although, I have seen few projects where folks use Supabase as there preferred database and API and only use Strapi’s admin panned to add data to supabase.
      But Strapi is an api for your backend, so why use Strapi and Supabase together.
      I don’t get it.

    • @user-ww4ff2mk2z
      @user-ww4ff2mk2z 11 місяців тому +2

      @@CodingAfterThirty I don't fully agree with you, but that's okay :) Keep creating awesome content!

    • @CodingAfterThirty
      @CodingAfterThirty  11 місяців тому +1

      @@user-ww4ff2mk2z I respect that. Also, feel free to share your reason here, it can help others. Just because I have an opinion , doesn't mean that it is the only one. ( or right ) lol.

  • @hossein5998
    @hossein5998 10 місяців тому +1

    thank you so much bro, its was very helpful

    • @CodingAfterThirty
      @CodingAfterThirty  10 місяців тому

      Nice, thank you 🙏. Also, I discovered another great cloud DB to use with Strapi. It’s called Neon DB, a great alternative if you just need a DB without to many extras.

    • @hossein5998
      @hossein5998 10 місяців тому

      Great! Thank you for sharing your discovery @@CodingAfterThirty

  • @user-vl6cg8zs6f
    @user-vl6cg8zs6f 5 місяців тому

    Impressive tips🎉 so can use supa just for the auth to protect the routes and use strapi as a rest api ???

    • @CodingAfterThirty
      @CodingAfterThirty  4 місяці тому +1

      I personally don't recommend this approach. Either use one or the other. From what I see, folks like to use supabase for all the endpoints consumed by their fronted and use Strapi as an admin panel to add data into their supabase database.

  • @RafiTAMod
    @RafiTAMod 11 місяців тому +1

    How do we paste richtext without losing the format to strapi. I can't see an option for such a simple thing.

    • @CodingAfterThirty
      @CodingAfterThirty  11 місяців тому +1

      The current rich text field supports markdown.
      On the front end you can use react markdown to parse.
      You can checkout github.com/strapi/nextjs-corporate-starter/blob/main/frontend/src/app/%5Blang%5D/components/RichText.tsx
      Where I am doing this in the front end.
      You can also checkout CKEditor Plug-in on the Strapi Marketplace.

  • @GregPeters1
    @GregPeters1 11 місяців тому +3

    Strapi cloud is too expensive for small projects

    • @CodingAfterThirty
      @CodingAfterThirty  11 місяців тому +1

      Yes. That is why I like the fact there are many options to host you project.
      I think Render and Digital Ocean are great choices.
      I use both those platforms.
      I think picking the right hosting based on project needs is important.

  • @finnar7973
    @finnar7973 Місяць тому +1

    thank you for telling me not to do this...

  • @Offiziersmesser
    @Offiziersmesser 8 місяців тому

    I am encountering this error when I run npm run develop (I am using npm for my repo). it stops at 'loading strapi' and displays this error: KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call? any help?

    • @Offiziersmesser
      @Offiziersmesser 8 місяців тому

      It seems like my uni wifi was blocking the connection, I switched to my mobile hotspot and it worked.

    • @CodingAfterThirty
      @CodingAfterThirty  8 місяців тому

      That is interesting. I am glad you were able to figure it out. Sometimes you may get pulling connections do to not having proper configuration or closing previous connections.

  • @fajarnugroho3883
    @fajarnugroho3883 5 місяців тому

    help me, i can't create web services because "Add credit card to verify your identity."

    • @CodingAfterThirty
      @CodingAfterThirty  5 місяців тому

      I am not sure if this is something new they started to do. If so I guess the only way to get past it is you add your credit card.
      I typically don't use Superbase as often and never had it ask for a credit card in the past.

  • @user-gf8nl9fg9p
    @user-gf8nl9fg9p 5 місяців тому +1

    Where's the repo? 🤔

    • @CodingAfterThirty
      @CodingAfterThirty  5 місяців тому

      Unfortunately, it went missing but here is a project setttign where I used a different PostgreSQL DB but based on the setting. You just need to update the env to point to your supabase db. github.com/PaulBratslavsky/strapi-free-deploy-render-elephant-cloudinary/blob/main/config/database.js

  • @annachen5688
    @annachen5688 10 місяців тому

    Hey there thanks for the video. I'm having errors uploading media even after setting up a public bucket with a directory and editing the .env files. Do you have any suggestions for me?

    • @annachen5688
      @annachen5688 10 місяців тому +1

      never mind i had an extra space in it!

    • @CodingAfterThirty
      @CodingAfterThirty  9 місяців тому

      Glad you were able to find the answer. Sorry for the late response. I just saw your comment.