How To Build a Multi-Tenant Platform | Nextjs & Vercel

Поділитися
Вставка
  • Опубліковано 11 вер 2024
  • In this video, I share with you how to build a multi tenant platform using nextjs and vercel
    Join this channel to get access to perks:
    / @rasmic
    www.tsafi.xyz
    Blog CMS video: • Build a Blog CMS using...
    Follow me on Twitter: / rasmickyy
    Join my Discord: / discord
    My portfolio: rasmic.xyz
    My Nextjs SAAS Starter Kit: starter.rasmic...
    My CMS: www.tsafi.xyz
    Browser I use (Arc): arc.net/gift/6...
    Screen Studio (Recording Software): screen.studio/...

КОМЕНТАРІ • 95

  • @rasmic
    @rasmic  3 місяці тому +5

    Please make sure u review the github repo... I had to push a quick fix to the middleware. This change allows all the blogs to render on your subdomain
    const url = req.nextUrl;
    const pathname = url.pathname;
    if (tenantSubdomain) {
    return NextResponse.rewrite(
    new URL(`/${tenantSubdomain}${pathname}`, req.url)
    );
    }

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

      Do you have link to github? THanks

    • @gabchevanel4521
      @gabchevanel4521 18 годин тому

      are you able to add next-intl to it ? would be awesome to see it in action

  • @JerOmeVVB
    @JerOmeVVB 9 днів тому +1

    Thank you man! i was struggling to understand Multi Platform middleware from Vercel but yours is so much straightforward!

    • @rasmic
      @rasmic  8 днів тому

      glad u found this video, it was a struggle for me too

  • @adomakins
    @adomakins 2 дні тому

    Thanks for the video bro this is awesome! Also love your design of the dashboard, you seem to have some mad skills

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

    Dude, thank you bro 🙏 I been at this for a while but you explained it nicely 👌 💯. Keep up the good work 👏

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

      appreciate the kind words g

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

    Just yesterday i was going through vercel's multi tenant platform template code and now you upload this. Great job bro

    • @rasmic
      @rasmic  3 місяці тому

      Hope you enjoyed it!

  • @everyumclust7985
    @everyumclust7985 3 місяці тому +4

    good stuff! please keep us updated on how custom domains work for you

    • @rasmic
      @rasmic  3 місяці тому

      Will do

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

    Wow! Your site is so smooth.
    and this is the video i am looking for.

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

      Glad it was helpful!

  • @CM9inez
    @CM9inez 8 днів тому +1

    Absolute legend

    • @rasmic
      @rasmic  8 днів тому

      appreciate u gang

  • @user-ky3tg9no6v
    @user-ky3tg9no6v 3 місяці тому +3

    thanks Ras Mic this was great

    • @rasmic
      @rasmic  3 місяці тому +1

      glad you enjoyed it my g

  • @williambrisa
    @williambrisa 3 місяці тому +1

    Very cool demo, I can see me using it in the future. Can’t wait for the custom domains tho.

    • @rasmic
      @rasmic  3 місяці тому

      working on that as we speak

  • @nikolaus-lukasthomas6288
    @nikolaus-lukasthomas6288 3 місяці тому +2

    The idea is awesome! Correct me if I'm wrong, but with this approach, if the main site goes down, all the subdomains go down with it. This means there is no way to handle each subdomain in a separate (Docker) container to improve stability.

    • @rasmic
      @rasmic  3 місяці тому +1

      I'm not 100% sure tbh but a good thing to research and check!! Thanks for bringing this up

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

    This appears to be simpler than implementing multitenancy in Laravel, thanks

    • @rasmic
      @rasmic  3 місяці тому

      yeah cuz lava sucks lol

    • @NewTypeStarling
      @NewTypeStarling 3 місяці тому +1

      @@rasmic [technology here] sucks cus i use [another tech]. Signs of soydev

  • @ahmed-xvl
    @ahmed-xvl 3 місяці тому +1

    I love it, keep the good work man!

    • @rasmic
      @rasmic  3 місяці тому

      thanks g

  • @AlejandroRodriguez-lq9mz
    @AlejandroRodriguez-lq9mz 22 дні тому +1

    thank you Ras!, this was really helpfull :)

    • @rasmic
      @rasmic  21 день тому

      glad it was helpful

  • @richklear2569
    @richklear2569 3 місяці тому +1

    Hands down the best video on building Multi-Tenant Platforms I've seen.
    Would love to see how you can link custom domains.
    -
    do you know if this can work with Clouflare?

    • @rasmic
      @rasmic  3 місяці тому

      will be doing custom domains soon, I haven't tried cloudflare so not sure my g

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

    Great stuff bro 💯

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

      Thanks 💯

  • @Diego_Cabrera
    @Diego_Cabrera 3 місяці тому +1

    Dope video man!

    • @rasmic
      @rasmic  3 місяці тому

      Glad you liked it!

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

    U da goat bro

    • @rasmic
      @rasmic  3 місяці тому

      appreciate u gango

  • @hbela1000
    @hbela1000 3 місяці тому +1

    Thanks for sharing, this is really awesome.

    • @rasmic
      @rasmic  3 місяці тому

      Gotchu g

  • @lazyprog
    @lazyprog 10 днів тому +1

    Thank you

    • @rasmic
      @rasmic  8 днів тому

      You're welcome

  • @jairseedorf
    @jairseedorf 3 місяці тому +1

    Thats really cool!

    • @rasmic
      @rasmic  3 місяці тому

      thanks g

  • @avishekdas4947
    @avishekdas4947 3 місяці тому +1

    Ras Mic, can you build a tutorial of this awsome project? This is my humble request. I think there is lot to learn from you.

    • @rasmic
      @rasmic  3 місяці тому

      if enough people ask then I'll cook it :)

  • @jedbenhod
    @jedbenhod Місяць тому

    You're super smart dude nice!

    • @rasmic
      @rasmic  Місяць тому

      thanks gang :)

  • @chiperror2441
    @chiperror2441 3 місяці тому +1

    Perhaps move the creation of blog posts to each site? That way you prevent the user to choose the site they want to publish to. Less clicks = happier users :D

    • @chiperror2441
      @chiperror2441 3 місяці тому

      > That way you prevent the user to choose the site they want to publish to.
      ref: the site select

    • @rasmic
      @rasmic  3 місяці тому

      100% agree, if you watched my previous video i created this to be a CMS.. hence the structure then I decided to add this feature… but u right.. update coming soon

  • @royangagas2519
    @royangagas2519 3 місяці тому +1

    very interesting video, thanks bro

    • @rasmic
      @rasmic  3 місяці тому

      Glad you liked it!

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

    Please make a video to add custom domain in this multi tenant app.

  • @gauravraj8728
    @gauravraj8728 3 місяці тому +1

    Great job man , can you also provide the video for custom domain handling ?

    • @rasmic
      @rasmic  3 місяці тому

      Will upload soon

    • @armaandhanji7151
      @armaandhanji7151 3 місяці тому

      @@rasmic Yeah, I really really hope you can upload soon a video on domain handling, thanks!!

    • @rasmic
      @rasmic  3 місяці тому

      @@armaandhanji7151 it's coming soon gang

  • @ariflogs
    @ariflogs 3 місяці тому

    Great video Ras. Just curious, what screen capturing tool do you use?

    • @rasmic
      @rasmic  3 місяці тому

      In the description

  • @iamparmjeetmishra
    @iamparmjeetmishra 3 місяці тому +1

    Thanks...

    • @rasmic
      @rasmic  3 місяці тому +1

      no worries g

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

    I just have a little problem doing that bro, when i am working with packages that uses middleware, like next-auth and next-intl, i can't do the rewrite thing because that will make problems with the other packages, can you please help with that, Thankss a lot ❤❤

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

      I don’t use next auth gang, sorry :(

  • @hirenrafaliya3577
    @hirenrafaliya3577 3 місяці тому

    Which tool you use for screen recording with this soft rectangular camera view?

    • @rasmic
      @rasmic  3 місяці тому

      link in the description

  • @markovvoz8849
    @markovvoz8849 5 днів тому

    So, to use this concept, the authentication is shared between all tenets?

    • @rasmic
      @rasmic  4 дні тому

      nah auth just to sign up for the platform

  • @saben3462
    @saben3462 3 місяці тому +1

    brother, how you made that bar on arc please ??

    • @rasmic
      @rasmic  3 місяці тому

      not sure what you are asking

  • @lonehayena
    @lonehayena 3 місяці тому

    Nice.Just 1 question, does it support multiple domains? like other root domains or just subdomains?

    • @rasmic
      @rasmic  3 місяці тому +1

      haven't implemented that yet but that will be next

    • @lonehayena
      @lonehayena 3 місяці тому

      @@rasmic Great.

    • @mchuatak
      @mchuatak Місяць тому

      Nice share bro, Same question here. Can we set a different domain? Not just a custom subdomain?

  • @zivtamary
    @zivtamary 3 місяці тому +1

    will this work on a VPS or must it be hosted on vercel to work?

    • @rasmic
      @rasmic  3 місяці тому

      not sure but don't plan on figuring out tbh

  • @hasaniqbal233
    @hasaniqbal233 3 місяці тому +1

    yo Ras what vscode theme is that?

    • @rasmic
      @rasmic  3 місяці тому

      i already changed so i couldn't tell u lol

  • @lnard0
    @lnard0 3 місяці тому +1

    bro what vscode theme is that?

    • @rasmic
      @rasmic  3 місяці тому

      i already changed so i couldn't tell u lol

  • @kruxdt6307
    @kruxdt6307 3 місяці тому +1

    whats the cursor

    • @rasmic
      @rasmic  3 місяці тому

      editing software I use

  • @lucasfranzolin
    @lucasfranzolin 19 днів тому

    how did you make clerk work?

    • @rasmic
      @rasmic  10 днів тому

      don't have auth for the multi tenant sites

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

    Link to github?

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

      github.com/michaelshimeles/tsafi

    • @notbarbara2647
      @notbarbara2647 Місяць тому

      @@rasmic Cheers. Any chance you've looked at authentication for multi-tenant sites yet?

    • @rasmic
      @rasmic  Місяць тому

      @@notbarbara2647 not yet but something cool to look at

    • @notbarbara2647
      @notbarbara2647 Місяць тому

      @@rasmic Let me know if you do. Next-auth does not support this unfortunately. Clerk does have some features for this, but I don't know yet if it also works on custom domains. Very very tricky. Also literally zero articles on Google or videos on UA-cam for this. The ones that do exist around this topic just copy the Vercel article (but I don't host on Vercel).

  • @mageshyt2550
    @mageshyt2550 3 місяці тому

    interesting

  • @meandyoucoding
    @meandyoucoding 3 місяці тому +1

    Yo, I didn't realize u were Ethiopian.

    • @rasmic
      @rasmic  3 місяці тому

      selam new

    • @meandyoucoding
      @meandyoucoding 3 місяці тому

      @@rasmic Dena, see u on the next video