How to achieve multitenancy in Directus

Поделиться
HTML-код
  • Опубликовано: 7 фев 2025
  • Directus is a super powerful data platform, and as you work with it more it's true power can be realized. In Short Hops, our team provide quick insights in how to get the most from Directus.
    More episodes on Directus TV: directus.io/tv...

Комментарии • 32

  • @ffukue
    @ffukue 10 месяцев назад +4

    Nice content! I was just working on a multi-tenancy implementation these days, and I applied it just that way. The only issue is that I changed the "ownership" of the created item a bit so that it simply saves the tenant ID at the time of creation, because I add the tenant_id for all the items created, that way the tenant_id is immutable even if there are changes in the tenants of the users who created it

  • @dodokod
    @dodokod 10 месяцев назад +2

    Great content again, thanks. Btw what is you software of choice you use to record?

    • @DirectusVideos
      @DirectusVideos  10 месяцев назад +2

      Great question. We use a few different tools but for most screen recording style videos like this I'm using ScreenFlow.
      --- Bryant

  • @VensystemsUk
    @VensystemsUk 10 месяцев назад +3

    great to see a video on this - could be useful to add a deeper dive to help identify different cases... such as when users belong to multiple tenants and/or multiple roles - useful for SaaS community where a user can admin multiple brands with different roles in each.

    • @DirectusVideos
      @DirectusVideos  10 месяцев назад

      Great suggestion! Are you building something like that now?

    • @bayfrontmedia8327
      @bayfrontmedia8327 9 месяцев назад

      ​@@DirectusVideos We are building an app which needed this (ability to belong to multiple tenants with different permissions, think "GitHub organizations"). Unfortunately, it was too convoluted for me to attempt in production.

  • @deephousefridays1911
    @deephousefridays1911 10 месяцев назад +1

    I would love to see on how to use directus with several languages for the content

    • @DirectusVideos
      @DirectusVideos  10 месяцев назад +3

      Yes! Multilingual content tutorials are coming to our docs soon

  • @GamerPlaya12
    @GamerPlaya12 2 месяца назад

    How would someone have each “tenant” be able to run its own flows

  • @NecolasHamwi
    @NecolasHamwi 10 месяцев назад +2

    That's truly awesome

  • @svenvanreenen
    @svenvanreenen 8 месяцев назад +1

    How to handle authentication e-mails. Is it currently possible to isolate custom auth emails for each client? lets say I make a PIM software with multiple clients below. having my customers logging in inside directus and their webshop clients on the webshop frontend. Will it be possible to create an email templates customized for each customer in this setup.
    Would it be possible to isolate the object storage elements images and files from one tenant to another? Kindly let me know.

  • @speed6761988
    @speed6761988 8 месяцев назад +1

    Impresive! I'm thinking about change Laravel for directus to create my back-ends projects.

  • @andrewsnook990
    @andrewsnook990 6 месяцев назад

    Is it possible to show the Team Name instead of the GUID within the Tasks Collection page?

    • @DirectusVideos
      @DirectusVideos  6 месяцев назад

      Yes! You can use a display template for this -> docs.directus.io/user-guide/content-module/display-templates.html#display-templates

  • @MarioVillamizar
    @MarioVillamizar 3 месяца назад

    Nice video, thanks. Would it be possible to automatically populate the team field on the task for the user at creation time, so the user won't have to manually enter it, or could be possible to doit with flow? how to get the teams id using "{{ $accountability }}". Thanks!

  • @diegolopes332
    @diegolopes332 10 месяцев назад +1

    Great. I need to develop a SaaS, do you think Directus would be a good option?

    • @DirectusVideos
      @DirectusVideos  10 месяцев назад +1

      Like a lot of questions in development, the answer is... it depends...on the specifics.
      But in general, Directus can be a great platform for building a SaaS because it provides a lot of functionality out of the box that you'd have to otherwise build yourself like - authentication, user roles and permissions, REST and GraphQL APIs.

  • @renansantos-shiamkal7909
    @renansantos-shiamkal7909 6 месяцев назад

    How do i use tenancy in global presets (bookmarks)?

  • @leonheardt
    @leonheardt 10 месяцев назад

    So, would I have to add the tenant ID to all tables? Like... if I had a separate table for phones, would I also have to add it so that other tenants couldn't see it? Wouldn't it be possible to add something like "users.phone" or similar?

    • @DirectusVideos
      @DirectusVideos  10 месяцев назад +1

      Yes - you would add the tenant relationship to all the collections that are scoped to that tenant model.
      For junction collections, it's probably more of a personal decision whether you want to add them there or not, depending on what data you're storing in the junction collection itself.

  • @koppswiss
    @koppswiss 9 месяцев назад

    Interesting, but what about handling multilple webdesign clients on one tenant where each client has his own CMS ? Is this possible with directus?

    • @DirectusVideos
      @DirectusVideos  9 месяцев назад +1

      You can give them all access to the same data studio instance and manage what they can see and edit with permissions.

  • @greendsnow
    @greendsnow 10 месяцев назад +1

    This is a necessity to build a marketplace.

  • @omarmujahid1816
    @omarmujahid1816 10 месяцев назад +3

    Please adjust the layouts of your videos, no need for this fancy background on the side and rather zoom in on the content

    • @HUSSEINKHALIDHUSSEIN
      @HUSSEINKHALIDHUSSEIN 10 месяцев назад +1

      What if the task is shared between multiple teams?

    • @DirectusVideos
      @DirectusVideos  10 месяцев назад +1

      Then you’d be setting up permissions differently but that’s entirely possible. Each task’s ownership would be a M2M and the permissions would look for one of them to match

  • @jeremyrangel8138
    @jeremyrangel8138 9 месяцев назад

    That is not a very scaleable method for a multi-tenant setup, and a generally piss-poor way to do it.

    • @fuzzychest
      @fuzzychest 8 месяцев назад +1

      How would you go about it? Subdomains so each tenant is isolated? Thats kinda what I am thinking but I am new to the concept of multi-tenant services like this

    • @sheldonfourie5959
      @sheldonfourie5959 8 месяцев назад +1

      curious about this too? What is the not so piss-poor way

    • @jeremyrangel8138
      @jeremyrangel8138 8 месяцев назад

      @@sheldonfourie5959 Every tenant having their own schema! You know, the way real multi-tenant apps do it.