[{"data":1,"prerenderedAt":437},["ShallowReactive",2],{"footer-primary":3,"footer-secondary":93,"footer-description":119,"technically-im-lost-data-modeling":121,"technically-im-lost-data-modeling-next":169,"sales-reps":185},{"items":4},[5,29,49,69],{"id":6,"title":7,"url":8,"page":8,"children":9},"522e608a-77b0-4333-820d-d4f44be2ade1","Solutions",null,[10,15,20,25],{"id":11,"title":12,"url":8,"page":13},"fcafe85a-a798-4710-9e7a-776fe413aae5","Headless CMS",{"permalink":14},"/solutions/headless-cms",{"id":16,"title":17,"url":8,"page":18},"79972923-93cf-4777-9e32-5c9b0315fc10","Backend-as-a-Service",{"permalink":19},"/solutions/backend-as-a-service",{"id":21,"title":22,"url":8,"page":23},"0fa8d0c1-7b64-4f6f-939d-d7fdb99fc407","Product Information",{"permalink":24},"/solutions/product-information-management",{"id":26,"title":27,"url":28,"page":8},"63946d54-6052-4780-8ff4-91f5a9931dcc","100+ Things to Build","https://directus.io/blog/100-tools-apps-and-platforms-you-can-build-with-directus",{"id":30,"title":31,"url":8,"page":8,"children":32},"8ab4f9b1-f3e2-44d6-919b-011d91fe072f","Resources",[33,37,41,45],{"id":34,"title":35,"url":36,"page":8},"f951fb84-8777-4b84-9e91-996fe9d25483","Documentation","https://docs.directus.io",{"id":38,"title":39,"url":40,"page":8},"366febc7-a538-4c08-a326-e6204957f1e3","Guides","https://docs.directus.io/guides/",{"id":42,"title":43,"url":44,"page":8},"aeb9128e-1c5f-417f-863c-2449416433cd","Community","https://directus.chat",{"id":46,"title":47,"url":48,"page":8},"da1c2ed8-0a77-49b0-a903-49c56cb07de5","Release Notes","https://github.com/directus/directus/releases",{"id":50,"title":51,"url":8,"page":8,"children":52},"d61fae8c-7502-494a-822f-19ecff3d0256","Support",[53,57,61,65],{"id":54,"title":55,"url":56,"page":8},"8c43c781-7ebd-475f-a931-747e293c0a88","Issue Tracker","https://github.com/directus/directus/issues",{"id":58,"title":59,"url":60,"page":8},"d77bb78e-cf7b-4e01-932a-514414ba49d3","Feature Requests","https://github.com/directus/directus/discussions?discussions_q=is:open+sort:top",{"id":62,"title":63,"url":64,"page":8},"4346be2b-2c53-476e-b53b-becacec626a6","Community Chat","https://discord.com/channels/725371605378924594/741317677397704757",{"id":66,"title":67,"url":68,"page":8},"26c115d2-49f7-4edc-935e-d37d427fb89d","Cloud Dashboard","https://directus.cloud",{"id":70,"title":71,"url":8,"page":8,"children":72},"49141403-4f20-44ac-8453-25ace1265812","Organization",[73,78,84,88],{"id":74,"title":75,"url":76,"page":77},"1f36ea92-8a5e-47c8-914c-9822a8b9538a","About","/about",{"permalink":76},{"id":79,"title":80,"url":81,"page":82},"b84bf525-5471-4b14-a93c-225f6c386005","Careers","#",{"permalink":83},"/careers",{"id":85,"title":86,"url":87,"page":8},"86aabc3a-433d-434b-9efa-ad1d34be0a34","Brand Assets","https://drive.google.com/drive/folders/1lBOTba4RaA5ikqOn8Ewo4RYzD0XcymG9?usp=sharing",{"id":89,"title":90,"url":8,"page":91},"8d2fa1e3-198e-4405-81e1-2ceb858bc237","Contact",{"permalink":92},"/contact",{"items":94},[95,101,107,113],{"id":96,"title":97,"url":8,"page":98,"children":100},"8a1b7bfa-429d-4ffc-a650-2a5fdcf356da","Cloud Policies",{"permalink":99},"/cloud-policies",[],{"id":102,"title":103,"url":81,"page":104,"children":106},"bea848ef-828f-4306-8017-6b00ec5d4a0c","License",{"permalink":105},"/bsl",[],{"id":108,"title":109,"url":81,"page":110,"children":112},"4e914f47-4bee-42b7-b445-3119ee4196ef","Terms",{"permalink":111},"/terms",[],{"id":114,"title":115,"url":81,"page":116,"children":118},"ea69eda6-d317-4981-8421-fcabb1826bfd","Privacy",{"permalink":117},"/privacy",[],{"description":120},"\u003Cp>A composable backend to build your Headless CMS, BaaS, and more.&nbsp;\u003C/p>",{"id":122,"slug":123,"vimeo_id":124,"description":125,"tile":126,"length":127,"resources":8,"people":8,"episode_number":128,"published":129,"title":130,"video_transcript_html":131,"video_transcript_text":132,"content":8,"status":133,"episode_people":134,"recommendations":159,"season":160,"seo":168},"fb8ecc5d-0e74-4807-b59b-4273ca3424af","data-modeling","962569420","What happens when a non-technical person attempts to get technical? In episode 1 of Technically I'm Lost (TIL), non-technical marketer Matt attempts to build the data model for a partner directory from scratch, with help from resident Directus expert Bryant. ","4a5968a6-a416-4562-bdd6-c9c39ca2fa3b",70,1,"2024-07-09","Data Modeling","\u003Cp>Speaker 0: Hey, everyone. I'm Matt here with the Directus Marketing team. I am joined by my friend and confidant for this call, Bryant Gillespie. Bryant, how are you?\u003C/p>\n\u003Cp>Speaker 1: I'm awesome.\u003C/p>\n\u003Cp>Speaker 0: Great. Yeah. I feel like I don't have to introduce you because you're, like, on every show here. But, you know?\u003C/p>\n\u003Cp>Speaker 1: I I appreciate the intro, man. I you know? Like, I it's always nice when people pretend not to do me. My wife does that all the time.\u003C/p>\n\u003Cp>Speaker 0: You're just too famous around these parts. I get it. I get it. But yeah. So Bryant was literally just asking because I roped him in right before this.\u003C/p>\n\u003Cp>What are we doing again, and what is the concept for this show? So as a person on the direct marketing team, 1 of the few here that is actually very, nontechnical, I sit more on the marketing side of things. I just am trying to learn how to become more technical in my role and learning how to use Directus and things like that. So, concept for this show, technically, I'm lost, is gonna be me kinda navigating a lot of these trials and tribulations that it comes with being a nontechnical person that's trying to learn how to actually use technology and code and direct us to the product itself, and I'll be doing so with help from guests like mister Bryant here. We'll be building various things that we actually have to use internally, that we have coming up, and I figured why not delay the timeline and try to build it myself.\u003C/p>\n\u003Cp>So here we are. Bryant, was that a pretty good breakdown of everything?\u003C/p>\n\u003Cp>Speaker 1: III like it. I like the trials and tribulations part of it really got me.\u003C/p>\n\u003Cp>Speaker 0: Yeah. I feel like, I don't know what to expect out of this, but I expect it to be painful. Like, there's a forecast of pain coming. That's about all I know.\u003C/p>\n\u003Cp>Speaker 1: This will be fun if this is your version of 100 apps, 1 100 hours, where there's, like, a a public shaming portion of it, where it's like, oh, hey, like, hey. You start out really overconfident, or at least I do. And then, like, by the end of it, you're either, like, yeah, you do the Tiger Woods thing, or you're like, oh, wow. Really humbled at that point.\u003C/p>\n\u003Cp>Speaker 0: Yeah. I'm gonna try not to turn this into 1 app 100 hours, but we'll see what happens. So\u003C/p>\n\u003Cp>Speaker 1: what's on the dish for today, man?\u003C/p>\n\u003Cp>Speaker 0: So today's episode, I'm gonna give you a lay of the land. So we have just revamped our partner program here at Directus. You know, in the past, we've we've tried to put things together. It's been very, loosey goosey, I think, is the technical term for it. So we've brought on a partner manager, Colton, who's heading that up.\u003C/p>\n\u003Cp>He's put a really awesome program in place. The next step for this and the evolution of it is to create a partner directory on our website. So figured directory, I don't know if you've built 1 of those on a 100 apps, a 100 hours yet, but, director seems like the perfect use case to build a directory directory of some sort. A couple things, and actually, what I'll do is I'll pull up Excalidraw because I know that's what you do. And Oh, yeah.\u003C/p>\n\u003Cp>The way that you do things.\u003C/p>\n\u003Cp>Speaker 1: I'm I'm a, like, FigJam guy just because Oh, you're\u003C/p>\n\u003Cp>Speaker 0: a FigJammer? Yeah.\u003C/p>\n\u003Cp>Speaker 1: Hey. Excel I like Excel draw as well. To each their own.\u003C/p>\n\u003Cp>Speaker 0: FigJam's pretty cool. I have nothing against FigJam. But, okay. So a couple of things. Partner directory.\u003C/p>\n\u003Cp>So it's gotta be accessible for our partners. We want partners to be able to update their own, instance, and put in things like their their part their agency name, main point of contact, where they're located, and, like, upload things like showcase work. So Okay. Obviously that name, point of contact, location,\u003C/p>\n\u003Cp>Speaker 1: and Description, summary. Description slash summary,\u003C/p>\n\u003Cp>Speaker 0: areas of expertise. What are\u003C/p>\n\u003Cp>Speaker 1: you thinking as far as, like, location data?\u003C/p>\n\u003Cp>Speaker 0: Location data. So that's probably what we'll filter on the front end is, you know, I'm thinking of the user experience they land on, like, direct us dot I o slash partners, and then they filter down based on a partner that's, you know, the general location because I like to support local. So, if I was looking for an agency, I would look for someone here in the East Coast of the United States. So I think by country, and then they can just drill down from there. But I would say, like, country top level.\u003C/p>\n\u003Cp>Speaker 1: Okay.\u003C/p>\n\u003Cp>Speaker 0: Areas of expertise is interesting because I'm trying to think of, like I guess it would be like they wanna like, is it, like, a website or is it, like, app development? Or is it more granular than that, do you think? Like, like, actually, like, flows and insights and, like, direct us things like that?\u003C/p>\n\u003Cp>Speaker 1: If for an agency, I would think, like, areas of expertise to me is like, hey. Like, what do we specialize in? Is it, like, web development? Is it mobile app development? Is it, UI, UX?\u003C/p>\n\u003Cp>Is it all of it, I guess? At least that's the way that I see a lot of these things handled. Right? At other companies or or other spots online, I guess.\u003C/p>\n\u003Cp>Speaker 0: That makes sense. That makes sense. Cool. Trying to think of what else. We'll have a showcase area where people can upload upload projects.\u003C/p>\n\u003Cp>Speaker 1: You're probably gonna want a logo. Yes. Logo. And then the I always hesitate to, like, throw, like, pricing, if we've got some, like, freelancers in there, if we've got some, like, freelancers in there, you know, they're, like, stacking them up directly with an agency that has a 100 developers is not is not fair to either 1 of them. Yeah.\u003C/p>\n\u003Cp>Speaker 0: Yeah. I think I have to figure that out. Maybe it's like a pick list with, like like, 0 to not 0. It wouldn't be a agency. But 1 to 9, 10 to 49.\u003C/p>\n\u003Cp>Speaker 1: Oh, he's getting it very granular. I like it.\u003C/p>\n\u003Cp>Speaker 0: Yeah. I'll say 10 to 99, and then a 100 plus. Seems like a pretty good 3 to 3. Small, medium, large. What else do you think?\u003C/p>\n\u003Cp>Actually, this feels like a pretty good, v 1.\u003C/p>\n\u003Cp>Speaker 1: This is a this is a good jumping off point.\u003C/p>\n\u003Cp>Speaker 0: Yes. V 1 is my favorite and not because I'm lazy. It's just because it's good to just get something out there, and also because I'm sort of lazy. So, feels like a good scope of work.\u003C/p>\n\u003Cp>Speaker 1: So I like it.\u003C/p>\n\u003Cp>Speaker 0: First\u003C/p>\n\u003Cp>Speaker 1: steps. I'm I'm just monitoring the environment. That's, I Oh, yeah. Yeah. Yeah.\u003C/p>\n\u003Cp>We we've stepped up the difficulty level for this episode because I've got 3 kiddos downstairs who've been sick all week. Fully expect 1 of them to bust in the office. And so that might make this more interesting.\u003C/p>\n\u003Cp>Speaker 0: You know, that's technically, I'm lost. We roll with\u003C/p>\n\u003Cp>Speaker 1: I that could be could be set for me as well at this point. Like, technically, parental wise, I am lost right now.\u003C/p>\n\u003Cp>Speaker 0: Technically, I am totally lost. Alright. Cool. Alright. So next step, hopping into Directus.\u003C/p>\n\u003Cp>So for anybody that doesn't know, we use Directus internally for basically everything on the marketing side. So our entire website's powered. These are all our pages here. We use it for our docs, for publishing and and maintaining. Also, like, when you leave reviews, we capture that stuff.\u003C/p>\n\u003Cp>We have our direct to stop pizza. That's in here too. This is the main place where we can make changes to all that stuff, the the interactive demo. We capture metrics, and we capture key marketing metrics in here. It's my weekly dashboard that I put together.\u003C/p>\n\u003Cp>So the partner portal is gonna fit nicely in here because it gives us 1 place to access everything, and we'll just limit things with roles and permissions at some point, in this episode and all of this stuff. But yeah. So, Bryant, starting from scratch with this partner directory, where do you suggest we start?\u003C/p>\n\u003Cp>Speaker 1: Where do you well, like, you've already got a, like, start of a data model kind of mapped out in a scale draw. Like Yeah. Why wouldn't we start there?\u003C/p>\n\u003Cp>Speaker 0: I think that is a great place to start. So, again, I'm just completely, doing this as a nontechnical person. I wanna caveat that. I'll probably say it a 100 times in this episode, but I'm, yeah, starting from scratch here. So what I assume, and just correct me if I'm making a mistake here, we're gonna wanna create a data schema, which we will do inside of collections, inside of settings.\u003C/p>\n\u003Cp>Speaker 1: Yeah. We will create a new collection. Now, you get to encounter the hardest part of development, which is naming things.\u003C/p>\n\u003Cp>Speaker 0: Naming conventions or So, hey, like, hey, what\u003C/p>\n\u003Cp>Speaker 1: are we gonna call this new collection? Like, is it gonna be\u003C/p>\n\u003Cp>Speaker 0: Do we call it is it so that's the thing. Is it, like, the high level thing? Could we just call it partner directory and then all of the fields would be within that? Or do we have to get, like\u003C/p>\n\u003Cp>Speaker 1: so I like, typically, like, the way that I name my tables, and this is I say this in every video. It's 1 of my favorite features inside Directus is the ability to, like, translate that. Right? So, usually, when I name tables, it is like a what's the object? And then I I usually end up with, like, a plural.\u003C/p>\n\u003Cp>So it's pages or posts or partners or agency partners or, you know, trying to think on, like, the partner side, we've got agencies, we've also got tech partners. Do those live in the same directory? And they're you know, do they have a lot of the same characteristics as as far as, like, the data or totally different thing?\u003C/p>\n\u003Cp>Speaker 0: It's a great point. So I think at some point, as we start to grow out the tech partner side of things, we'll have kind of the same concept for them, and we'll have, like, integrations pages maybe or, like, you know, something like that. We wouldn't wanna conflate the 2. So maybe it is just agency partners for this because that's what the hyperfocus is on. So are all you think all partners would be considered agencies or if there's any, like\u003C/p>\n\u003Cp>Speaker 1: Again, right? That's the and now you're waiting into developer land where it's like, hey, I I know what I wanna do with this, but what do I name the thing? Because it's gonna confuse somebody later.\u003C/p>\n\u003Cp>Speaker 0: I've been in developer land for 10 minutes, and I'm already not liking it. So I don't know I don't know how you guys do this. But I it let's roll\u003C/p>\n\u003Cp>Speaker 1: with it. And, you know, again, like, within the interface, we can rename it. Now before you move on here, the other thing I want you to do, and this is mostly just out of habit for me, when I'm building all of these, like, direct us plus starter kits. The primary key field, set the type on that to UUID. The type not no.\u003C/p>\n\u003Cp>No. No. No. No. No.\u003C/p>\n\u003Cp>No. No. No. No. Slow down, cowboy.\u003C/p>\n\u003Cp>There you go. Let's go. It's the type 2 generated UUID. Yeah.\u003C/p>\n\u003Cp>Speaker 0: Here. What the hell? I mean, what the heck do any of these mean? This is where I get lost, and I don't wanna turn this into, like, a long,\u003C/p>\n\u003Cp>Speaker 1: like, discussion. So, basically, every table in the database has to have a or every row within a table. Right? So when you're adding this collection, you're creating a table inside the database called agency partners. Every row within that has to have a unique identifier so that the database knows what that is and how to reference it.\u003C/p>\n\u003Cp>I got you. So you can you can basically generate that identifier either, like, a auto incremented integer, which is, like, 1, 2, 3, 4, 5, 6, 7. When you are I I doubt we'll use this for a starter kit. But, when you try to transfer those IDs to a different database, like, you've gotta reset, like, the the increment count on that database. Okay.\u003C/p>\n\u003Cp>Our things get squirrelly. So using a UUID prevents that because it's just a random string of 36 characters.\u003C/p>\n\u003Cp>Speaker 0: Okay. I'm tempted to go big or go home, but I will go give you ID.\u003C/p>\n\u003Cp>Speaker 1: Oh, yes. Now you could also do the manually entered string, but, like, like, I I see people will use that for slug a lot. But the problem there is you can't change that after the fact. So if somebody renames their agency, that primary key would still be the same thing because you can't change that.\u003C/p>\n\u003Cp>Speaker 0: Okay.\u003C/p>\n\u003Cp>Speaker 1: So if it's Matt's agency and then you sell it, it becomes my agency. Like, I'm stuck with Matt's agency.\u003C/p>\n\u003Cp>Speaker 0: Yeah. Should've bought it. Okay. Your UID. That makes sense now.\u003C/p>\n\u003Cp>So, everything will have a automatically generated, identifier that if we decide to pull all the stuff out of Directus at some point, it'll follow it. If we wanna integrate it with something like a tool like clay, when we pull that in, it'll be able to keep everything in rows nice and clean.\u003C/p>\n\u003Cp>Speaker 1: Nice and easy.\u003C/p>\n\u003Cp>Speaker 0: I'm learning. Technically, I'm lost. TIL today. Learning.\u003C/p>\n\u003Cp>Speaker 1: Yeah. There you go.\u003C/p>\n\u003Cp>Speaker 0: Cool. I know there's a lot of things with, optional fields here, but, you know\u003C/p>\n\u003Cp>Speaker 1: Best thing to do is just check them all. You could delete them later if you don't need them. Right? So these are just, like, the helpers within the system.\u003C/p>\n\u003Cp>Speaker 0: Nice. Okay.\u003C/p>\n\u003Cp>Speaker 1: Like, they created whenever you create a new record, it will populate the timestamp for you. Automatic? Same thing. Yep.\u003C/p>\n\u003Cp>Speaker 0: Genius. I created a collection, like, a little while ago before this episode, and I forgot to check that. And I'm, like, oh, crap. It's not generating.\u003C/p>\n\u003Cp>Speaker 1: You could you could do it. It's just easier to check the boxes and then delete it if you don't need it. Alright.\u003C/p>\n\u003Cp>Speaker 0: Beautiful. Alright. So we've got our agency partners data model. Now, next step for me is gonna be to pick a color because I'm in marketing. So I'll just, do this nice little\u003C/p>\n\u003Cp>Speaker 1: Colors and icons, baby. Yep.\u003C/p>\n\u003Cp>Speaker 0: There's a I hate this shirt search. Oh, handshake. I found 1. Nice. Alright.\u003C/p>\n\u003Cp>The search always busts for me, with those icons. Me and icons have a lot of hate.\u003C/p>\n\u003Cp>Speaker 1: I the Google naming team on those. Guys, hit me up. I'd like to make you guys need some help.\u003C/p>\n\u003Cp>Speaker 0: Yeah. But, anyways, next steps. We got our handshake. We got our nice green color. Green is great.\u003C/p>\n\u003Cp>I love Luigi. So we're all there. Good there. Now the next step is gonna be creating those fields that we had mapped out earlier. Correct?\u003C/p>\n\u003Cp>Speaker 1: Yeah, baby. You got it.\u003C/p>\n\u003Cp>Speaker 0: Alright. So, this is 1 of my favorite parts of directors actually because of these nice little visualizations that give you a a clear preview of what you're getting into. Let's see. So input seems like the 1 that's generally used.\u003C/p>\n\u003Cp>Speaker 1: For just like a string of text? Like, what do what what are we starting with? Like, the agency name?\u003C/p>\n\u003Cp>Speaker 0: Yeah. So we're gonna start with name. Actually, you know what I'm gonna do? A little arc magic here. Yeah.\u003C/p>\n\u003Cp>Alright. So we've got our window. Alright. So side by side here. I think the important thing to start with is gonna be, obviously, the name of the agency.\u003C/p>\n\u003Cp>So input, just a string of text, name, unless we have a specific name field here, which I don't think we would because it seems very unique.\u003C/p>\n\u003Cp>Speaker 1: Nope. You got it, boss.\u003C/p>\n\u003Cp>Speaker 0: So question I had here was, should we, in the grand scheme of, like, all of the other fields and collections and things inside of Directus, when I'm naming things, should the naming convention be, like, instead of name, should it be, like, agency underscore name, or does it really matter in the grand scheme of everything else?\u003C/p>\n\u003Cp>Speaker 1: This is the the fun. Yeah. I would probably just call it name because, like, within this, you're not gonna have, like, a lot of related items. Right? Like, you're probably gonna have some projects to showcase, you know.\u003C/p>\n\u003Cp>I guess, in that sense, you could have, like, a partner name and a project name. I only, like, start adding prefixes when it really starts to get confusing. Like, if I've got a bunch of nested relationships that I'm going to be, like, dealing with all that data at once. So, like, the name of a page and, like, the name of a block and, like, the name of a button and stuff like that. Like, at that point, you might wanna, like, start adding prefixes so that you it doesn't get confusing.\u003C/p>\n\u003Cp>Or or, like, if you think of, like, organizations and contacts, you know, that might be organization name and then, like, contact name type of convention.\u003C/p>\n\u003Cp>Speaker 0: Yeah. Maybe I'll because we're gonna have a point of contact in here, so they'll wanna enter their name. So maybe I just I'll I'll just go with agency name here.\u003C/p>\n\u003Cp>Speaker 1: Or it could be partner name.\u003C/p>\n\u003Cp>Speaker 0: Partner name. That's right. Partner name. String, we wanna keep it empty. And go to fill it out.\u003C/p>\n\u003Cp>Obviously, that's gonna have to be required. I don't think any placeholder. If I wanna get fancy, I can add an icon. I'll hold off on that. Is there anything in the advanced field creation mode that I should be aware of?\u003C/p>\n\u003Cp>It doesn't seem like it's that advanced other than, like, maximizing the length of what they'll input.\u003C/p>\n\u003Cp>Speaker 1: Unique?\u003C/p>\n\u003Cp>Speaker 0: I'm not worried about that 1.\u003C/p>\n\u003Cp>Speaker 1: Yeah. So the name is probably not yeah. You're not really concerned about a unique name. The advanced field settings just gives you, like, more control over it. And you can always go back in later, like, after you create this and edit that.\u003C/p>\n\u003Cp>Right? When we get into, like, how you're gonna reference this on the front end. Right? That would probably be, like, the next thing that I would tackle as well as, like, a slug of, like, hey. We we've got this random string of characters, like, in the URL.\u003C/p>\n\u003Cp>We don't wanna use that. We wanna use, like, a slug. So\u003C/p>\n\u003Cp>Speaker 0: Okay.\u003C/p>\n\u003Cp>Speaker 1: That that's where we'll get into advanced.\u003C/p>\n\u003Cp>Speaker 0: And we don't wanna allow a null value.\u003C/p>\n\u003Cp>Speaker 1: Yeah. It it like, required is probably gonna take care of that. Like, that is gonna be on, like, the database side as well. Okay. Like, if you had any existing records in this, I probably wouldn't let you, like, check that or uncheck that box because, you know, like, you might have records that don't have a value for that specific field, like, if that field already existed.\u003C/p>\n\u003Cp>Speaker 0: Right. Okay. Cool.\u003C/p>\n\u003Cp>Speaker 1: Today, I'm in the weeds. Not sure what the acronym is for that 1. But\u003C/p>\n\u003Cp>Speaker 0: I do.\u003C/p>\n\u003Cp>Speaker 1: Yeah. So we're gonna keep editing. Alright. So your next field, I vote for slug. Slug.\u003C/p>\n\u003Cp>That is gonna be a string.\u003C/p>\n\u003Cp>Speaker 0: Having trouble with this.\u003C/p>\n\u003Cp>Speaker 1: You're gonna you're arching yourself. Yeah. Time for a page refresh.\u003C/p>\n\u003Cp>Speaker 0: Page refresh. Save. I lost it. Found it. Okay.\u003C/p>\n\u003Cp>Slug.\u003C/p>\n\u003Cp>Speaker 1: Alright. It's gonna be an input. Okay. Same thing. The key of slug.\u003C/p>\n\u003Cp>Okay. Yeah. Yeah. I would just call it slug. Be fine.\u003C/p>\n\u003Cp>Alright. So now then you have a a go into the Advanced Field Creation Mode.\u003C/p>\n\u003Cp>Speaker 0: Mhmm.\u003C/p>\n\u003Cp>Speaker 1: And we need to make sure this is URL safe. So you are going to go to the interface section, and there is a slugify option.\u003C/p>\n\u003Cp>Speaker 0: And what does that do? Prefix it?\u003C/p>\n\u003Cp>Speaker 1: Basically, like, anytime you try to add a space, it's gonna add a hyphen. Or if you try to use any, like, special characters that aren't allowed in a URL, it's not gonna allow you to input those.\u003C/p>\n\u003Cp>Speaker 0: Nice. Okay. Very cool.\u003C/p>\n\u003Cp>Speaker 1: And then in that case, you also are probably gonna want this to be unique. Right? Because, on the front end, this is gonna be part of the URL, and it's gonna be the unique identifier that we're 1 of the unique identifiers we're using to fetch that data for the agency. So, yeah, you could certainly set it to be required if you want to, or we could have, like, a flow that generates the slug. But on the, the schema page or the schema tab, you set that value to unique.\u003C/p>\n\u003Cp>Speaker 0: Feeling good about it. Alright. Bam. Now question. So we'll have agency name.\u003C/p>\n\u003Cp>We'll have their website. When it comes to adding, like it's just kind of jarring, I think, when you're filling out a form, when it's like these 2 questions and then 3 completely unrelated questions, which in this case would be like, here's about your agency. Oh, tell me about yourself. Let's talk about, like, something else. Is there a good way to maybe split up this?\u003C/p>\n\u003Cp>Like, use, like, maybe add in a header or some sort of field that breaks it up, or is it just, like, best best use case, best scenarios? Just like\u003C/p>\n\u003Cp>Speaker 1: you know, what I like to do in my forms is just make them all, like, half width. So you got, like, this, and then just add as many as you can in a row so that it's really confusing. Love it. No. There there's there's lots of great settings for that.\u003C/p>\n\u003Cp>If you open back up the create field, like, the ones that you're looking for, like, we call them alias fields, which basically, like, it's not really storing any, like, specific data inside the the actual database.\u003C/p>\n\u003Cp>Speaker 0: Right? Mhmm.\u003C/p>\n\u003Cp>Speaker 1: It is just controlling, like, the layout within the form. So those are gonna be under the group section.\u003C/p>\n\u003Cp>Speaker 0: Group. Groups.\u003C/p>\n\u003Cp>Speaker 1: Presentation. So you see there's a couple there. You have, like, presentation wise, there's, like, a divider. You can add some button links. You can add a notice to the form, and you can make that conditional.\u003C/p>\n\u003Cp>But if you wanna group related fields together, you got, like, the group options. So depends on how you want to slice it. Most of the time, I end up using, like, the detail group, which is basically, like, I could throw 35 group or 35 fields in that and hide them all with, like, a collapsible accordion type thing. The accordion is basically 1 field at a time, pops open. So, okay.\u003C/p>\n\u003Cp>Gotcha. Yeah. Most of the time, I end up using detail group.\u003C/p>\n\u003Cp>Speaker 0: Nice. I'm gonna try that. So then I'll call this, contact.\u003C/p>\n\u003Cp>Speaker 1: Yeah. And, usually, like, this is just like an OCD thing for me. What I end up doing is, like, a like, underscore details or group or, like, put, like, a meta prefix underneath it just so, like, I know, like, this field is just for, like, grouping.\u003C/p>\n\u003Cp>Speaker 0: I like it. Point of contact group. So, so we're gonna nest things underneath this group, or is it the once we hit save\u003C/p>\n\u003Cp>Speaker 1: Yeah. Just hit save. Do we can come back.\u003C/p>\n\u003Cp>Speaker 0: Question on this. Would we want it required, or do we require the separate ones? No.\u003C/p>\n\u003Cp>Speaker 1: You don't have to require that 1. I'm not even actually sure what what that would be.\u003C/p>\n\u003Cp>Speaker 0: Feels dangerous.\u003C/p>\n\u003Cp>Speaker 1: That might be a good feature request of, like, hey. We should probably do something within that. Alright. So now, basically, what you got, you've got a container within the form that you can drag fields into. But you gotta create some fields first for the point of contact.\u003C/p>\n\u003Cp>Speaker 0: Great. First name, last name, any like, just 2 separate inputs side by side, I guess.\u003C/p>\n\u003Cp>Speaker 1: I yeah. Are we going to use is there a situation where for your point of contact, you're gonna, like, use the just the first name?\u003C/p>\n\u003Cp>Speaker 0: I would say if we automate emails from Directus when they register their company, we're gonna wanna obviously personalize it, and we don't wanna say, hey, Bryant Gillespie. Thanks for signing up. It'd be much more casual to be like, hey, Bryant. So probably in that case, would it make sense to split up the 2?\u003C/p>\n\u003Cp>Speaker 1: I I would break them up in that case. Now the other consideration here is that you're gonna have a user that logs into this as well. And, like, are you gonna send that email to the user from that agency? Or, like, who the the designated point of contact is?\u003C/p>\n\u003Cp>Speaker 0: I would think whoever the designated point of contact is.\u003C/p>\n\u003Cp>Speaker 1: Okay.\u003C/p>\n\u003Cp>Speaker 0: So, like, as they they will give them ability to add other people under their their agency. And then when we can trigger notifications, like, when, hey, so and so from your team has signed up or maybe we put into delay that's like, hey. You sent an invite. They never signed up. Go, you know, strangle them.\u003C/p>\n\u003Cp>Not that\u003C/p>\n\u003Cp>Speaker 1: Go strangle them. Yeah. I got you. I got you. I I so and, like, POC to me, like, proof of concept, not point of contact.\u003C/p>\n\u003Cp>That's just because I'm building. So I would just call this, like, either, like, contact first name.\u003C/p>\n\u003Cp>Speaker 0: Contact first name.\u003C/p>\n\u003Cp>Speaker 1: Or you could probably I mean, yeah. That's probably fine.\u003C/p>\n\u003Cp>Speaker 0: Cool. Like it. Require. Save. This is the boring part of the show where I just fill in these things.\u003C/p>\n\u003Cp>Nat, you might wanna fast forward this part.\u003C/p>\n\u003Cp>Speaker 1: Get, like, some Benny Hill or something playing in the back. Right. Alright.\u003C/p>\n\u003Cp>Speaker 0: So here's\u003C/p>\n\u003Cp>Speaker 1: a question.\u003C/p>\n\u003Cp>Speaker 0: Let's say I wanna bump these 2 together. So I click here. Obviously, half width. I might be able to figure this 1 out myself, Bryant. I don't think You got\u003C/p>\n\u003Cp>Speaker 1: it, boss. You got it. Alright. So You can Now yeah. Go ahead and add your other field there.\u003C/p>\n\u003Cp>What are you you're gonna have, like, a point of contact email or contact email?\u003C/p>\n\u003Cp>Speaker 0: Point of contact email will be just another input field? Is there any special\u003C/p>\n\u003Cp>Speaker 1: Yeah. There is there's not like, as far as the database is concerned, it's just a string of text. Okay. You could go in and, like, apply some validation to it. You you can use, like, regex.\u003C/p>\n\u003Cp>We'll we'll leave that 1 for another call.\u003C/p>\n\u003Cp>Speaker 0: I've had my time I've served my time in regex. So let's let's say I wanna add a validation. Right? So, validation here, I wanna add, like it has to have an at, obviously, if it's an email. Just a little quick little validation.\u003C/p>\n\u003Cp>I would add a filter contact email. And this is must, like Contains. Yeah. Contains just a at symbol? Yeah.\u003C/p>\n\u003Cp>Speaker 1: It has to contain an at symbol somewhere. Now I didn't like That's The the other, like, fun bit of this, right, is what if they put 2 at symbols. Right? That your validation there would pass. So this is where, like, you could reach for reg x, but, you know, again, that's just we could spend, like, 45 minutes to an hour just like, what is reg x?\u003C/p>\n\u003Cp>Yeah.\u003C/p>\n\u003Cp>Speaker 0: Is this, do you think this is something that can be well, not think, but once I create these fields, are they set in stone? And what I have to, like\u003C/p>\n\u003Cp>Speaker 1: so the only thing that you can't change here is gonna be, like, the keys. So, like, the key of the field that you set on the schema. Like, once you commit this, or that can't go back and change the key of that field because there's a lot of references inside the database.\u003C/p>\n\u003Cp>Speaker 0: Right. Okay.\u003C/p>\n\u003Cp>Speaker 1: Now if I've got database access, I could, but I I wouldn't put that evil on you.\u003C/p>\n\u003Cp>Speaker 0: Yeah. We'll try it without.\u003C/p>\n\u003Cp>Speaker 1: Alright.\u003C/p>\n\u003Cp>Speaker 0: Cool. So that makes sense. I can change that validation later in that case. So it didn't require it. Edit field, required.\u003C/p>\n\u003Cp>So I can go in. Look at that.\u003C/p>\n\u003Cp>Speaker 1: You can do all that. Reach.\u003C/p>\n\u003Cp>Speaker 0: Okay. Cool. So I feel like that's good for the point of contact. The next thing is gonna be location.\u003C/p>\n\u003Cp>Speaker 1: Yeah.\u003C/p>\n\u003Cp>Speaker 0: So for this section, and just because I saw this divider thing, and I'm just gonna add that in there. I'm just gonna save a divider. Location. Now I know we have, like, a map, geospatial fields, things like that. I don't know if it makes sense to have the map as your input for the location.\u003C/p>\n\u003Cp>But if we're doing it by country, it would make sense to do it as a pick list or a drop down. Right?\u003C/p>\n\u003Cp>Speaker 1: Yeah. Or you could just have it as an input as well. It depends on, like, the like, if you wanna normalize it. Right? So So on the\u003C/p>\n\u003Cp>Speaker 0: front end yeah.\u003C/p>\n\u003Cp>Speaker 1: So on the front end\u003C/p>\n\u003Cp>Speaker 0: if we're gonna do it on the front end, like, thinking of the filter ability is it'll be a drop down for them. Like, I'm imagining, like, a bar at the top, and then they can just drop down, list of countries, pick it, and then it'll propagate all the ones that have that. As an input, would that if somebody misspells, if somebody enters the USA as opposed to, like, United States or America, all of those little, like, side use cases cases, it would run into an issue there. We'd have to figure a way to normalize them on the back end.\u003C/p>\n\u003Cp>Speaker 1: Correct. Yeah. It'd be a pain in the ass, basically.\u003C/p>\n\u003Cp>Speaker 0: Technically speaking, that would be a pain in the ass. Thank you, doctor.\u003C/p>\n\u003Cp>Speaker 1: Drop down? You could. You could do a drop down. Like, the the trouble here, right, is you gotta get a list of all the country codes or all the countries that that we have partners in if you're gonna do a drop down. Right?\u003C/p>\n\u003Cp>Because I got it. Like, you you could oh, you've got it. Well, then, yeah, go for it, dude. Is this the same\u003C/p>\n\u003Cp>Speaker 0: or, like, GitHub country list? And there's a plain text list of countries that you can copy and paste, from directly from GitHub.\u003C/p>\n\u003Cp>Speaker 1: Woah. They\u003C/p>\n\u003Cp>Speaker 0: also have it in a JSON format, but with the ISO code. But Alright.\u003C/p>\n\u003Cp>Speaker 1: So, like, underneath the hood, when you are setting up that drop down feel, like, if you wanna click on it, those like, the choices there. So, yeah, if you just call this you might as well just call it country. Right? So we'll give it a key of country. The choices that you've got there, if you go in and you just add 1, right, You've got a text and a value.\u003C/p>\n\u003Cp>Right. So the text is gonna be what's displayed inside the application, and then, like, the value here could either be, like, the same thing or or the probably the way that I would do it would be, like, the the 2 digit country code, like, the ISO standard or whatever that is. I'm not sure what that is for Afghanistan.\u003C/p>\n\u003Cp>Speaker 0: Yeah. I'm gonna go with the easier 1 here.\u003C/p>\n\u003Cp>Speaker 1: Yeah. And I would honestly, it'd probably be, Yeah. I don't know. What's your does your GitHub data have it in, like, all caps or lowercase?\u003C/p>\n\u003Cp>Speaker 0: I will share the screen. Actually, I'll pull it up here. Cool.\u003C/p>\n\u003Cp>Speaker 1: Oh, yeah. They're all uppercase.\u003C/p>\n\u003Cp>Speaker 0: So all uppercase, and then they've got somebody did the due diligence of typing in the things down here in a JSON format. So what do you think is the best way to go about this?\u003C/p>\n\u003Cp>Speaker 1: I would grab the JSON data. You if you got Versus code?\u003C/p>\n\u003Cp>Speaker 0: I do. I do, actually.\u003C/p>\n\u003Cp>Speaker 1: Okay. Alright. And we're gonna make a giant drop down here. Like, the the other thing that we could do, there's a there's an auto complete option where you can call an API, but I don't know I don't have a good country code API right off the the top to get just like the the ISO codes, so it'd be fine. Open up Versus Code.\u003C/p>\n\u003Cp>Speaker 0: Alright. I gotta change my streaming here. Getting me all twisted. Versus Code.\u003C/p>\n\u003Cp>Speaker 1: Alright. So copy that list. Create a new file here. Copy your list of the data from GitHub. Paste the\u003C/p>\n\u003Cp>Speaker 0: JSON list that was created?\u003C/p>\n\u003Cp>Speaker 1: Alright.\u003C/p>\n\u003Cp>Speaker 0: This is a long list.\u003C/p>\n\u003Cp>Speaker 1: Yeah. Let's, alright. It it gets more interesting when you, like, hey. Are you gonna reference this again somewhere else? And then at that point, you might as well add it as a table in the database and reference it that way.\u003C/p>\n\u003Cp>So you could use it in other collections without having to either copy the field or maintain this thing. Alright. So what are you gonna do here? Like, basically, this is not in the correct format for Directus. Right?\u003C/p>\n\u003Cp>We've got an ISO code, and we've got the country. Directus, as far as like your choices for the drop down, is expecting a text and a value. So this what are you gonna do here? You are going to, like, highlight where it says ISO code, and hit command f or you're on a Mac, so it should be command so just pick 1 of those those values. Go over there where it says ISO code.\u003C/p>\n\u003Cp>Just highlight that part.\u003C/p>\n\u003Cp>Speaker 0: Mhmm. 1 second. I think this list might be wrong, actually, because I don't see will the USB enter a different name?\u003C/p>\n\u003Cp>Speaker 1: United States.\u003C/p>\n\u003Cp>Speaker 0: I'm not finding it.\u003C/p>\n\u003Cp>Speaker 1: Do you is it is your search case sensitive?\u003C/p>\n\u003Cp>Speaker 0: Is it? I don't know. No. No results. America only turns up.\u003C/p>\n\u003Cp>Samoa Americana. Yeah. This is wrong. This is the hazard. We're using GitHub.\u003C/p>\n\u003Cp>I'm gonna go ahead and just use this standard list that this person didn't falsify because this 1 looks right, which is just the list of countries, not in a JSON format.\u003C/p>\n\u003Cp>Speaker 1: Okay, boss man. Alright. What do you think? So, alright. This is gonna be the wizardry on the keyboard.\u003C/p>\n\u003Cp>Alright. So select all, command a. Mhmm. Alright. Now hit command right.\u003C/p>\n\u003Cp>Or is it shift command right? No. I I don't know how you got yours set up. Hold shift and do command right.\u003C/p>\n\u003Cp>Speaker 0: Shift command right.\u003C/p>\n\u003Cp>Speaker 1: Okay. Yeah. We don't have you set up right. If you have this list, is it if I select all yeah. It's not we need to get you to split this into lines.\u003C/p>\n\u003Cp>Is it Command P? Do Command P. Is that the Toolbar? Okay. Alright.\u003C/p>\n\u003Cp>Now do a greater than symbol, and search for, like, split into lines. What is it? Split? Hang on. I'll tell you.\u003C/p>\n\u003Cp>I'm trying it now.\u003C/p>\n\u003Cp>Speaker 0: Split join tag.\u003C/p>\n\u003Cp>Speaker 1: Print that lines, join lines, expand line selection.\u003C/p>\n\u003Cp>Speaker 0: Insert line?\u003C/p>\n\u003Cp>Speaker 1: No.\u003C/p>\n\u003Cp>Speaker 0: Insert line below?\u003C/p>\n\u003Cp>Speaker 1: No. It should be, what is the I know the command on mine. Add cursor. Is it add cursor? Endo.\u003C/p>\n\u003Cp>Line. Add cursors to line ends is the name of it.\u003C/p>\n\u003Cp>Speaker 0: Add cursor to line end.\u003C/p>\n\u003Cp>Speaker 1: Yep. Alright. So what that's gonna do. Shift option. Oh, yeah.\u003C/p>\n\u003Cp>Yeah. I've I've got a different command. Alright. So now, you see you got, like, a cursor on all of those. Woah.\u003C/p>\n\u003Cp>It's pretty pretty dope. Right? Alright. So now what you're gonna do, now you should be able to hold command and shift and left. That's gonna select all those individual yeah.\u003C/p>\n\u003Cp>Go left. Alright. Alright. Selected. So now you get them all individually.\u003C/p>\n\u003Cp>Now you're gonna pop the, quotation mark.\u003C/p>\n\u003Cp>Speaker 0: Just put in a quotation mark.\u003C/p>\n\u003Cp>Speaker 1: Yep. Shift quotation. Yeah. I mean, not shift quotation, but just quotation mark. Alright?\u003C/p>\n\u003Cp>Yeah. Now you're gonna do command left. Command left. That'll get you to the start of the line. Now you're gonna add a left code bracket or mustache syntax there.\u003C/p>\n\u003Cp>Left. Yep. Alright. Do, what are we looking for? We're looking for a value.\u003C/p>\n\u003Cp>Mhmm. So you're gonna do quotation mark value. Type type\u003C/p>\n\u003Cp>Speaker 0: in value?\u003C/p>\n\u003Cp>Speaker 1: Yep. This is gonna be proper JSON now.\u003C/p>\n\u003Cp>Speaker 0: Oh, boy. Quotation mark.\u003C/p>\n\u003Cp>Speaker 1: Quotation mark, comma, or no. Not comma. I'm sorry. It's a, colon. There you go.\u003C/p>\n\u003Cp>Alright. Now go to the end of the line.\u003C/p>\n\u003Cp>Speaker 0: Command right. Yep.\u003C/p>\n\u003Cp>Speaker 1: Command right. Yep. Add your What's that? Is your right mustache. And then you are going to add a comma.\u003C/p>\n\u003Cp>Alright. Now, go hit command up. And because this is an array of values, we gotta use the, I don't even know what that's called. Bracket? What is that called?\u003C/p>\n\u003Cp>It's it's not it's it's not the shift key.\u003C/p>\n\u003Cp>Speaker 0: Yep. And then I'll do this.\u003C/p>\n\u003Cp>Speaker 1: At the very bottom, you gotta add another 1.\u003C/p>\n\u003Cp>Speaker 0: And then it's gonna be the closed.\u003C/p>\n\u003Cp>Speaker 1: This is an array of values. There you go. And then on that last 1, what you're gonna do, the very last value there, remove that comma. And now you have a valid JSON array that you can copy that whole thing. The formatting doesn't matter.\u003C/p>\n\u003Cp>Speaker 0: How do I copy? Just kidding.\u003C/p>\n\u003Cp>Speaker 1: It's I can't help you with that.\u003C/p>\n\u003Cp>Speaker 0: This is amazing, by the way. I just learned how to do JSON.\u003C/p>\n\u003Cp>Speaker 1: TIO. Yeah. You you learned a couple things. Right? You learned, hey.\u003C/p>\n\u003Cp>Like, the some of the keyboard shortcuts for Versus Code, especially when you're trying to do reformatting and stuff like this. Super helpful for that.\u003C/p>\n\u003Cp>Speaker 0: I'll never remember him. But, so I'm gonna discard this because this was what we were trying to do earlier. But, am I on the wrong page? On the wrong page.\u003C/p>\n\u003Cp>Speaker 1: So Yeah. Nobody could see what you're doing.\u003C/p>\n\u003Cp>Speaker 0: I didn't mean what we just did. I meant what and yeah. That would've been terrible.\u003C/p>\n\u003Cp>Speaker 1: Yeah. I'm gonna jump through the computer and strangle you at that point.\u003C/p>\n\u003Cp>Speaker 0: Show me all the shortcuts again. Okay. So we've got our JSON copied. Yep. We're using this drop down unless you\u003C/p>\n\u003Cp>Speaker 1: So where it says choices. Mhmm. Paste your JSON. So click where it says choices. Just the header.\u003C/p>\n\u003Cp>There you go. Paste raw value or yeah. You could hit edit raw value and paste it in there.\u003C/p>\n\u003Cp>Speaker 0: Done? Done. Done. Done. Done.\u003C/p>\n\u003Cp>Speaker 1: Except we forgot to add text to all of those, do we?\u003C/p>\n\u003Cp>Speaker 0: Did we? Oh, from the front end. Because it won't show the presentation of it. Right? We forgot.\u003C/p>\n\u003Cp>Speaker 1: Now what do you do?\u003C/p>\n\u003Cp>Speaker 0: Should I restart? I think we're we're really, like, pretty fast. Right? We should be able to do that pretty fast. Or wait.\u003C/p>\n\u003Cp>Can I just take the no?\u003C/p>\n\u003Cp>Speaker 1: You could just copy the values. Yeah. For now, just save it. It should let you save it. Yeah.\u003C/p>\n\u003Cp>And I don't know if it's going to\u003C/p>\n\u003Cp>Speaker 0: throw an error on.\u003C/p>\n\u003Cp>Speaker 1: Yeah. I'm actually not sure how the drop down will behave. It'll let you save it for sure. But I I don't know if when you actually test it out, if it will show that value because it doesn't have the actual text to to do that with. Okay.\u003C/p>\n\u003Cp>We can we can look at it, though. We'll sort that out in a moment. Alright. What's next, man?\u003C/p>\n\u003Cp>Speaker 0: So next.\u003C/p>\n\u003Cp>Speaker 1: Yeah. It's driving me freaking crazy. The OCD part of him, like, the x designer in me. Like, you've you've got the point of contact group. Just drag those contact fields into that.\u003C/p>\n\u003Cp>Because, otherwise, they're not gonna display inside that group or or not be collapsible.\u003C/p>\n\u003Cp>Speaker 0: How's this helping your OCD?\u003C/p>\n\u003Cp>Speaker 1: Gotcha. That's that's why I call myself a recovering designer.\u003C/p>\n\u003Cp>Speaker 0: Gotcha. Gotcha. Okay. Cool. So I think we're in a good spot here.\u003C/p>\n\u003Cp>I'm gonna add this quick, for, like, a description or something like that. Just use, like, a text area probably. Makes sense.\u003C/p>\n\u003Cp>Speaker 1: Yeah.\u003C/p>\n\u003Cp>Speaker 0: Agency description.\u003C/p>\n\u003Cp>Speaker 1: Yeah. So, like, the in the database, it's gonna be stored as, like, text no matter what which you whether you use, like, a WYSIWYG editor or a text area. The difference with the text area is you're not gonna have any, like, rich text formatting. So it depends on if you need that. You know, you could have hey.\u003C/p>\n\u003Cp>This is where you go back to, like, modeling your data of, like, hey. Do we have, like, a short description? Like, if we're showing cards on a page, we probably have, like, a short description. And then maybe on, like, if you click into a partner, you might have, like, a longer section of content or something.\u003C/p>\n\u003Cp>Speaker 0: That's a great point. So, yeah, this is actually gonna be structured as 2 pages. So we'll have the directory, which is this, gonna be the main thing. And then when they click into it, we'll have a separate page that is a little bit more and we'll have the WYSIWYG there. But this will just be like a short description of partner that'll be on the front.\u003C/p>\n\u003Cp>And honestly, like, I would probably limit this to a certain number of characters, setting a softer limit to I don't know. What do you think? 300 characters? What's the old Twitter thing? 250?\u003C/p>\n\u003Cp>Speaker 1: You're asking the wrong guy. 170. Is that was that what it is? 270?\u003C/p>\n\u003Cp>Speaker 0: 280. We'll set that.\u003C/p>\n\u003Cp>Speaker 1: Yeah. Soft limit. So, hey, that soft limit that you just set there, that is only on the the UI. Right? Like, the there's no particular limit there on the the actual database.\u003C/p>\n\u003Cp>Speaker 0: Okay. That's fine. I, no. Actually, it's not fine because they're That's where, like, the building this out in the database. Right?\u003C/p>\n\u003Cp>Speaker 1: No. No. No. It's fine. Yeah.\u003C/p>\n\u003Cp>Hey. Like, because we're interacting through this, this layer, right, this Directus Studio, and through the Directus APIs, it's not a problem. Like, Directus will give us that validation. Great. If I wanted to enter validation.\u003C/p>\n\u003Cp>Speaker 0: Let's say I just want to say in the field itself, by the way, only 280 characters. Placeholder would not be the 1 to do that because they'd have to, like, erase that. Right? Would there be\u003C/p>\n\u003Cp>Speaker 1: a placeholder is basically just like, hey, what do I want? You know, like, a an extra hint for somebody, like, on a\u003C/p>\n\u003Cp>Speaker 0: Maybe a note here. Like\u003C/p>\n\u003Cp>Speaker 1: Yeah. A note is, like, a description below the field basically.\u003C/p>\n\u003Cp>Speaker 0: Let's try that. Great. Feeling good about it. Description, areas of expertise, we'll probably wanna keep this limited to, the ones that we have so we can fill use those as filters as well at some point. We'll do that as a drop down, multiple because you're gonna have multiple special specializations, I guess.\u003C/p>\n\u003Cp>Yay? You and A?\u003C/p>\n\u003Cp>Speaker 1: Yeah. Yeah. I mean\u003C/p>\n\u003Cp>Speaker 0: I see it says JSON here. I always get Or Expertise.\u003C/p>\n\u003Cp>Speaker 1: Yeah. It's a JSON. It's just gonna just the way it's being stored. Like, are we going to are you gonna allow them to filter based on those specializations or no?\u003C/p>\n\u003Cp>Speaker 0: I think at some point, I think it would be country and specialization would be the 2 things that you're gonna that you're gonna be searching for when you land on, like, a directory page.\u003C/p>\n\u003Cp>Speaker 1: Okay. So on that point, like, the the current operation, like, I cannot set I I can't query the data within that individual, like, JSON column. That should be coming in the future. As of right now, we don't have support for\u003C/p>\n\u003Cp>Speaker 0: it. Okay.\u003C/p>\n\u003Cp>Speaker 1: So at that point, then we need to look at a different way to do it, which would probably be, like, adding a database table for it. Or, what you can do do is just change the type to CSV, and that would allow us to get, like, a, hey, does this specialization field contain x? Okay. Because III think that's probably the extent of it. Right?\u003C/p>\n\u003Cp>Like, you're just gonna use it as a criteria for filtering this 1 thing. Probably, it should be fine. We'll do CSV.\u003C/p>\n\u003Cp>Speaker 0: Nice. Okay. So then we'll do website, development. Website. Web\u003C/p>\n\u003Cp>Speaker 1: web development.\u003C/p>\n\u003Cp>Speaker 0: You developers. So cool. Why say long word when short word work better?\u003C/p>\n\u003Cp>Speaker 1: Well, it could be like a web app. Alright. So these are these are the things that go through your mind, like the average developer, like, 100 times a day when you're building a project. If you see, like, a a puzzled look on their face, they're probably trying to figure out what to name the thing that they're trying to create. They know what the they already know what the thing looks like.\u003C/p>\n\u003Cp>It's all going up here, but it like, naming it is like, what\u003C/p>\n\u003Cp>Speaker 0: do we call this? Number 1. The number 1 thing. Okay. Mobile application, mobile app.\u003C/p>\n\u003Cp>Is that fine? Can I shorten application to app? It What about that?\u003C/p>\n\u003Cp>Speaker 1: It is. It's fine, man.\u003C/p>\n\u003Cp>Speaker 0: Alright. If you you being a previous agency owner, you're probably the best 1 to ask for this. What are some other specializations you can think off the top of your head?\u003C/p>\n\u003Cp>Speaker 1: Like UX, UI.\u003C/p>\n\u003Cp>Speaker 0: Should I And you get When I'm doing the value here, do they have to be a specific\u003C/p>\n\u003Cp>Speaker 1: like, option? It it doesn't. Like, it you know, like, technically, it could just be, like, UXUI.\u003C/p>\n\u003Cp>Speaker 0: Like this without an underscore?\u003C/p>\n\u003Cp>Speaker 1: It doesn't have to be. You see me start to sweat, like I'll do doing. Like, what whatever you do, it like, it's just gotta be normalized. Right? Like, you the most important part is, like, whatever convention you decide on, it's the same across the board, so you don't have major issues.\u003C/p>\n\u003Cp>Speaker 0: Okay. How do you feel about the spaces between this?\u003C/p>\n\u003Cp>Speaker 1: That's fine. I like it.\u003C/p>\n\u003Cp>Speaker 0: Alright. Web development, mobile application. I should probably change that to apps. Mobile applications. UXUI.\u003C/p>\n\u003Cp>Speaker 1: Digital transformation? That was that was the 1 that came up. Yeah.\u003C/p>\n\u003Cp>Speaker 0: Digital transformations.\u003C/p>\n\u003Cp>Speaker 1: Yeah. And and, like, technically, like, you could also like, do you get into, like, the specific frameworks here? You know? That's I I don't know. I would say,\u003C/p>\n\u003Cp>Speaker 0: you know, you come in with you need a project. There's only a few there's the way executing the project, you can do it building in a reactor view or whatever, but the actual project itself is what I'm trying to zoom in here on. And I feel like the 4 of these would probably touch most of those because we're, you know, we're not gonna skew into, like, public relations or, like, digital marketing, whatever that means. But,\u003C/p>\n\u003Cp>Speaker 1: yeah, it's like I'm I'm saying, like, hey, would you be, like, a yeah. We're like a a Laravel agency or, like, we are, you know, like a a React agency or, you know, those sorts of things.\u003C/p>\n\u003Cp>Speaker 0: That's another consideration and probably not for this episode, but I would probably add that as another field here of like this these are the things we specialize in React view.\u003C/p>\n\u003Cp>Speaker 1: Yeah. That could be, like, your expertise, I guess.\u003C/p>\n\u003Cp>Speaker 0: I don't know. Yeah. Specialization in expertise. These feel good. I'll, I'll leave them as the for now, for the sake of this episode and update those later.\u003C/p>\n\u003Cp>Let's see. Just exit that.\u003C/p>\n\u003Cp>Speaker 1: I was also a friend to you and and updated your country codes for you as well.\u003C/p>\n\u003Cp>Speaker 0: Oh, thank you. Much appreciated. So for logo, image, or file? What do you think?\u003C/p>\n\u003Cp>Speaker 1: Either 1. So, like, behind the scenes is basically the same. It's just like how you want it to display. So in this case, you probably wanna see, like, a nice image. We'll just call it logo.\u003C/p>\n\u003Cp>Yeah. That's fine. Partner logo. Yeah. So just use the image.\u003C/p>\n\u003Cp>Like, it it files there is gonna create a junction collection. So, like, if you need, like, a gallery, we would use that. But in this case, we just want a single logo to display.\u003C/p>\n\u003Cp>Speaker 0: Nice. Okay. Feels good. We can update this file library route later. We'll have, like, an agency specific folder.\u003C/p>\n\u003Cp>Speaker 1: Yeah. That's what I would do.\u003C/p>\n\u003Cp>Speaker 0: Crop to fit. Anything to be aware of in the advanced field creation for this sort of thing? Like, images or anything?\u003C/p>\n\u003Cp>Speaker 1: If you go into, like, display, like, you could control, like, how you want this to actually display. Right? So you wanna see, like, a tiny image preview, and then you can control, like, how it crops, basically.\u003C/p>\n\u003Cp>Speaker 0: Okay. Cool. Partner logo. And then this last bit is gonna be actually, we'll do size, 2 more fields. So size, numbers, but it'll still be kind of a drop down situation, I'm assuming.\u003C/p>\n\u003Cp>Speaker 1: So is it a is it like a are you storing a number, or is it like a it'll be a string? It'll be a Is it like 1 to 10 or, like, hey, like, we have a 100 or we have 56, we have 7.\u003C/p>\n\u003Cp>Speaker 0: I don't wanna get, like, too specific because I'd rather group it into, like, small, medium, large because at some point, we can filter that on the front end too. Yep. I need the enterprise company. I'm an enterprise company, enterprise agency, yadayada. So drop down\u003C/p>\n\u003Cp>Speaker 1: with Just hit me with the Seinfeld.\u003C/p>\n\u003Cp>Speaker 0: Yeah. Seinfeld references into 2024. Let's go. Agency, partner size. Let's say partner size.\u003C/p>\n\u003Cp>Speaker 1: Yeah. Yeah. I would get, like, team size or something. Right? Like, hey.\u003C/p>\n\u003Cp>That's the the other thing here is, like, do you need to, like, prefix each and every 1 of these fields or or just the ones that, like, could get confusing?\u003C/p>\n\u003Cp>Speaker 0: Now you're making me sweat about naming conventions. I'm not gonna\u003C/p>\n\u003Cp>Speaker 1: It's it's seriously like the hardest part.\u003C/p>\n\u003Cp>Speaker 0: Not today, Satan. I'm gonna leave the the naming confessions away for for now. Let's do 109. That'll be small. For value, here we go.\u003C/p>\n\u003Cp>1 underscore 9? No.\u003C/p>\n\u003Cp>Speaker 1: Just just do 1 to just keep it the same for it.\u003C/p>\n\u003Cp>Speaker 0: What about 5?\u003C/p>\n\u003Cp>Speaker 1: Alright. No. Just keep it the same, like, 1 to 9. Just the exact same thing. Right.\u003C/p>\n\u003Cp>Speaker 0: 19. 10 to 99.\u003C/p>\n\u003Cp>Speaker 1: It it it's just a string of text. It doesn't really matter.\u003C/p>\n\u003Cp>Speaker 0: It's a string of text, yet it's numbers. How's that for some\u003C/p>\n\u003Cp>Speaker 1: Yeah. I get yeah. Confucius wisdom. Confucius. Yep.\u003C/p>\n\u003Cp>Yeah.\u003C/p>\n\u003Cp>Speaker 0: Alright. That feels good. Those are the 3 required. At some point here's a question. Here's a question for you.\u003C/p>\n\u003Cp>Alright. So let's say at some point down the road, I want to have a field that is, if choice is 1 through 9, show small or, like, show another type of text. Is that something that's doable through here?\u003C/p>\n\u003Cp>Speaker 1: Like, what are you gonna show?\u003C/p>\n\u003Cp>Speaker 0: Like, if I wanted to Small,\u003C/p>\n\u003Cp>Speaker 1: like, you are small.\u003C/p>\n\u003Cp>Speaker 0: Like Yeah. Like Yeah. Yeah.\u003C/p>\n\u003Cp>Speaker 1: Like, that feels unfair. Like, yeah, I did. Like, III didn't have a team larger than 9.\u003C/p>\n\u003Cp>Speaker 0: Let's say, I said that.\u003C/p>\n\u003Cp>Speaker 1: Partner program. Hey. You are small.\u003C/p>\n\u003Cp>Speaker 0: You're just like a shrimp. Alright. So instead of that, let's say internally, we wanna have some, like, normalization and, like, it when you're just talking about internally or showing, like, we have, we have 10, 1 through 9 agencies. It's kinda confusing as opposed to, like, we have 10 small agencies or agencies on the small side.\u003C/p>\n\u003Cp>Speaker 1: I so I mean, you could you could, like, for the values, like, if you really wanted small, you could. But, like, you know, my question to you would be, like, what does small mean? Right? So, like like, I I think what you've got here is fine. You might you say, like, 1 to 9 employees or something.\u003C/p>\n\u003Cp>You know? But, like, if you wanted to, like, do something based on this data, it it depends on where you're doing it. Right? If I'm doing it on the front end, like, I could just add that to my front end logic. Like, hey.\u003C/p>\n\u003Cp>If this is a small agency or if the value is 1 to 9, we show a badge that says, hey. This is a freelancer, or this is a small agency, or boutique, or something like that. You know, that always sounds nicer than small boutique. Bespoke.\u003C/p>\n\u003Cp>Speaker 0: Yeah. Boutique. It's not the size of the dog, Bryant. It's the fight in the dog.\u003C/p>\n\u003Cp>Speaker 1: There you go. Yeah. So you can certainly do something like that. Or if you wanted to, like, gather some additional information, like, if if they were, like, a a larger company, if you needed, like, some type of like, hey. We need a a VAT number or something.\u003C/p>\n\u003Cp>You can set up conditional fields for that as well if you need to.\u003C/p>\n\u003Cp>Speaker 0: Okay. Cool. Sorry to digress. But, yeah, good to know. Yeah.\u003C/p>\n\u003Cp>We we can do that down the road. Last thing here is we wanna showcase. So we're we want them to be able to upload a couple of their projects that they've completed with Directus. So would we use files for that? Multiple uploads?\u003C/p>\n\u003Cp>The idea is gonna be the deliverable, I guess, is gonna be we want them to upload\u003C/p>\n\u003Cp>Speaker 1: Are they gonna is it just images, or are they describing the projects and, like, talking about them?\u003C/p>\n\u003Cp>Speaker 0: It would probably be screenshots with some a little bit of text about what the project was. So a little bit of, like, descriptor. So maybe treating that like a caption to the image. I'm not really quite sure the best way to deliver it unless it's a different out outside of this initial form where they would have a different form where they could upload all this project information.\u003C/p>\n\u003Cp>Speaker 1: This is a relationship in my mind. Because 1 of the other stated goals that I heard, when we were initially putting this together was we wanna have a page, that showcases these projects. Yeah. So to me, that would be, like, a separate table, separate collection called projects, partner projects, could just be projects. I don't think we've got a I don't think we have a project table in here right now.\u003C/p>\n\u003Cp>We have what do we have? We have a project management folder. Yeah. So you're you're you're clear. Right?\u003C/p>\n\u003Cp>Speaker 0: Mhmm.\u003C/p>\n\u003Cp>Speaker 1: What are you gonna do now? Now that you know the way forward.\u003C/p>\n\u003Cp>Speaker 0: Something to something. I I don't know the difference between many to many or 1 of many, but I feel like it's 1 of these. 1 to many, I would assume. Because you're gonna have this 1 record attached to many different projects. Or is it the other way around?\u003C/p>\n\u003Cp>Speaker 1: So in this case, you can't have the same project belonging to 2 different agencies. Right. So it would be a 1 to many in this case because you're on the agency. Mhmm. 1 agency could have many projects.\u003C/p>\n\u003Cp>Now if you were, like, inside of a a project, it would be reversed. It would be, many to 1.\u003C/p>\n\u003Cp>Speaker 0: Okay.\u003C/p>\n\u003Cp>Speaker 1: I I would just call it projects. Projects. Killing me. We don't have we don't have, we don't even have a project stable. So that's gonna be fun as well.\u003C/p>\n\u003Cp>Right? So whenever you're creating these relationships, you have to have a related collection, which is basically just a table in the database underlying that.\u003C/p>\n\u003Cp>Speaker 0: Okay. Cool. Great. So that'll be what I'm thinking is for this show, we'll split it up into, like, a few different episodes because I've we've we're coming up on an hour here, having just built, like, this initial form. So we'll do, like, the next part.\u003C/p>\n\u003Cp>Let's set up those the showcase pages and potentially get into, like, role based access control a little bit. But, yeah. Is it Don't\u003C/p>\n\u003Cp>Speaker 1: leave me hanging here, bruh. Finish this guy out.\u003C/p>\n\u003Cp>Speaker 0: I can't. I'm unable to.\u003C/p>\n\u003Cp>Speaker 1: It's because you get to pick a related collection. Oh, this is the cliffhanger.\u003C/p>\n\u003Cp>Speaker 0: Yeah. This is where, you know, the end of every ER show, there's, like, something that happens. A helicopter explosion. This is our helicopter explosion. But, to move forward here on the next episode, I will have created just a simple projects collection with no data in it, and then this will be saved to that collection because I'll pick it here.\u003C/p>\n\u003Cp>Right?\u003C/p>\n\u003Cp>Speaker 1: You can actually create it right here.\u003C/p>\n\u003Cp>Speaker 0: Can I?\u003C/p>\n\u003Cp>Speaker 1: Yeah. In like 2 seconds. So where you have the related collection, it's it's 1 of the required fields. Those are the ones that have the stars beside them. Yes.\u003C/p>\n\u003Cp>Speaker 0: Stars Alright. Equal required. Yeah.\u003C/p>\n\u003Cp>Speaker 1: Alright. It it doesn't show up in the drop down, but what you could do, just type in projects. Alright? Now you're gonna need a foreign key. A foreign key is in that other table.\u003C/p>\n\u003Cp>How does it link back? Right? So that would be your partner, Or that's what I would call it anyway. Like, what is the field gonna be called inside the projects table, inside that projects collection?\u003C/p>\n\u003Cp>Speaker 0: That will\u003C/p>\n\u003Cp>Speaker 1: Is gonna be the part.\u003C/p>\n\u003Cp>Speaker 0: To this table? Okay.\u003C/p>\n\u003Cp>Speaker 1: Yep. Now this is it's not apparent what's happening here. So what are you gonna do? Go to Advanced Field Creation Mode, and go to the Relationship tab. Alright.\u003C/p>\n\u003Cp>So do you see down at the bottom what's happening here?\u003C/p>\n\u003Cp>Speaker 0: Problem that we created within your data model. So they're gonna create projects and then the identifier for that project of, like, where it ties back to.\u003C/p>\n\u003Cp>Speaker 1: Yep.\u003C/p>\n\u003Cp>Speaker 0: Okay. I mean, that's, I think, a great stopping point for this first part 1. We didn't know it was gonna split into parts, so I'm cool with that. This feels good. Now everything auto saves was 1 of my favorite features ever.\u003C/p>\n\u003Cp>If I go to content right here, agency partners, and then this is kind of the base thing that they'll see. Obviously, we can tweak this a little bit. But, yeah, everything we've set up is here. Great. Technically, I'm found.\u003C/p>\n\u003Cp>Speaker 1: I don't know. I I think you're still in the yeah. Okay. It's like you started moving towards the target there. Like, you're still, like, a 100 clicks off.\u003C/p>\n\u003Cp>Where would you be for this?\u003C/p>\n\u003Cp>Speaker 0: I've left the trials, and I'm officially in the tribulations. So, we're making our way there. But awesome. Bryant, I appreciate you joining, helping guide me, shepherd me through this, you know, data forest.\u003C/p>\n\u003Cp>Speaker 1: Data forest. Yeah.\u003C/p>\n\u003Cp>Speaker 0: Next episode, we're gonna tackle setting up the showcase pages, and we will start to get into role based access control for those partners to access this stuff. Thanks everybody for tuning in. Looking forward to the next 1, next episode of Technically, I'm Lost.\u003C/p>","Hey, everyone. I'm Matt here with the Directus Marketing team. I am joined by my friend and confidant for this call, Bryant Gillespie. Bryant, how are you? I'm awesome. Great. Yeah. I feel like I don't have to introduce you because you're, like, on every show here. But, you know? I I appreciate the intro, man. I you know? Like, I it's always nice when people pretend not to do me. My wife does that all the time. You're just too famous around these parts. I get it. I get it. But yeah. So Bryant was literally just asking because I roped him in right before this. What are we doing again, and what is the concept for this show? So as a person on the direct marketing team, 1 of the few here that is actually very, nontechnical, I sit more on the marketing side of things. I just am trying to learn how to become more technical in my role and learning how to use Directus and things like that. So, concept for this show, technically, I'm lost, is gonna be me kinda navigating a lot of these trials and tribulations that it comes with being a nontechnical person that's trying to learn how to actually use technology and code and direct us to the product itself, and I'll be doing so with help from guests like mister Bryant here. We'll be building various things that we actually have to use internally, that we have coming up, and I figured why not delay the timeline and try to build it myself. So here we are. Bryant, was that a pretty good breakdown of everything? III like it. I like the trials and tribulations part of it really got me. Yeah. I feel like, I don't know what to expect out of this, but I expect it to be painful. Like, there's a forecast of pain coming. That's about all I know. This will be fun if this is your version of 100 apps, 1 100 hours, where there's, like, a a public shaming portion of it, where it's like, oh, hey, like, hey. You start out really overconfident, or at least I do. And then, like, by the end of it, you're either, like, yeah, you do the Tiger Woods thing, or you're like, oh, wow. Really humbled at that point. Yeah. I'm gonna try not to turn this into 1 app 100 hours, but we'll see what happens. So what's on the dish for today, man? So today's episode, I'm gonna give you a lay of the land. So we have just revamped our partner program here at Directus. You know, in the past, we've we've tried to put things together. It's been very, loosey goosey, I think, is the technical term for it. So we've brought on a partner manager, Colton, who's heading that up. He's put a really awesome program in place. The next step for this and the evolution of it is to create a partner directory on our website. So figured directory, I don't know if you've built 1 of those on a 100 apps, a 100 hours yet, but, director seems like the perfect use case to build a directory directory of some sort. A couple things, and actually, what I'll do is I'll pull up Excalidraw because I know that's what you do. And Oh, yeah. The way that you do things. I'm I'm a, like, FigJam guy just because Oh, you're a FigJammer? Yeah. Hey. Excel I like Excel draw as well. To each their own. FigJam's pretty cool. I have nothing against FigJam. But, okay. So a couple of things. Partner directory. So it's gotta be accessible for our partners. We want partners to be able to update their own, instance, and put in things like their their part their agency name, main point of contact, where they're located, and, like, upload things like showcase work. So Okay. Obviously that name, point of contact, location, and Description, summary. Description slash summary, areas of expertise. What are you thinking as far as, like, location data? Location data. So that's probably what we'll filter on the front end is, you know, I'm thinking of the user experience they land on, like, direct us dot I o slash partners, and then they filter down based on a partner that's, you know, the general location because I like to support local. So, if I was looking for an agency, I would look for someone here in the East Coast of the United States. So I think by country, and then they can just drill down from there. But I would say, like, country top level. Okay. Areas of expertise is interesting because I'm trying to think of, like I guess it would be like they wanna like, is it, like, a website or is it, like, app development? Or is it more granular than that, do you think? Like, like, actually, like, flows and insights and, like, direct us things like that? If for an agency, I would think, like, areas of expertise to me is like, hey. Like, what do we specialize in? Is it, like, web development? Is it mobile app development? Is it, UI, UX? Is it all of it, I guess? At least that's the way that I see a lot of these things handled. Right? At other companies or or other spots online, I guess. That makes sense. That makes sense. Cool. Trying to think of what else. We'll have a showcase area where people can upload upload projects. You're probably gonna want a logo. Yes. Logo. And then the I always hesitate to, like, throw, like, pricing, if we've got some, like, freelancers in there, if we've got some, like, freelancers in there, you know, they're, like, stacking them up directly with an agency that has a 100 developers is not is not fair to either 1 of them. Yeah. Yeah. I think I have to figure that out. Maybe it's like a pick list with, like like, 0 to not 0. It wouldn't be a agency. But 1 to 9, 10 to 49. Oh, he's getting it very granular. I like it. Yeah. I'll say 10 to 99, and then a 100 plus. Seems like a pretty good 3 to 3. Small, medium, large. What else do you think? Actually, this feels like a pretty good, v 1. This is a this is a good jumping off point. Yes. V 1 is my favorite and not because I'm lazy. It's just because it's good to just get something out there, and also because I'm sort of lazy. So, feels like a good scope of work. So I like it. First steps. I'm I'm just monitoring the environment. That's, I Oh, yeah. Yeah. Yeah. We we've stepped up the difficulty level for this episode because I've got 3 kiddos downstairs who've been sick all week. Fully expect 1 of them to bust in the office. And so that might make this more interesting. You know, that's technically, I'm lost. We roll with I that could be could be set for me as well at this point. Like, technically, parental wise, I am lost right now. Technically, I am totally lost. Alright. Cool. Alright. So next step, hopping into Directus. So for anybody that doesn't know, we use Directus internally for basically everything on the marketing side. So our entire website's powered. These are all our pages here. We use it for our docs, for publishing and and maintaining. Also, like, when you leave reviews, we capture that stuff. We have our direct to stop pizza. That's in here too. This is the main place where we can make changes to all that stuff, the the interactive demo. We capture metrics, and we capture key marketing metrics in here. It's my weekly dashboard that I put together. So the partner portal is gonna fit nicely in here because it gives us 1 place to access everything, and we'll just limit things with roles and permissions at some point, in this episode and all of this stuff. But yeah. So, Bryant, starting from scratch with this partner directory, where do you suggest we start? Where do you well, like, you've already got a, like, start of a data model kind of mapped out in a scale draw. Like Yeah. Why wouldn't we start there? I think that is a great place to start. So, again, I'm just completely, doing this as a nontechnical person. I wanna caveat that. I'll probably say it a 100 times in this episode, but I'm, yeah, starting from scratch here. So what I assume, and just correct me if I'm making a mistake here, we're gonna wanna create a data schema, which we will do inside of collections, inside of settings. Yeah. We will create a new collection. Now, you get to encounter the hardest part of development, which is naming things. Naming conventions or So, hey, like, hey, what are we gonna call this new collection? Like, is it gonna be Do we call it is it so that's the thing. Is it, like, the high level thing? Could we just call it partner directory and then all of the fields would be within that? Or do we have to get, like so I like, typically, like, the way that I name my tables, and this is I say this in every video. It's 1 of my favorite features inside Directus is the ability to, like, translate that. Right? So, usually, when I name tables, it is like a what's the object? And then I I usually end up with, like, a plural. So it's pages or posts or partners or agency partners or, you know, trying to think on, like, the partner side, we've got agencies, we've also got tech partners. Do those live in the same directory? And they're you know, do they have a lot of the same characteristics as as far as, like, the data or totally different thing? It's a great point. So I think at some point, as we start to grow out the tech partner side of things, we'll have kind of the same concept for them, and we'll have, like, integrations pages maybe or, like, you know, something like that. We wouldn't wanna conflate the 2. So maybe it is just agency partners for this because that's what the hyperfocus is on. So are all you think all partners would be considered agencies or if there's any, like Again, right? That's the and now you're waiting into developer land where it's like, hey, I I know what I wanna do with this, but what do I name the thing? Because it's gonna confuse somebody later. I've been in developer land for 10 minutes, and I'm already not liking it. So I don't know I don't know how you guys do this. But I it let's roll with it. And, you know, again, like, within the interface, we can rename it. Now before you move on here, the other thing I want you to do, and this is mostly just out of habit for me, when I'm building all of these, like, direct us plus starter kits. The primary key field, set the type on that to UUID. The type not no. No. No. No. No. No. No. No. No. No. Slow down, cowboy. There you go. Let's go. It's the type 2 generated UUID. Yeah. Here. What the hell? I mean, what the heck do any of these mean? This is where I get lost, and I don't wanna turn this into, like, a long, like, discussion. So, basically, every table in the database has to have a or every row within a table. Right? So when you're adding this collection, you're creating a table inside the database called agency partners. Every row within that has to have a unique identifier so that the database knows what that is and how to reference it. I got you. So you can you can basically generate that identifier either, like, a auto incremented integer, which is, like, 1, 2, 3, 4, 5, 6, 7. When you are I I doubt we'll use this for a starter kit. But, when you try to transfer those IDs to a different database, like, you've gotta reset, like, the the increment count on that database. Okay. Our things get squirrelly. So using a UUID prevents that because it's just a random string of 36 characters. Okay. I'm tempted to go big or go home, but I will go give you ID. Oh, yes. Now you could also do the manually entered string, but, like, like, I I see people will use that for slug a lot. But the problem there is you can't change that after the fact. So if somebody renames their agency, that primary key would still be the same thing because you can't change that. Okay. So if it's Matt's agency and then you sell it, it becomes my agency. Like, I'm stuck with Matt's agency. Yeah. Should've bought it. Okay. Your UID. That makes sense now. So, everything will have a automatically generated, identifier that if we decide to pull all the stuff out of Directus at some point, it'll follow it. If we wanna integrate it with something like a tool like clay, when we pull that in, it'll be able to keep everything in rows nice and clean. Nice and easy. I'm learning. Technically, I'm lost. TIL today. Learning. Yeah. There you go. Cool. I know there's a lot of things with, optional fields here, but, you know Best thing to do is just check them all. You could delete them later if you don't need them. Right? So these are just, like, the helpers within the system. Nice. Okay. Like, they created whenever you create a new record, it will populate the timestamp for you. Automatic? Same thing. Yep. Genius. I created a collection, like, a little while ago before this episode, and I forgot to check that. And I'm, like, oh, crap. It's not generating. You could you could do it. It's just easier to check the boxes and then delete it if you don't need it. Alright. Beautiful. Alright. So we've got our agency partners data model. Now, next step for me is gonna be to pick a color because I'm in marketing. So I'll just, do this nice little Colors and icons, baby. Yep. There's a I hate this shirt search. Oh, handshake. I found 1. Nice. Alright. The search always busts for me, with those icons. Me and icons have a lot of hate. I the Google naming team on those. Guys, hit me up. I'd like to make you guys need some help. Yeah. But, anyways, next steps. We got our handshake. We got our nice green color. Green is great. I love Luigi. So we're all there. Good there. Now the next step is gonna be creating those fields that we had mapped out earlier. Correct? Yeah, baby. You got it. Alright. So, this is 1 of my favorite parts of directors actually because of these nice little visualizations that give you a a clear preview of what you're getting into. Let's see. So input seems like the 1 that's generally used. For just like a string of text? Like, what do what what are we starting with? Like, the agency name? Yeah. So we're gonna start with name. Actually, you know what I'm gonna do? A little arc magic here. Yeah. Alright. So we've got our window. Alright. So side by side here. I think the important thing to start with is gonna be, obviously, the name of the agency. So input, just a string of text, name, unless we have a specific name field here, which I don't think we would because it seems very unique. Nope. You got it, boss. So question I had here was, should we, in the grand scheme of, like, all of the other fields and collections and things inside of Directus, when I'm naming things, should the naming convention be, like, instead of name, should it be, like, agency underscore name, or does it really matter in the grand scheme of everything else? This is the the fun. Yeah. I would probably just call it name because, like, within this, you're not gonna have, like, a lot of related items. Right? Like, you're probably gonna have some projects to showcase, you know. I guess, in that sense, you could have, like, a partner name and a project name. I only, like, start adding prefixes when it really starts to get confusing. Like, if I've got a bunch of nested relationships that I'm going to be, like, dealing with all that data at once. So, like, the name of a page and, like, the name of a block and, like, the name of a button and stuff like that. Like, at that point, you might wanna, like, start adding prefixes so that you it doesn't get confusing. Or or, like, if you think of, like, organizations and contacts, you know, that might be organization name and then, like, contact name type of convention. Yeah. Maybe I'll because we're gonna have a point of contact in here, so they'll wanna enter their name. So maybe I just I'll I'll just go with agency name here. Or it could be partner name. Partner name. That's right. Partner name. String, we wanna keep it empty. And go to fill it out. Obviously, that's gonna have to be required. I don't think any placeholder. If I wanna get fancy, I can add an icon. I'll hold off on that. Is there anything in the advanced field creation mode that I should be aware of? It doesn't seem like it's that advanced other than, like, maximizing the length of what they'll input. Unique? I'm not worried about that 1. Yeah. So the name is probably not yeah. You're not really concerned about a unique name. The advanced field settings just gives you, like, more control over it. And you can always go back in later, like, after you create this and edit that. Right? When we get into, like, how you're gonna reference this on the front end. Right? That would probably be, like, the next thing that I would tackle as well as, like, a slug of, like, hey. We we've got this random string of characters, like, in the URL. We don't wanna use that. We wanna use, like, a slug. So Okay. That that's where we'll get into advanced. And we don't wanna allow a null value. Yeah. It it like, required is probably gonna take care of that. Like, that is gonna be on, like, the database side as well. Okay. Like, if you had any existing records in this, I probably wouldn't let you, like, check that or uncheck that box because, you know, like, you might have records that don't have a value for that specific field, like, if that field already existed. Right. Okay. Cool. Today, I'm in the weeds. Not sure what the acronym is for that 1. But I do. Yeah. So we're gonna keep editing. Alright. So your next field, I vote for slug. Slug. That is gonna be a string. Having trouble with this. You're gonna you're arching yourself. Yeah. Time for a page refresh. Page refresh. Save. I lost it. Found it. Okay. Slug. Alright. It's gonna be an input. Okay. Same thing. The key of slug. Okay. Yeah. Yeah. I would just call it slug. Be fine. Alright. So now then you have a a go into the Advanced Field Creation Mode. Mhmm. And we need to make sure this is URL safe. So you are going to go to the interface section, and there is a slugify option. And what does that do? Prefix it? Basically, like, anytime you try to add a space, it's gonna add a hyphen. Or if you try to use any, like, special characters that aren't allowed in a URL, it's not gonna allow you to input those. Nice. Okay. Very cool. And then in that case, you also are probably gonna want this to be unique. Right? Because, on the front end, this is gonna be part of the URL, and it's gonna be the unique identifier that we're 1 of the unique identifiers we're using to fetch that data for the agency. So, yeah, you could certainly set it to be required if you want to, or we could have, like, a flow that generates the slug. But on the, the schema page or the schema tab, you set that value to unique. Feeling good about it. Alright. Bam. Now question. So we'll have agency name. We'll have their website. When it comes to adding, like it's just kind of jarring, I think, when you're filling out a form, when it's like these 2 questions and then 3 completely unrelated questions, which in this case would be like, here's about your agency. Oh, tell me about yourself. Let's talk about, like, something else. Is there a good way to maybe split up this? Like, use, like, maybe add in a header or some sort of field that breaks it up, or is it just, like, best best use case, best scenarios? Just like you know, what I like to do in my forms is just make them all, like, half width. So you got, like, this, and then just add as many as you can in a row so that it's really confusing. Love it. No. There there's there's lots of great settings for that. If you open back up the create field, like, the ones that you're looking for, like, we call them alias fields, which basically, like, it's not really storing any, like, specific data inside the the actual database. Right? Mhmm. It is just controlling, like, the layout within the form. So those are gonna be under the group section. Group. Groups. Presentation. So you see there's a couple there. You have, like, presentation wise, there's, like, a divider. You can add some button links. You can add a notice to the form, and you can make that conditional. But if you wanna group related fields together, you got, like, the group options. So depends on how you want to slice it. Most of the time, I end up using, like, the detail group, which is basically, like, I could throw 35 group or 35 fields in that and hide them all with, like, a collapsible accordion type thing. The accordion is basically 1 field at a time, pops open. So, okay. Gotcha. Yeah. Most of the time, I end up using detail group. Nice. I'm gonna try that. So then I'll call this, contact. Yeah. And, usually, like, this is just like an OCD thing for me. What I end up doing is, like, a like, underscore details or group or, like, put, like, a meta prefix underneath it just so, like, I know, like, this field is just for, like, grouping. I like it. Point of contact group. So, so we're gonna nest things underneath this group, or is it the once we hit save Yeah. Just hit save. Do we can come back. Question on this. Would we want it required, or do we require the separate ones? No. You don't have to require that 1. I'm not even actually sure what what that would be. Feels dangerous. That might be a good feature request of, like, hey. We should probably do something within that. Alright. So now, basically, what you got, you've got a container within the form that you can drag fields into. But you gotta create some fields first for the point of contact. Great. First name, last name, any like, just 2 separate inputs side by side, I guess. I yeah. Are we going to use is there a situation where for your point of contact, you're gonna, like, use the just the first name? I would say if we automate emails from Directus when they register their company, we're gonna wanna obviously personalize it, and we don't wanna say, hey, Bryant Gillespie. Thanks for signing up. It'd be much more casual to be like, hey, Bryant. So probably in that case, would it make sense to split up the 2? I I would break them up in that case. Now the other consideration here is that you're gonna have a user that logs into this as well. And, like, are you gonna send that email to the user from that agency? Or, like, who the the designated point of contact is? I would think whoever the designated point of contact is. Okay. So, like, as they they will give them ability to add other people under their their agency. And then when we can trigger notifications, like, when, hey, so and so from your team has signed up or maybe we put into delay that's like, hey. You sent an invite. They never signed up. Go, you know, strangle them. Not that Go strangle them. Yeah. I got you. I got you. I I so and, like, POC to me, like, proof of concept, not point of contact. That's just because I'm building. So I would just call this, like, either, like, contact first name. Contact first name. Or you could probably I mean, yeah. That's probably fine. Cool. Like it. Require. Save. This is the boring part of the show where I just fill in these things. Nat, you might wanna fast forward this part. Get, like, some Benny Hill or something playing in the back. Right. Alright. So here's a question. Let's say I wanna bump these 2 together. So I click here. Obviously, half width. I might be able to figure this 1 out myself, Bryant. I don't think You got it, boss. You got it. Alright. So You can Now yeah. Go ahead and add your other field there. What are you you're gonna have, like, a point of contact email or contact email? Point of contact email will be just another input field? Is there any special Yeah. There is there's not like, as far as the database is concerned, it's just a string of text. Okay. You could go in and, like, apply some validation to it. You you can use, like, regex. We'll we'll leave that 1 for another call. I've had my time I've served my time in regex. So let's let's say I wanna add a validation. Right? So, validation here, I wanna add, like it has to have an at, obviously, if it's an email. Just a little quick little validation. I would add a filter contact email. And this is must, like Contains. Yeah. Contains just a at symbol? Yeah. It has to contain an at symbol somewhere. Now I didn't like That's The the other, like, fun bit of this, right, is what if they put 2 at symbols. Right? That your validation there would pass. So this is where, like, you could reach for reg x, but, you know, again, that's just we could spend, like, 45 minutes to an hour just like, what is reg x? Yeah. Is this, do you think this is something that can be well, not think, but once I create these fields, are they set in stone? And what I have to, like so the only thing that you can't change here is gonna be, like, the keys. So, like, the key of the field that you set on the schema. Like, once you commit this, or that can't go back and change the key of that field because there's a lot of references inside the database. Right. Okay. Now if I've got database access, I could, but I I wouldn't put that evil on you. Yeah. We'll try it without. Alright. Cool. So that makes sense. I can change that validation later in that case. So it didn't require it. Edit field, required. So I can go in. Look at that. You can do all that. Reach. Okay. Cool. So I feel like that's good for the point of contact. The next thing is gonna be location. Yeah. So for this section, and just because I saw this divider thing, and I'm just gonna add that in there. I'm just gonna save a divider. Location. Now I know we have, like, a map, geospatial fields, things like that. I don't know if it makes sense to have the map as your input for the location. But if we're doing it by country, it would make sense to do it as a pick list or a drop down. Right? Yeah. Or you could just have it as an input as well. It depends on, like, the like, if you wanna normalize it. Right? So So on the front end yeah. So on the front end if we're gonna do it on the front end, like, thinking of the filter ability is it'll be a drop down for them. Like, I'm imagining, like, a bar at the top, and then they can just drop down, list of countries, pick it, and then it'll propagate all the ones that have that. As an input, would that if somebody misspells, if somebody enters the USA as opposed to, like, United States or America, all of those little, like, side use cases cases, it would run into an issue there. We'd have to figure a way to normalize them on the back end. Correct. Yeah. It'd be a pain in the ass, basically. Technically speaking, that would be a pain in the ass. Thank you, doctor. Drop down? You could. You could do a drop down. Like, the the trouble here, right, is you gotta get a list of all the country codes or all the countries that that we have partners in if you're gonna do a drop down. Right? Because I got it. Like, you you could oh, you've got it. Well, then, yeah, go for it, dude. Is this the same or, like, GitHub country list? And there's a plain text list of countries that you can copy and paste, from directly from GitHub. Woah. They also have it in a JSON format, but with the ISO code. But Alright. So, like, underneath the hood, when you are setting up that drop down feel, like, if you wanna click on it, those like, the choices there. So, yeah, if you just call this you might as well just call it country. Right? So we'll give it a key of country. The choices that you've got there, if you go in and you just add 1, right, You've got a text and a value. Right. So the text is gonna be what's displayed inside the application, and then, like, the value here could either be, like, the same thing or or the probably the way that I would do it would be, like, the the 2 digit country code, like, the ISO standard or whatever that is. I'm not sure what that is for Afghanistan. Yeah. I'm gonna go with the easier 1 here. Yeah. And I would honestly, it'd probably be, Yeah. I don't know. What's your does your GitHub data have it in, like, all caps or lowercase? I will share the screen. Actually, I'll pull it up here. Cool. Oh, yeah. They're all uppercase. So all uppercase, and then they've got somebody did the due diligence of typing in the things down here in a JSON format. So what do you think is the best way to go about this? I would grab the JSON data. You if you got Versus code? I do. I do, actually. Okay. Alright. And we're gonna make a giant drop down here. Like, the the other thing that we could do, there's a there's an auto complete option where you can call an API, but I don't know I don't have a good country code API right off the the top to get just like the the ISO codes, so it'd be fine. Open up Versus Code. Alright. I gotta change my streaming here. Getting me all twisted. Versus Code. Alright. So copy that list. Create a new file here. Copy your list of the data from GitHub. Paste the JSON list that was created? Alright. This is a long list. Yeah. Let's, alright. It it gets more interesting when you, like, hey. Are you gonna reference this again somewhere else? And then at that point, you might as well add it as a table in the database and reference it that way. So you could use it in other collections without having to either copy the field or maintain this thing. Alright. So what are you gonna do here? Like, basically, this is not in the correct format for Directus. Right? We've got an ISO code, and we've got the country. Directus, as far as like your choices for the drop down, is expecting a text and a value. So this what are you gonna do here? You are going to, like, highlight where it says ISO code, and hit command f or you're on a Mac, so it should be command so just pick 1 of those those values. Go over there where it says ISO code. Just highlight that part. Mhmm. 1 second. I think this list might be wrong, actually, because I don't see will the USB enter a different name? United States. I'm not finding it. Do you is it is your search case sensitive? Is it? I don't know. No. No results. America only turns up. Samoa Americana. Yeah. This is wrong. This is the hazard. We're using GitHub. I'm gonna go ahead and just use this standard list that this person didn't falsify because this 1 looks right, which is just the list of countries, not in a JSON format. Okay, boss man. Alright. What do you think? So, alright. This is gonna be the wizardry on the keyboard. Alright. So select all, command a. Mhmm. Alright. Now hit command right. Or is it shift command right? No. I I don't know how you got yours set up. Hold shift and do command right. Shift command right. Okay. Yeah. We don't have you set up right. If you have this list, is it if I select all yeah. It's not we need to get you to split this into lines. Is it Command P? Do Command P. Is that the Toolbar? Okay. Alright. Now do a greater than symbol, and search for, like, split into lines. What is it? Split? Hang on. I'll tell you. I'm trying it now. Split join tag. Print that lines, join lines, expand line selection. Insert line? No. Insert line below? No. It should be, what is the I know the command on mine. Add cursor. Is it add cursor? Endo. Line. Add cursors to line ends is the name of it. Add cursor to line end. Yep. Alright. So what that's gonna do. Shift option. Oh, yeah. Yeah. I've I've got a different command. Alright. So now, you see you got, like, a cursor on all of those. Woah. It's pretty pretty dope. Right? Alright. So now what you're gonna do, now you should be able to hold command and shift and left. That's gonna select all those individual yeah. Go left. Alright. Alright. Selected. So now you get them all individually. Now you're gonna pop the, quotation mark. Just put in a quotation mark. Yep. Shift quotation. Yeah. I mean, not shift quotation, but just quotation mark. Alright? Yeah. Now you're gonna do command left. Command left. That'll get you to the start of the line. Now you're gonna add a left code bracket or mustache syntax there. Left. Yep. Alright. Do, what are we looking for? We're looking for a value. Mhmm. So you're gonna do quotation mark value. Type type in value? Yep. This is gonna be proper JSON now. Oh, boy. Quotation mark. Quotation mark, comma, or no. Not comma. I'm sorry. It's a, colon. There you go. Alright. Now go to the end of the line. Command right. Yep. Command right. Yep. Add your What's that? Is your right mustache. And then you are going to add a comma. Alright. Now, go hit command up. And because this is an array of values, we gotta use the, I don't even know what that's called. Bracket? What is that called? It's it's not it's it's not the shift key. Yep. And then I'll do this. At the very bottom, you gotta add another 1. And then it's gonna be the closed. This is an array of values. There you go. And then on that last 1, what you're gonna do, the very last value there, remove that comma. And now you have a valid JSON array that you can copy that whole thing. The formatting doesn't matter. How do I copy? Just kidding. It's I can't help you with that. This is amazing, by the way. I just learned how to do JSON. TIO. Yeah. You you learned a couple things. Right? You learned, hey. Like, the some of the keyboard shortcuts for Versus Code, especially when you're trying to do reformatting and stuff like this. Super helpful for that. I'll never remember him. But, so I'm gonna discard this because this was what we were trying to do earlier. But, am I on the wrong page? On the wrong page. So Yeah. Nobody could see what you're doing. I didn't mean what we just did. I meant what and yeah. That would've been terrible. Yeah. I'm gonna jump through the computer and strangle you at that point. Show me all the shortcuts again. Okay. So we've got our JSON copied. Yep. We're using this drop down unless you So where it says choices. Mhmm. Paste your JSON. So click where it says choices. Just the header. There you go. Paste raw value or yeah. You could hit edit raw value and paste it in there. Done? Done. Done. Done. Done. Except we forgot to add text to all of those, do we? Did we? Oh, from the front end. Because it won't show the presentation of it. Right? We forgot. Now what do you do? Should I restart? I think we're we're really, like, pretty fast. Right? We should be able to do that pretty fast. Or wait. Can I just take the no? You could just copy the values. Yeah. For now, just save it. It should let you save it. Yeah. And I don't know if it's going to throw an error on. Yeah. I'm actually not sure how the drop down will behave. It'll let you save it for sure. But I I don't know if when you actually test it out, if it will show that value because it doesn't have the actual text to to do that with. Okay. We can we can look at it, though. We'll sort that out in a moment. Alright. What's next, man? So next. Yeah. It's driving me freaking crazy. The OCD part of him, like, the x designer in me. Like, you've you've got the point of contact group. Just drag those contact fields into that. Because, otherwise, they're not gonna display inside that group or or not be collapsible. How's this helping your OCD? Gotcha. That's that's why I call myself a recovering designer. Gotcha. Gotcha. Okay. Cool. So I think we're in a good spot here. I'm gonna add this quick, for, like, a description or something like that. Just use, like, a text area probably. Makes sense. Yeah. Agency description. Yeah. So, like, the in the database, it's gonna be stored as, like, text no matter what which you whether you use, like, a WYSIWYG editor or a text area. The difference with the text area is you're not gonna have any, like, rich text formatting. So it depends on if you need that. You know, you could have hey. This is where you go back to, like, modeling your data of, like, hey. Do we have, like, a short description? Like, if we're showing cards on a page, we probably have, like, a short description. And then maybe on, like, if you click into a partner, you might have, like, a longer section of content or something. That's a great point. So, yeah, this is actually gonna be structured as 2 pages. So we'll have the directory, which is this, gonna be the main thing. And then when they click into it, we'll have a separate page that is a little bit more and we'll have the WYSIWYG there. But this will just be like a short description of partner that'll be on the front. And honestly, like, I would probably limit this to a certain number of characters, setting a softer limit to I don't know. What do you think? 300 characters? What's the old Twitter thing? 250? You're asking the wrong guy. 170. Is that was that what it is? 270? 280. We'll set that. Yeah. Soft limit. So, hey, that soft limit that you just set there, that is only on the the UI. Right? Like, the there's no particular limit there on the the actual database. Okay. That's fine. I, no. Actually, it's not fine because they're That's where, like, the building this out in the database. Right? No. No. No. It's fine. Yeah. Hey. Like, because we're interacting through this, this layer, right, this Directus Studio, and through the Directus APIs, it's not a problem. Like, Directus will give us that validation. Great. If I wanted to enter validation. Let's say I just want to say in the field itself, by the way, only 280 characters. Placeholder would not be the 1 to do that because they'd have to, like, erase that. Right? Would there be a placeholder is basically just like, hey, what do I want? You know, like, a an extra hint for somebody, like, on a Maybe a note here. Like Yeah. A note is, like, a description below the field basically. Let's try that. Great. Feeling good about it. Description, areas of expertise, we'll probably wanna keep this limited to, the ones that we have so we can fill use those as filters as well at some point. We'll do that as a drop down, multiple because you're gonna have multiple special specializations, I guess. Yay? You and A? Yeah. Yeah. I mean I see it says JSON here. I always get Or Expertise. Yeah. It's a JSON. It's just gonna just the way it's being stored. Like, are we going to are you gonna allow them to filter based on those specializations or no? I think at some point, I think it would be country and specialization would be the 2 things that you're gonna that you're gonna be searching for when you land on, like, a directory page. Okay. So on that point, like, the the current operation, like, I cannot set I I can't query the data within that individual, like, JSON column. That should be coming in the future. As of right now, we don't have support for it. Okay. So at that point, then we need to look at a different way to do it, which would probably be, like, adding a database table for it. Or, what you can do do is just change the type to CSV, and that would allow us to get, like, a, hey, does this specialization field contain x? Okay. Because III think that's probably the extent of it. Right? Like, you're just gonna use it as a criteria for filtering this 1 thing. Probably, it should be fine. We'll do CSV. Nice. Okay. So then we'll do website, development. Website. Web web development. You developers. So cool. Why say long word when short word work better? Well, it could be like a web app. Alright. So these are these are the things that go through your mind, like the average developer, like, 100 times a day when you're building a project. If you see, like, a a puzzled look on their face, they're probably trying to figure out what to name the thing that they're trying to create. They know what the they already know what the thing looks like. It's all going up here, but it like, naming it is like, what do we call this? Number 1. The number 1 thing. Okay. Mobile application, mobile app. Is that fine? Can I shorten application to app? It What about that? It is. It's fine, man. Alright. If you you being a previous agency owner, you're probably the best 1 to ask for this. What are some other specializations you can think off the top of your head? Like UX, UI. Should I And you get When I'm doing the value here, do they have to be a specific like, option? It it doesn't. Like, it you know, like, technically, it could just be, like, UXUI. Like this without an underscore? It doesn't have to be. You see me start to sweat, like I'll do doing. Like, what whatever you do, it like, it's just gotta be normalized. Right? Like, you the most important part is, like, whatever convention you decide on, it's the same across the board, so you don't have major issues. Okay. How do you feel about the spaces between this? That's fine. I like it. Alright. Web development, mobile application. I should probably change that to apps. Mobile applications. UXUI. Digital transformation? That was that was the 1 that came up. Yeah. Digital transformations. Yeah. And and, like, technically, like, you could also like, do you get into, like, the specific frameworks here? You know? That's I I don't know. I would say, you know, you come in with you need a project. There's only a few there's the way executing the project, you can do it building in a reactor view or whatever, but the actual project itself is what I'm trying to zoom in here on. And I feel like the 4 of these would probably touch most of those because we're, you know, we're not gonna skew into, like, public relations or, like, digital marketing, whatever that means. But, yeah, it's like I'm I'm saying, like, hey, would you be, like, a yeah. We're like a a Laravel agency or, like, we are, you know, like a a React agency or, you know, those sorts of things. That's another consideration and probably not for this episode, but I would probably add that as another field here of like this these are the things we specialize in React view. Yeah. That could be, like, your expertise, I guess. I don't know. Yeah. Specialization in expertise. These feel good. I'll, I'll leave them as the for now, for the sake of this episode and update those later. Let's see. Just exit that. I was also a friend to you and and updated your country codes for you as well. Oh, thank you. Much appreciated. So for logo, image, or file? What do you think? Either 1. So, like, behind the scenes is basically the same. It's just like how you want it to display. So in this case, you probably wanna see, like, a nice image. We'll just call it logo. Yeah. That's fine. Partner logo. Yeah. So just use the image. Like, it it files there is gonna create a junction collection. So, like, if you need, like, a gallery, we would use that. But in this case, we just want a single logo to display. Nice. Okay. Feels good. We can update this file library route later. We'll have, like, an agency specific folder. Yeah. That's what I would do. Crop to fit. Anything to be aware of in the advanced field creation for this sort of thing? Like, images or anything? If you go into, like, display, like, you could control, like, how you want this to actually display. Right? So you wanna see, like, a tiny image preview, and then you can control, like, how it crops, basically. Okay. Cool. Partner logo. And then this last bit is gonna be actually, we'll do size, 2 more fields. So size, numbers, but it'll still be kind of a drop down situation, I'm assuming. So is it a is it like a are you storing a number, or is it like a it'll be a string? It'll be a Is it like 1 to 10 or, like, hey, like, we have a 100 or we have 56, we have 7. I don't wanna get, like, too specific because I'd rather group it into, like, small, medium, large because at some point, we can filter that on the front end too. Yep. I need the enterprise company. I'm an enterprise company, enterprise agency, yadayada. So drop down with Just hit me with the Seinfeld. Yeah. Seinfeld references into 2024. Let's go. Agency, partner size. Let's say partner size. Yeah. Yeah. I would get, like, team size or something. Right? Like, hey. That's the the other thing here is, like, do you need to, like, prefix each and every 1 of these fields or or just the ones that, like, could get confusing? Now you're making me sweat about naming conventions. I'm not gonna It's it's seriously like the hardest part. Not today, Satan. I'm gonna leave the the naming confessions away for for now. Let's do 109. That'll be small. For value, here we go. 1 underscore 9? No. Just just do 1 to just keep it the same for it. What about 5? Alright. No. Just keep it the same, like, 1 to 9. Just the exact same thing. Right. 19. 10 to 99. It it it's just a string of text. It doesn't really matter. It's a string of text, yet it's numbers. How's that for some Yeah. I get yeah. Confucius wisdom. Confucius. Yep. Yeah. Alright. That feels good. Those are the 3 required. At some point here's a question. Here's a question for you. Alright. So let's say at some point down the road, I want to have a field that is, if choice is 1 through 9, show small or, like, show another type of text. Is that something that's doable through here? Like, what are you gonna show? Like, if I wanted to Small, like, you are small. Like Yeah. Like Yeah. Yeah. Like, that feels unfair. Like, yeah, I did. Like, III didn't have a team larger than 9. Let's say, I said that. Partner program. Hey. You are small. You're just like a shrimp. Alright. So instead of that, let's say internally, we wanna have some, like, normalization and, like, it when you're just talking about internally or showing, like, we have, we have 10, 1 through 9 agencies. It's kinda confusing as opposed to, like, we have 10 small agencies or agencies on the small side. I so I mean, you could you could, like, for the values, like, if you really wanted small, you could. But, like, you know, my question to you would be, like, what does small mean? Right? So, like like, I I think what you've got here is fine. You might you say, like, 1 to 9 employees or something. You know? But, like, if you wanted to, like, do something based on this data, it it depends on where you're doing it. Right? If I'm doing it on the front end, like, I could just add that to my front end logic. Like, hey. If this is a small agency or if the value is 1 to 9, we show a badge that says, hey. This is a freelancer, or this is a small agency, or boutique, or something like that. You know, that always sounds nicer than small boutique. Bespoke. Yeah. Boutique. It's not the size of the dog, Bryant. It's the fight in the dog. There you go. Yeah. So you can certainly do something like that. Or if you wanted to, like, gather some additional information, like, if if they were, like, a a larger company, if you needed, like, some type of like, hey. We need a a VAT number or something. You can set up conditional fields for that as well if you need to. Okay. Cool. Sorry to digress. But, yeah, good to know. Yeah. We we can do that down the road. Last thing here is we wanna showcase. So we're we want them to be able to upload a couple of their projects that they've completed with Directus. So would we use files for that? Multiple uploads? The idea is gonna be the deliverable, I guess, is gonna be we want them to upload Are they gonna is it just images, or are they describing the projects and, like, talking about them? It would probably be screenshots with some a little bit of text about what the project was. So a little bit of, like, descriptor. So maybe treating that like a caption to the image. I'm not really quite sure the best way to deliver it unless it's a different out outside of this initial form where they would have a different form where they could upload all this project information. This is a relationship in my mind. Because 1 of the other stated goals that I heard, when we were initially putting this together was we wanna have a page, that showcases these projects. Yeah. So to me, that would be, like, a separate table, separate collection called projects, partner projects, could just be projects. I don't think we've got a I don't think we have a project table in here right now. We have what do we have? We have a project management folder. Yeah. So you're you're you're clear. Right? Mhmm. What are you gonna do now? Now that you know the way forward. Something to something. I I don't know the difference between many to many or 1 of many, but I feel like it's 1 of these. 1 to many, I would assume. Because you're gonna have this 1 record attached to many different projects. Or is it the other way around? So in this case, you can't have the same project belonging to 2 different agencies. Right. So it would be a 1 to many in this case because you're on the agency. Mhmm. 1 agency could have many projects. Now if you were, like, inside of a a project, it would be reversed. It would be, many to 1. Okay. I I would just call it projects. Projects. Killing me. We don't have we don't have, we don't even have a project stable. So that's gonna be fun as well. Right? So whenever you're creating these relationships, you have to have a related collection, which is basically just a table in the database underlying that. Okay. Cool. Great. So that'll be what I'm thinking is for this show, we'll split it up into, like, a few different episodes because I've we've we're coming up on an hour here, having just built, like, this initial form. So we'll do, like, the next part. Let's set up those the showcase pages and potentially get into, like, role based access control a little bit. But, yeah. Is it Don't leave me hanging here, bruh. Finish this guy out. I can't. I'm unable to. It's because you get to pick a related collection. Oh, this is the cliffhanger. Yeah. This is where, you know, the end of every ER show, there's, like, something that happens. A helicopter explosion. This is our helicopter explosion. But, to move forward here on the next episode, I will have created just a simple projects collection with no data in it, and then this will be saved to that collection because I'll pick it here. Right? You can actually create it right here. Can I? Yeah. In like 2 seconds. So where you have the related collection, it's it's 1 of the required fields. Those are the ones that have the stars beside them. Yes. Stars Alright. Equal required. Yeah. Alright. It it doesn't show up in the drop down, but what you could do, just type in projects. Alright? Now you're gonna need a foreign key. A foreign key is in that other table. How does it link back? Right? So that would be your partner, Or that's what I would call it anyway. Like, what is the field gonna be called inside the projects table, inside that projects collection? That will Is gonna be the part. To this table? Okay. Yep. Now this is it's not apparent what's happening here. So what are you gonna do? Go to Advanced Field Creation Mode, and go to the Relationship tab. Alright. So do you see down at the bottom what's happening here? Problem that we created within your data model. So they're gonna create projects and then the identifier for that project of, like, where it ties back to. Yep. Okay. I mean, that's, I think, a great stopping point for this first part 1. We didn't know it was gonna split into parts, so I'm cool with that. This feels good. Now everything auto saves was 1 of my favorite features ever. If I go to content right here, agency partners, and then this is kind of the base thing that they'll see. Obviously, we can tweak this a little bit. But, yeah, everything we've set up is here. Great. Technically, I'm found. I don't know. I I think you're still in the yeah. Okay. It's like you started moving towards the target there. Like, you're still, like, a 100 clicks off. Where would you be for this? I've left the trials, and I'm officially in the tribulations. So, we're making our way there. But awesome. Bryant, I appreciate you joining, helping guide me, shepherd me through this, you know, data forest. Data forest. Yeah. Next episode, we're gonna tackle setting up the showcase pages, and we will start to get into role based access control for those partners to access this stuff. Thanks everybody for tuning in. Looking forward to the next 1, next episode of Technically, I'm Lost.","published",[135,146],{"people_id":136},{"id":137,"first_name":138,"last_name":139,"avatar":140,"bio":141,"links":142},"ca1ac688-ecac-4f25-a4e9-7daf52c8235a","Matt","Minor","b4402ab0-41e4-4fc6-8bf0-769bf39ff114","Director of Demand Generation at Directus",[143],{"url":144,"service":145},"https://directus.io/team/matt-minor","website",{"people_id":147},{"id":148,"first_name":149,"last_name":150,"avatar":151,"bio":152,"links":153},"791e1503-1d88-463d-9347-0b9192933576","Bryant","Gillespie","9013afc8-e8d7-4182-9b18-44db08117bb9","Developer Advocate at Directus",[154,156],{"url":155,"service":145},"https://directus.io/team/bryant-gillespie",{"service":157,"url":158},"github","https://github.com/bryantgillespie",[],{"id":161,"number":128,"year":162,"episodes":163,"show":165},"b507c659-1dcf-4328-adca-5b77aa0eba6f","2024",[122,164],"b696b1c5-75ae-430f-9c5d-a00deaf8defb",{"title":166,"tile":167},"Technically I'm Lost","22981e24-bc02-46bb-99c7-dcb89a176267",{"title":8,"meta_description":8},{"id":164,"slug":170,"season":161,"vimeo_id":171,"description":172,"tile":173,"length":174,"resources":8,"people":8,"episode_number":175,"published":176,"title":177,"video_transcript_html":178,"video_transcript_text":179,"content":8,"seo":180,"status":133,"episode_people":181,"recommendations":184},"technically-access-control","962588514","What happens when a non-technical person attempts to get technical? In episode 2 of Technically I'm Lost (TIL), non-technical marketer Matt attempts to set-up roles and permissions for a partner directory from scratch, with help from resident Directus expert Bryant. ","76d08d20-6c8c-427e-839f-9d912b1c62b3",62,2,"2024-07-24","Access Control","\u003Cp>Speaker 0: Everybody, welcome back to the part 2 of Technically, I'm Lost, t I l. As, again, you're probably joining us from the last episode. I'm Matt, and this is Bryant. Put a little French spin on it today. If you've watched part 1, if are we gonna did I just cut you off?\u003C/p>\u003Cp>Speaker 1: I no. No. It's okay. I was gonna say do I look French to you? But\u003C/p>\u003Cp>Speaker 0: We'll have to ask, Alex Chopin, our director of engineering from France. I digress. But yeah. So if you watched part 1, if you haven't, you're probably confused. We suggest you go watch part 1, because this is part 2 of part 1.\u003C/p>\u003Cp>But, part 1, we are building a partner directory for us to use with our current partners. In that first episode, we planned out, how it was all gonna look, and we built out the form, which I can actually pull up my screen here and show you kind of how far we've gotten along. So, we I will say I, with the help of Bryant, me being a nontechnical person, learning directors for the first time, set up, this initial form in here. So we were able to set up, you know, point of contact, some information about the actual agency themselves, what they specialize in, with the drop down, partner logos, and we had, these projects, here as well as as this. So the general idea just to catch you up, is we wanna create a partner directory on the director's website for our partners, and this is the back end to get that whole thing running.\u003C/p>\u003Cp>So where we left off last time, Brian, do you remember?\u003C/p>\u003Cp>Speaker 1: Yeah. Yeah. Kind of. No. I I think what we need to do now, Daniel, like, we've got our agency partner collection configured.\u003C/p>\u003Cp>That's looking nice. We need to go through and create the actual projects that we want them to add. So what's a data model look like for that? And then we need to scope a role for our partners. So, they can only edit their content and only, like, the agency partners and the project's collections.\u003C/p>\u003Cp>Speaker 0: Great. Okay. So let's start with that part 1. So the projects, to give you a little background on how we're thinking about this. So when somebody comes to, you know, direct style slash partners, they'll filter down on country and specialization.\u003C/p>\u003Cp>By then, they'll find an agency they like. They click on them, and then that page will have a showcase of the projects that that agency has done with Directus. So we'll need to create that collection, as you mentioned. What's a good starting point for this? Is it just diving in?\u003C/p>\u003Cp>Is it a little bit of planning your strategic approach to this? Or what do you think?\u003C/p>\u003Cp>Speaker 1: I I mean, I I think at a high level, you wanna know what what goes on a project or or, like, what form feels, like, what are we gonna display when you click into a project. Mhmm. You know, if I'm imagining it, like, you've got an agency page where you're you're surfacing all these projects, maybe, like do we have an extra page for each project as well? So I can I'm on the agency page. I see a list of their recent projects.\u003C/p>\u003Cp>I click in the project, and I get, like, a a mini case study type of thing, or we're gonna show those in a model, like, a pop up window. How what do we we wanna do there?\u003C/p>\u003Cp>Speaker 0: I think it would be good to have a page. I like what you said about, like, a mini case study page. So maybe we'll have, like, the a scroller here of, like, they can go back and forth for, like, images of the actual website. And then\u003C/p>\u003Cp>Speaker 1: I don't like it.\u003C/p>\u003Cp>Speaker 0: You don't like it?\u003C/p>\u003Cp>Speaker 1: I I want a grid. I don't like it. Give me a grid of projects.\u003C/p>\u003Cp>Speaker 0: A grid. Wait for the individual project.\u003C/p>\u003Cp>Speaker 1: Oh, no. No. No. For the individual projects, I I'm thinking well, you got, like, an image gallery. I I'm thinking like a grid still.\u003C/p>\u003Cp>Speaker 0: Big grid guy.\u003C/p>\u003Cp>Speaker 1: Yeah. Let me I'm gonna share. I'm gonna share a link.\u003C/p>\u003Cp>Speaker 0: Let me share.\u003C/p>\u003Cp>Speaker 1: This is, again, this is the agent c OS link. So this is a sample starter kit project that that I put together, to showcase what you could do with Directus. Let me I guess I could put it in the chat here instead of our team comps.\u003C/p>\u003Cp>Speaker 0: Alright. Let me pull this up over here.\u003C/p>\u003Cp>Speaker 1: This is not a a like, the text doesn't really jive here, but, you know, you've got, like, a a title for the project. You got, like, a summary, then you have some content, and then you have an image gallery that, you know, if you click on one of those images, then you could cycle through.\u003C/p>\u003Cp>Speaker 0: Wow.\u003C/p>\u003Cp>Speaker 1: Instead of, like, a instead of a carousel on the actual page, show a grid. And then you have some metadata, like, hey. What's the client? What's it built with? What's the cost?\u003C/p>\u003Cp>I I don't know if we wanna probably omit that for this. You know? Would be nice to show, like, what it was built with. Those could just be, like, tags. So this is kinda what I'm envisioning.\u003C/p>\u003Cp>You know, the the header there is probably not it doesn't really jive with, like, the direct as brand guidelines. So we'd probably do something different. But, you know, I I think at a high level, you got a title, a short summary of the project. You've got a featured image for the project. You have some content, in case they wanna expand or go into as much detail as they want to.\u003C/p>\u003Cp>And then there's probably, like, the the content would probably be, like, text. Right? Mhmm. And then the yeah. And then you could have, like, a separate gallery if you wanted to.\u003C/p>\u003Cp>Speaker 0: Separate gallery.\u003C/p>\u003Cp>Speaker 1: And then, you know, like, some tags for what it was built with, like front end type of stuff, I guess. Like, hey. Is it built with Next? Is it built with Next? I I don't know.\u003C/p>\u003Cp>I don't know if that's necessary either.\u003C/p>\u003Cp>Speaker 0: Okay. I like this. So, yeah, so we would create a collection with these different items inside of Directus. Last time, if you can refresh my memory, when we created the projects here, this was a one to mini or a mini to 1?\u003C/p>\u003Cp>Speaker 1: So it depends on where you're at. Right? Those are 2 inverse relationships. If you are a for this example, if we're on the agency partner, projects would be a one to many relationship because I've got one agency, many projects. But if I'm inside projects, it's the reverse.\u003C/p>\u003Cp>Right? I've got, one project or, actually, I'm sorry. Is it many projects to one agency, basically.\u003C/p>\u003Cp>Speaker 0: Yeah. That makes sense.\u003C/p>\u003Cp>Speaker 1: Like a project can only have belong to a single agency is what I'm trying to say.\u003C/p>\u003Cp>Speaker 0: That makes sense. So we'd have this is the one to many from the agency side. So if we go here, this would be the many to 1.\u003C/p>\u003Cp>Speaker 1: Yep. So what you're gonna have to do here is go into our data model for projects because we we didn't add any fields for that.\u003C/p>\u003Cp>Speaker 0: Mhmm. Where is our here. So from the agency side, if if I click here, this will take me\u003C/p>\u003Cp>Speaker 1: automatically there.\u003C/p>\u003Cp>Speaker 0: It's over here. Great. So just like we did last time, you know, obviously, going through, filling out these fields. Title, I assume, would be just a standard input field. Title, String.\u003C/p>\u003Cp>Speaker 1: There you go.\u003C/p>\u003Cp>Speaker 0: I mean, required, obviously. Project title, let's see. The name of the client, input project client. And,\u003C/p>\u003Cp>Speaker 1: again, I would probably just do, like, client name. Right? Because there's, like, where else are you using client name? You're not.\u003C/p>\u003Cp>Speaker 0: Naming conventions. I'm about to get open that can of worms. So short summary. Would you use an input field, or would you use a text area field? Or\u003C/p>\u003Cp>Speaker 1: Text area for sure. No wysiwyg. I don't wanna deal with rendering HTML or, stripping out HTML. I I just want, like, a short description to display on a card or in a heading.\u003C/p>\u003Cp>Speaker 0: And if I'm gonna add a placeholder here, I will do it in the placeholder field.\u003C/p>\u003Cp>Speaker 1: Yeah. You've also got the help field or the the note field, I think, is is what it is as well. Like, the placeholder is gonna be it's gonna disappear as soon as they start typing. Right? The if you go to the field tab when you create 1, you got some helper text that you can add.\u003C/p>\u003Cp>Okay.\u003C/p>\u003Cp>Speaker 0: Okay. So here, we are creating the main image versus the gallery of images that they could just, like, see. So\u003C/p>\u003Cp>Speaker 1: Yeah. There there's 2 ways you could you could do that. Right? You could just have an image gallery and use the first item in the gallery as, like, the featured image. It's kinda a matter of personal preference.\u003C/p>\u003Cp>Usually, I like to be more explicit. And because of the way that Directus, like, queries the data and, like, if I'm showing a list of projects, I I can create it or treat it my gosh. I came to talk today. You could treat it like GraphQL, and I could tell it specifically the fields that I want. So, you know, on the index page where we're showing a list of projects, I can just grab the featured image and not worry about the image gallery.\u003C/p>\u003Cp>So that's that's probably why I would do 2 separate fields for those. So you might have, like, a, like, a featured image field and then, like, an image gallery or gallery, whatever you wanna call it. This is just a single image that you're gonna use across the site.\u003C/p>\u003Cp>Speaker 0: Featured No.\u003C/p>\u003Cp>Speaker 1: No. No. No. What did you do?\u003C/p>\u003Cp>Speaker 0: I created a featured\u003C/p>\u003Cp>Speaker 1: It's not just messing with you. No. You don't need your Oh,\u003C/p>\u003Cp>Speaker 0: Don't be doing that today. Oh, man. Got my heart rate up. So next part, if we're doing a showcase or gallery, I assume files based on the image here.\u003C/p>\u003Cp>Speaker 1: Yep. Definitely.\u003C/p>\u003Cp>Speaker 0: And then showcase.\u003C/p>\u003Cp>Speaker 1: Bro, call it image gallery or a gallery.\u003C/p>\u003Cp>Speaker 0: I was gonna call it a project showcase.\u003C/p>\u003Cp>Speaker 1: I feel like we're going to The Price is Right if we're, like, doing showcase.\u003C/p>\u003Cp>Speaker 0: Okay. So I don't know if we want this required because as long as they have the the Yeah.\u003C/p>\u003Cp>Speaker 1: You don't necessarily have to add an image gallery. Cool.\u003C/p>\u003Cp>Speaker 0: So what else what else here?\u003C/p>\u003Cp>Speaker 1: That's it.\u003C/p>\u003Cp>Speaker 0: Really? Alright.\u003C/p>\u003Cp>Speaker 1: Now you're also gonna want what else do we have? We had the we had, like, the built with tags. That's gonna be yeah. You can use the tag interface for that. It'd be fine.\u003C/p>\u003Cp>Speaker 0: Built with JSON.\u003C/p>\u003Cp>Speaker 1: There you go. And in this case, you're gonna, like, do allow other values. You could also add some presets to this if you wanted\u003C/p>\u003Cp>Speaker 0: to. I'll add a few\u003C/p>\u003Cp>Speaker 1: where people can just choose those. There you go.\u003C/p>\u003Cp>Speaker 0: There you go. Allow other values. So when they type in, it'll add it. So that'll be a continually growing list. Big fan.\u003C/p>\u003Cp>Speaker 1: So for. You could force alphabetical order if you wanted to. Way to standardize. If not, you could have, you know, potentially, like, next being shown in a separate place. Mhmm.\u003C/p>\u003Cp>Also, just to clarify, that's not my stomach growling. That is this squirrel that I have on my lap.\u003C/p>\u003Cp>Speaker 0: Dog is protecting the house. Love it.\u003C/p>\u003Cp>Speaker 1: Oh, it's not protecting the house. It's it's being a pain in the butt. Tiny dogs, what do you do?\u003C/p>\u003Cp>Speaker 0: Would you force, like, capitalization and and white space and all that sort of stuff? It doesn't matter.\u003C/p>\u003Cp>Speaker 1: I don't know that I would just because, like, some of these well, I'm trying to think of a a good example of, like, a framework that prefers lowercase. I can't really think of any. Like, the white space, you might you know, like, white space, I would definitely, like, trim the white space, like, the the beginning and end, just so you remove white space. There you go. That way, there's, like, no extra, like, the space that's that's big, like breaking formatting or anything like that.\u003C/p>\u003Cp>Speaker 0: Cool. Alright. Awesome. Anything else I should consider here, in advanced field creation mode? Or Nah.\u003C/p>\u003Cp>Speaker 1: I wouldn't worry about it.\u003C/p>\u003Cp>Speaker 0: Great. So I feel like we're good there. I\u003C/p>\u003Cp>Speaker 1: think the next thing\u003C/p>\u003Cp>Speaker 0: we were looking for. Oh, the main content, which would be text area again.\u003C/p>\u003Cp>Speaker 1: Yeah. No. WYSIWYG. This, we're gonna give them formatting options. Why is it why is it main content?\u003C/p>\u003Cp>Not just content.\u003C/p>\u003Cp>Speaker 0: Because it's different from the short summary. Long\u003C/p>\u003Cp>Speaker 1: But that's already it's already a different field, my man.\u003C/p>\u003Cp>Speaker 0: Alright. Content it is.\u003C/p>\u003Cp>Speaker 1: Good here? I'm good. I'm good. My dog is not good. This This data model is good, though.\u003C/p>\u003Cp>Speaker 0: Alright. Feels good. I might actually go and make this content required. At least I have to share something about it. Great.\u003C/p>\u003Cp>So our mini to 1 is now done. Yeah. I guess we could go here. Let's say we're going to start a new project. Everything looks good.\u003C/p>\u003Cp>Yeah. Yeah. Amazing. Alright. So we have our partners.\u003C/p>\u003Cp>We have our one to many connection to the projects, then we've got the many to one back to the partners. So feel good about these 2 collections. Now it's about actioning the actual, role based permission control. So when somebody signs up on the agency side, they're gonna have to go in and be able to add these projects. Maybe invite somebody to add these projects, invite members of the other team if they have to update, agency information.\u003C/p>\u003Cp>Let's dive into role based access control. RBAC, direct us off. This is my first time ever using this, so it should be interesting. Oh,\u003C/p>\u003Cp>Speaker 1: okay. Alright. So what do you think you know?\u003C/p>\u003Cp>Speaker 0: What do I think I know? I see this big plus, and then that's what I think I know is I click this to create something.\u003C/p>\u003Cp>Speaker 1: Yeah. That would be a a user. But as far as, like, what we're trying to achieve, like, what's it what what is your current plan of attack in your mind? And then we'll, like, course correct.\u003C/p>\u003Cp>Speaker 0: Alright. Current plane of attack is and I will visualize this. So we're gonna get a partner in, and that's this little circle. This is a partner that fills out our partner request form. They go through the process.\u003C/p>\u003Cp>Once they have become a partner, via our partner manager, then that is when\u003C/p>\u003Cp>Speaker 1: Are are you supposed to be showing something on the screen? All I see is the user directory.\u003C/p>\u003Cp>Speaker 0: Yes. Yes. I am. Here we go.\u003C/p>\u003Cp>Speaker 1: Okay. Alright. Yeah. Now, we're seeing the circles. Okay.\u003C/p>\u003Cp>Speaker 0: Yeah. Yeah. You missed my circles. Alright. But these these are the phases.\u003C/p>\u003Cp>Right? So, actually, this is going to be, there's no preset yellow, of course. So I'll use orange. Initial come in, person fills out the form. They are vetted, become a partner, and then at this point is when we would send the send invite to partner directory.\u003C/p>\u003Cp>Send them here, and then once they fill that out, then they'd be officially a partner as part of that ecosystem.\u003C/p>\u003Cp>Speaker 1: Okay.\u003C/p>\u003Cp>Speaker 0: These circles are super misshapen. So at that point\u003C/p>\u003Cp>Speaker 1: I think that's an oval.\u003C/p>\u003Cp>Speaker 0: Yeah. It's definitely an oval. This is gonna be main oh my gosh. This is crazy. Main agency contact.\u003C/p>\u003Cp>They would fill fill out that part that we built. And then at this point, they can invite their own team. And I think that's it. So we'd have to figure out a role for this person? Because they're coming in cold, so they have to be able to log in.\u003C/p>\u003Cp>I think we'll provide them a username and a password they can change.\u003C/p>\u003Cp>Speaker 1: Yep.\u003C/p>\u003Cp>Speaker 0: And then we'll have to figure out a role for this person who doesn't necessarily have the ability to change the point of contact information, but just has access to a few fields in that collection, to update the agency information if they need to.\u003C/p>\u003Cp>Speaker 1: Okay. So we've got a admin at the agency, and then we have, like, a a team member at the agency\u003C/p>\u003Cp>Speaker 0: Yep.\u003C/p>\u003Cp>Speaker 1: Kind of set up.\u003C/p>\u003Cp>Speaker 0: Exactly. So 2 two roles, I think.\u003C/p>\u003Cp>Speaker 1: Okay. Now can a person be a part of multiple agencies?\u003C/p>\u003Cp>Speaker 0: I don't think so. I think that's too too much.\u003C/p>\u003Cp>Speaker 1: Too much. Too much.\u003C/p>\u003Cp>Speaker 0: I'm trying to think of any scenario. It seems like a very rare edge case that would be the case and would have to probably be treated on a one to one basis.\u003C/p>\u003Cp>Speaker 1: You could still accommodate that from, like, a using a separate email, basically, I guess. Separate login Maybe. Kind of scenario.\u003C/p>\u003Cp>Speaker 0: This is also the v two of this partner directory, I'd love to build in a thing where, like, an agency partner can go in and request a license or something for, like, a new project that they're building. I'm trying to think that would that would be either the admin or the team member can make that request, but it would be logged to that specific agency. So Yeah.\u003C/p>\u003Cp>Speaker 1: I I think this is good.\u003C/p>\u003Cp>Speaker 0: Good start.\u003C/p>\u003Cp>Speaker 1: Yeah. We'll just scope it down to, like, hey. You can only be a part of 1 agency at a time, which makes sense to me.\u003C/p>\u003Cp>Speaker 0: Okay. Cool. I like it.\u003C/p>\u003Cp>Speaker 1: Alright. So what are you what are you gonna do, man? What are you gonna do?\u003C/p>\u003Cp>Speaker 0: I'm gonna come to access control. I'm gonna click this big purple create role button. The role I create, the naming convention here is gonna be well, you know what? Why don't you tell me? Because I know whatever I put in this little purple Okay.\u003C/p>\u003Cp>Speaker 1: Thank you. So you give me The no. I I would just say, like, agency partner admin or something.\u003C/p>\u003Cp>Speaker 0: Agency partner admin. Not giving them admin access because that would\u003C/p>\u003Cp>Speaker 1: be No. No. No. No. That's just, like, a different thing.\u003C/p>\u003Cp>Yeah.\u003C/p>\u003Cp>Speaker 0: So app access only.\u003C/p>\u003Cp>Speaker 1: App access only.\u003C/p>\u003Cp>Speaker 0: As a small pardon me.\u003C/p>\u003Cp>Speaker 1: Yep.\u003C/p>\u003Cp>Speaker 0: Alright. So now, this is where things get interesting, because we have our website powered through this, which we've got, like, the blocks. So there's going to be a ton of these in here. And it's we're gonna have to provide the right access\u003C/p>\u003Cp>Speaker 1: to these. Correct.\u003C/p>\u003Cp>Speaker 0: All we need to really give them access to is the agency specific things.\u003C/p>\u003Cp>Speaker 1: Right? Correct. You got it, boss man. Which So yeah. Command f comes in handy here, for sure.\u003C/p>\u003Cp>We don't have a search in here yet, but I think it's on the docket.\u003C/p>\u003Cp>Speaker 0: You know, feature request would be great if we had the you know, it actually is frozen up here. That's very nice. I was gonna say, wait. If we could freeze that top column.\u003C/p>\u003Cp>Speaker 1: Alright. So what are you gonna do? Like, how do you wanna play this? You you want me to tell you you wanna step through this?\u003C/p>\u003Cp>Speaker 0: No. Let's I wanna think through this because I am looking at this. I haven't really messed with roles before, but, obviously, this is CRUD. You know, create, update, re what's the r for CRUD?\u003C/p>\u003Cp>Speaker 1: Update. The r? Oh, read. Read. Read.\u003C/p>\u003Cp>Speaker 0: Update. Delete. Yeah. So for the agents for the admin, we're gonna want them to be able to create.\u003C/p>\u003Cp>Speaker 1: Are you? Are you are you not just gonna, like, create a partner and then add the user as part of that partner? Like, is this is this is kind of a high touch program. Right?\u003C/p>\u003Cp>Speaker 0: Yeah. So we would create the agency partner, get the send them the login information. So it would already be created, so they don't need access to create, plus they might go and create stuff that they shouldn't.\u003C/p>\u003Cp>Speaker 1: Yeah. In this case, like, the only thing that they need to be able to do is read their own edit their own. We're not gonna let them delete. We're going to let them create, edit projects. They should be able\u003C/p>\u003Cp>Speaker 0: to delete projects too. Right?\u003C/p>\u003Cp>Speaker 1: Yeah. I was I would allow them to delete their own projects out of the system, but maybe not if it's published. Right? So as long as it's not published, you could delete it. If it is if it's already been published, like, we gotta go through some kind of flow so you're not breaking website.\u003C/p>\u003Cp>Speaker 0: So this would be custom.\u003C/p>\u003Cp>Speaker 1: Yeah. We don't have a field for we didn't add a field for the status of a project. Hey. Like, is this draft or published or not?\u003C/p>\u003Cp>Speaker 0: Alright. Yeah.\u003C/p>\u003Cp>Speaker 1: Add that to the to do list. Alright. And then project files would be the same where you can add project files as you can. Because this is this is just the image gallery. Right?\u003C/p>\u003Cp>So you need to be able to delete those as well.\u003C/p>\u003Cp>Speaker 0: So question. We have the share functionality, which barely gets used, admittedly, because I think there's a little bit of confusion around, like, what it actually allows for. So in this scenario of sharing a collection, would it be useful for them to share with the non, like, the non admin users That works.\u003C/p>\u003Cp>Speaker 1: So if we're gonna keep everybody contained inside, we probably wouldn't use share. We would just give them access. But but, like, say that somebody did not have user access and you wanted to share something with them, you could do that through the share functionality of, like, hey. I wanna share this one specific piece of content with someone, that's not a part of the Directus application.\u003C/p>\u003Cp>Speaker 0: Okay. So this makes sense. So I think for if they're if they're putting in one of those projects in the showcase and they wanna share it with, like, the client and be like, hey. We wrote this little mini study, like, or case study about the project we did with you. Can you confirm it?\u003C/p>\u003Cp>Would that be a good application for this?\u003C/p>\u003Cp>Speaker 1: Yeah. You could potentially do that. Alright. Like, if you if you wanted to see it before you go live yeah. Hey.\u003C/p>\u003Cp>Hey. Well, the other rub is, like, if you're rendering this on the front end, they're probably gonna wanna see the front end as well. So, you know, that kinda goes into, like, a live preview mode on the front end. But just to see the actual content to get approval, you could certainly add share access for this.\u003C/p>\u003Cp>Speaker 0: And we would do that at the\u003C/p>\u003Cp>Speaker 1: project? Project level. Yeah. Cool.\u003C/p>\u003Cp>Speaker 0: Yeah. This feels good so far.\u003C/p>\u003Cp>Speaker 1: Okay.\u003C/p>\u003Cp>Speaker 0: Saves automatically. So Yeah. Alright. Agency So\u003C/p>\u003Cp>Speaker 1: so what's next?\u003C/p>\u003Cp>Speaker 0: I'm gonna create the other role just so\u003C/p>\u003Cp>Speaker 1: it's Okay. Alright.\u003C/p>\u003Cp>Speaker 0: Agency, partner. Boy. Not the admin. Team role. That's it.\u003C/p>\u003Cp>Speaker 1: Team. Just team. Just team. It's already a role.\u003C/p>\u003Cp>Speaker 0: Oh, man. Cracked me up. Alright. So here, they're not going to have access to ad. They'll have access to c, but we don't want them to have access to edit it because that'll be from the admin.\u003C/p>\u003Cp>No. Actually, we do, because can we use a custom permission here, so where they can't see the proof of the point of contact and, like, edit that?\u003C/p>\u003Cp>Speaker 1: Yeah. You certainly can.\u003C/p>\u003Cp>Speaker 0: So\u003C/p>\u003Cp>Speaker 1: It would be within the field permissions.\u003C/p>\u003Cp>Speaker 0: Field permissions.\u003C/p>\u003Cp>Speaker 1: So here's the here's the fields that they can update. So you're going to hit show more there so you can see the rest of them. Mhmm. Alright.\u003C/p>\u003Cp>Speaker 0: So check everything except for point of contact group because everything that's within that group.\u003C/p>\u003Cp>Speaker 1: That's a great question. Yeah. Let's try it and see.\u003C/p>\u003Cp>Speaker 0: Okay.\u003C/p>\u003Cp>Speaker 1: I I I I think it will just be I I think you'll still have to do contact first name, last name, email. Or well, you don't want them to edit that. I'm sorry. Yeah. Leave that unchecked.\u003C/p>\u003Cp>Speaker 0: Yeah. Printer name. Divider. Country. Partners.\u003C/p>\u003Cp>Work description, specialization, logo, team size, projects. Alright. So now they have, custom access to that, if that makes sense.\u003C/p>\u003Cp>Speaker 1: Yep. They're gonna need access to projects, so they can add projects, update projects.\u003C/p>\u003Cp>Speaker 0: Don't want them to be able to delete. We wanna leave that to the admin. And project files, add, see, and edit. Yeah. I think this makes sense for v one rule.\u003C/p>\u003Cp>And if we need to update it later, we can. It's the beauty of automatically saving. Okay.\u003C/p>\u003Cp>Speaker 1: Cool. Cool.\u003C/p>\u003Cp>Speaker 0: Good with these 2. Now the tricky part is\u003C/p>\u003Cp>Speaker 1: alright. What's what is the what is what's the tricky part?\u003C/p>\u003Cp>Speaker 0: The tricky part is whenever we create, when we manually create an agency partner inside of this, we have to create their contact information for that that point of contact. So, like, user directory, we can see here. We can create a user within here. So we fill out, like, their first name, last name, email, password. Interesting we have company info already baked in here.\u003C/p>\u003Cp>So\u003C/p>\u003Cp>Speaker 1: Yeah. That is, that's interesting. I think that is a factor of the docs.\u003C/p>\u003Cp>Speaker 0: Okay. No. This is good. Okay. So if we were to create a fake person here, fake person, and I'll just add in my email.\u003C/p>\u003Cp>We'll have to blur these so they don't pop up.\u003C/p>\u003Cp>Speaker 1: I'd I'd hopefully will be deleting fake person later. And you're gonna have to change your email address because you're already\u003C/p>\u003Cp>Speaker 0: I'm already a member here.\u003C/p>\u003Cp>Speaker 1: You're already in in the system.\u003C/p>\u003Cp>Speaker 0: Auto pop are you seeing my auto\u003C/p>\u003Cp>Speaker 1: Yeah. It looks like it's, spazzing out a little bit there.\u003C/p>\u003Cp>Speaker 0: Yeah. I don't know if you see, like, the pop up where it's, like, all of the things I've pre filled.\u003C/p>\u003Cp>Speaker 1: No. No. I don't see the pop up. Alright. It has to do with your sharing settings, I'm sure.\u003C/p>\u003Cp>Speaker 0: Gotcha. Well, that's good because there's some private info in here. So I'm gonna use a personal Gmail here. I'm not worried about that. I'm not worried about any of that.\u003C/p>\u003Cp>I just wanted to create the fake person stuff. So\u003C/p>\u003Cp>Speaker 1: Okay. Here.\u003C/p>\u003Cp>Speaker 0: I will save. Save. And then for this, I'll go check my email.\u003C/p>\u003Cp>Speaker 1: Did you did you create a password for them? You can also just open up an incognito window and log in. So, like, if you do the if you invite them versus so there's a there's 2 ways. Right? You can invite a user, or you can create a user.\u003C/p>\u003Cp>So what you did was created a user. They're already in the system. They should already have access. Yes. If you send an invite.\u003C/p>\u003Cp>Speaker 0: Alright. So we're in. As an admin, I have access to, these things. I see you just added a agency I\u003C/p>\u003Cp>Speaker 1: added some agency partners for you.\u003C/p>\u003Cp>Speaker 0: Thank you. So if I were to look at yours, I see your name, your agency, your mug, team size, specializations. Looks good to me. There's my mug.\u003C/p>\u003Cp>Speaker 1: What's the problem here, bro?\u003C/p>\u003Cp>Speaker 0: Problem is you have access to all of our files and our user directory of other team members. And we want to scope that down. Additionally, you have access to our insights, which shouldn't have access to that. So we have to limit access to parts of the app from the admin.\u003C/p>\u003Cp>Speaker 1: And what else?\u003C/p>\u003Cp>Speaker 0: And\u003C/p>\u003Cp>Speaker 1: And then, and then, alright. Can you edit my agency?\u003C/p>\u003Cp>Speaker 0: I can edit your agency. That's right. That is right.\u003C/p>\u003Cp>Speaker 1: I'm I'm not saying, like, that would be in a potential issue. Like, we've got a a great list of community members, but\u003C/p>\u003Cp>Speaker 0: Oh, man.\u003C/p>\u003Cp>Speaker 1: Probably not good if you can update somebody else's agency information.\u003C/p>\u003Cp>Speaker 0: If I had other agencies in the US that were in my territory, I'd be editing, like, this agency sucks.\u003C/p>\u003Cp>Speaker 1: Alright. So how do we fix it?\u003C/p>\u003Cp>Speaker 0: So we're gonna go back, step 1, to our normal back enroll right here. I think what we do here, access control, printer admin.\u003C/p>\u003Cp>Speaker 1: There's a step that comes before this.\u003C/p>\u003Cp>Speaker 0: I don't know what the step is. That's why I brought you.\u003C/p>\u003Cp>Speaker 1: So you need, if if you're gonna restrict to a certain agency partner. Right? You got a user. You got an agency partner. You need an arrow between the 2.\u003C/p>\u003Cp>If we're looking at, like, a your diagram of your your circles. You gotta have a relationship between the 2 to be able to filter permissions based on it. Right?\u003C/p>\u003Cp>Speaker 0: Right.\u003C/p>\u003Cp>Speaker 1: Alright.\u003C/p>\u003Cp>Speaker 0: Right. I think. It's early. I'm having trouble conceptualizing this. So\u003C/p>\u003Cp>Speaker 1: Okay. So, basically, we have to create a relationship between the user and the agency partner.\u003C/p>\u003Cp>Speaker 0: Who's the user in this scenario?\u003C/p>\u003Cp>Speaker 1: The the person who's logging in to update the actual information.\u003C/p>\u003Cp>Speaker 0: The the team member? Like, the team\u003C/p>\u003Cp>Speaker 1: The team member or the admin role. Right? They're still logging in to direct us.\u003C/p>\u003Cp>Speaker 0: Gotcha. What would be that step?\u003C/p>\u003Cp>Speaker 1: Alright. So you're gonna go to your data model.\u003C/p>\u003Cp>Speaker 0: Going to the data model. Alright. Sorry.\u003C/p>\u003Cp>Speaker 1: That's where we're gonna create the relationship. You're gonna go to your partners collection.\u003C/p>\u003Cp>Speaker 0: Agency partners.\u003C/p>\u003Cp>Speaker 1: Alright. And we're gonna create a relationship here. We're gonna create a relationship here.\u003C/p>\u003Cp>Speaker 0: I don't know.\u003C/p>\u003Cp>Speaker 1: We're gonna create a relationship here.\u003C/p>\u003Cp>Speaker 0: Yeah. Where does, where do you create a relationship at? I have no idea.\u003C/p>\u003Cp>Speaker 1: Right there, man.\u003C/p>\u003Cp>Speaker 0: Where? Here? Create\u003C/p>\u003Cp>Speaker 1: It has a field. Create a field. Yep. Alright. So you tell me what the relationship is gonna be.\u003C/p>\u003Cp>Speaker 0: This is stringing into territory.\u003C/p>\u003Cp>Speaker 1: Get, like, the, like, the jeopardy timer up? Yeah. Like, the final jeopardy question?\u003C/p>\u003Cp>Speaker 0: This is where I'm not sure. Because when I think of a collection, I think of a form, like fields. And the admin here is gonna be creating a mini to 1. Right? Because it'll be multiple team members associated to one agency.\u003C/p>\u003Cp>Speaker 1: Correct. They will create that via a form, or it's not just, like, automatically So we've gotta create the relationship first, and then you can have it automatically populate the information\u003C/p>\u003Cp>Speaker 0: Okay.\u003C/p>\u003Cp>Speaker 1: When users get created.\u003C/p>\u003Cp>Speaker 0: So from the agency partner's perspective, it's gonna be many to 1 because on the other side is the team member that's a one. Now wait.\u003C/p>\u003Cp>Speaker 1: That's it. No. No. No. If you've got if you've got multiple people that are part of the same agency, it is a The agency to many because a user belongs to one agency.\u003C/p>\u003Cp>The agency could have many users.\u003C/p>\u003Cp>Speaker 0: Gotcha. So\u003C/p>\u003Cp>Speaker 1: here, you're gonna pick the one to one to many option.\u003C/p>\u003Cp>Speaker 0: Okay. One to many.\u003C/p>\u003Cp>Speaker 1: There you go. This is gonna be\u003C/p>\u003Cp>Speaker 0: the admin is the one that's filling this out. So they're gonna be building they're gonna invite team members.\u003C/p>\u003Cp>Speaker 1: User. You're gonna call it user. Yeah. Or servers. Users, plural.\u003C/p>\u003Cp>There you go. Users. Alright. The related collection is going to be directus_users. That is a system collection.\u003C/p>\u003Cp>That's why it's prefixed with directus. Yeah. And then for the foreign key, that's gonna be the field that holds the agency partner ID inside the Directus users table or the directus users collection. So that would probably be agency partner or agency partner ID.\u003C/p>\u003Cp>Speaker 0: Is that something that's built already?\u003C/p>\u003Cp>Speaker 1: No. You don't have to build it, though. If you key it in and it doesn't exist, Directus will create it for you.\u003C/p>\u003Cp>Speaker 0: No. Agency partner ID.\u003C/p>\u003Cp>Speaker 1: There you go.\u003C/p>\u003Cp>Speaker 0: Okay.\u003C/p>\u003Cp>Speaker 1: Alright. Doesn't really matter if we show these in a list or a table. Solid. Do we wanna show a link to the user? Probably.\u003C/p>\u003Cp>Yeah. And we're gonna dismiss. Not sure why that error shows up. But now we have created a relationship. Right?\u003C/p>\u003Cp>And if you go back to the data model, open up the system fields. There you go.\u003C/p>\u003Cp>Speaker 0: Fields. System collection.\u003C/p>\u003Cp>Speaker 1: There you go. Click on direct as users. So these are the system collections. You can't update any of the, like, the default fields, but we should see at the very bottom of this, you should see an agency partner ID field. You might wanna unhide that just for fun.\u003C/p>\u003Cp>There you go. Alright. So we've got the relationship now. Now we can actually use that to restrict permissions. That make sense?\u003C/p>\u003Cp>Speaker 0: Yep.\u003C/p>\u003Cp>Speaker 1: Got it? Alright. So we're gonna go back to access control, and we'll we'll just do, like, the part agency partner admin for now because we that's the user that we've got. Alright. So down the bottom, you got scroll up to where you got the actual permissions.\u003C/p>\u003Cp>There you go. Alright. So agency partners, all these are gonna be custom permissions. Right? So change this from all to custom for read.\u003C/p>\u003Cp>Right? We only want them to be able to see their own agency.\u003C/p>\u003Cp>Speaker 0: The admin?\u003C/p>\u003Cp>Speaker 1: Right. K. So Alright. So for item permissions there oh, go back.\u003C/p>\u003Cp>Speaker 0: So for here\u003C/p>\u003Cp>Speaker 1: Yep. View. Go to use custom. Yeah. Alright.\u003C/p>\u003Cp>So for item permissions, we're gonna add a filter for this. Right? And the filter is gonna be the ID. So the agency partner ID, right, is equal to we're gonna use a little bit of Directus magic here. You're gonna type in dollar sign, all caps, current_user.\u003C/p>\u003Cp>So that's gonna give us the current user that's logged in. Right? We can use the related fields that are attached to that user in our filter here. So we're gonna do current underscore user dot agency underscore, you gotta get now we're going back all lowercase. There you go.\u003C/p>\u003Cp>Partner\u003C/p>\u003Cp>Speaker 0: underscore\u003C/p>\u003Cp>Speaker 1: underscore ID. Right? That's the field that we set up on that particular on the direct us users collection. So now what we've just said is basically, hey. I can only read the agency partner's collection, like, the items within that collection that that equal this rule, which is only gonna be 1.\u003C/p>\u003Cp>Right?\u003C/p>\u003Cp>Speaker 0: Okay.\u003C/p>\u003Cp>Speaker 1: Makes sense? Now what you're gonna do, click, click the drop down. Well, hover over rule or just the actual heading. Let me give you a shortcut. Yeah.\u003C/p>\u003Cp>Or it it says rule right up above that. Click that. Click copy raw value. Mhmm. Save this.\u003C/p>\u003Cp>And then go to the edit permissions for that agency partners Mhmm. And click use custom, and paste that there for the item permissions here. Say okay. So now we can only see our own agencies that we're a part of. We can only edit our own agency.\u003C/p>\u003Cp>Now we have to go through and do something similar for projects. Right? Because I I shouldn't be able to edit some other agency's project.\u003C/p>\u003Cp>Speaker 0: Right.\u003C/p>\u003Cp>Speaker 1: So I can create projects. When when I go to custom here and instead of there's no item permissions for creating an item because there's we're creating an item. The item doesn't exist yet. We can't filter by it. But what we're gonna do for the presets, in this case, we're gonna give it a preset.\u003C/p>\u003Cp>And the preset we're gonna do here, you're gonna do, the mustache brackets so we get some JSON. Okay. And within that, you're gonna create a new field. There you go. What do we hit enter.\u003C/p>\u003Cp>Mhmm. And what are we gonna do here? Agency okay. So the if we're in the project trying to think of the field. What did we call the field relating back?\u003C/p>\u003Cp>Partner. Okay. So you're gonna put partner in quotation marks. K. Colon.\u003C/p>\u003Cp>There you go. Colon. Quotation mark. 2 left mustache brackets, dollar sign current, Whoop. That's a hash.\u003C/p>\u003Cp>Current. Underscore user dot what? Agency underscore partner underscore ID. And then you're gonna close that mustache syntax and hit the quotation mark. Alright.\u003C/p>\u003Cp>So what that's gonna do, whenever this user within this role creates a new project, it's gonna default the partner value to that specific field or to the agency partner ID that's attached to that user. So whenever they create a project, it's always gonna be scoped to that specific agency.\u003C/p>\u003Cp>Speaker 0: Gotcha. Okay. That makes sense.\u003C/p>\u003Cp>Speaker 1: Cool. So now you hit save.\u003C/p>\u003Cp>Speaker 0: Should I oh, no. Because this is on creation. So\u003C/p>\u003Cp>Speaker 1: Yep. And then so within that go back down. And then we're gonna apply custom permissions for the other items here. Right? Mhmm.\u003C/p>\u003Cp>So the rule here is not gonna be ID because now we're inside the project. Right? We're not inside the partner anymore. So it's gonna be the partner dot ID. So there you go.\u003C/p>\u003Cp>Expand that. Partner dot ID. Yeah. But it's gonna be the same value. Dollar sign current underscore user dot agency_partner.i oh, not dotid_id.\u003C/p>\u003Cp>Yeah. You got it right. Alright. And now you can copy that, and you can apply it to all the other ones.\u003C/p>\u003Cp>Speaker 0: This is something that's so for as I paste this, that, like, custom type of filter and and building the presets and things like that. Like, that's that's high level stuff. Like, like, the doc, would the docs be the best place to learn things like that, for somebody\u003C/p>\u003Cp>Speaker 1: Yeah. There's a good primer on the on roles and permissions within docs. So hover over role. There you go. Paste.\u003C/p>\u003Cp>But the the docs are certainly good. There's a couple of great guides on it as well. But all those variables that are available are documented there. Right?\u003C/p>\u003Cp>Speaker 0: Yeah. And they should only be able to share their own things. There you go. Now Alright. So files or\u003C/p>\u003Cp>Speaker 1: So for project files, that's a junction collection. We could go in and, like, scope that as well. It probably not necessary for for this episode.\u003C/p>\u003Cp>Speaker 0: No. We can do that.\u003C/p>\u003Cp>Speaker 1: Because, basically, what that project files collection is is just a, like, a pointer to a direct to file and a pointer to a project. There's nothing else that's being stored in there.\u003C/p>\u003Cp>Speaker 0: Okay.\u003C/p>\u003Cp>Speaker 1: Now the other thing that we're probably gonna want to adjust, and there's there's a couple ways we could get this done, is the file access. Right? We don't want them to be able to access all of our files.\u003C/p>\u003Cp>Speaker 0: Mhmm.\u003C/p>\u003Cp>Speaker 1: We don't want them to be able to delete our files. You know, we probably trying to think of the best way to scope this where you get tied to a specific user who has the same partner. Like, I could see only the files that we've uploaded into the system.\u003C/p>\u003Cp>Speaker 0: So the Does\u003C/p>\u003Cp>Speaker 1: that make sense?\u003C/p>\u003Cp>Speaker 0: You're thinking of doing it tied to the main admin user, or would it be like a\u003C/p>\u003Cp>Speaker 1: So each each user who is logged in is gonna have like, if they're part of this agency partner program, they're gonna have to be tied to a specific agency. Right? We should be able to go through that relationship and just show all of the files that were uploaded by members of that agency. I'm thinking we should be able to do that. This gets a little deeper into, like, the nesting, but, a couple things that I would do here.\u003C/p>\u003Cp>Right? Like, the the other option is to do something like a folder or, you know, add we could go in and modify the Directus files collection to have a relationship to the actual agency. And then whenever a file gets created, we add the agency relationship to that specific file. So there's multiple ways we could achieve it. I'm trying to think of the the easiest one to do for for this one.\u003C/p>\u003Cp>Speaker 0: Here's a question. Should we make a part 3 where we focus on kind of the system collections and how they interact with, like, the role based access control stuff.\u003C/p>\u003Cp>Speaker 1: Where are we at time wise?\u003C/p>\u003Cp>Speaker 0: We're coming up on about an hour. So may I mean, that seems like a good part through to me, because it sounds like it's gonna be a little bit more in the weeds on kind of structuring this out on the more of the back less of the partner directory itself, so more of, like, how Directus interacts with specific roles and and things like that. So, if you think it's quick fix, quick solution, I'm up for it. But\u003C/p>\u003Cp>Speaker 1: Hey. Let's log in and test this out. Hey. Let's test what we've got so far Alright. And see see how that's working.\u003C/p>\u003Cp>Right? So at at this point, like, actually, do one more thing for me. Go to the system collections, and we wanna restrict access to the insights. Right? So if you go into Directus dashboards\u003C/p>\u003Cp>Speaker 0: Directus dashboards here.\u003C/p>\u003Cp>Speaker 1: Just set that to none. So there's a shortcut over there. Right? Go to Directus panels.\u003C/p>\u003Cp>Speaker 0: Panels.\u003C/p>\u003Cp>Speaker 1: Set that to none. Mhmm. There you go. Alright. So that should limit any of the actual folks from seeing any of the inside spales.\u003C/p>\u003Cp>Speaker 0: Great. Okay.\u003C/p>\u003Cp>Speaker 1: Oh, and then the other thing that we wanna do here, where this is the agency partner role, So where it says direct as\u003C/p>\u003Cp>Speaker 0: roles Mhmm.\u003C/p>\u003Cp>Speaker 1: We let's change that. So add a custom permission for that.\u003C/p>\u003Cp>Speaker 0: For which one?\u003C/p>\u003Cp>Speaker 1: For the the read.\u003C/p>\u003Cp>Speaker 0: Read. Use custom.\u003C/p>\u003Cp>Speaker 1: Alright. So for the role here, we want to, what roles do we wanna see? The roles of the item yeah. So there's a oh, okay. I think it's actually already set in it.\u003C/p>\u003Cp>ID equals current rule. Follow automatically applied when okay. So I think that should be good then.\u003C/p>\u003Cp>Speaker 0: Okay. So they'll only be able to see because we should they should only be able to see in the in the admin of, like, users. It should just be their agency users. Yeah.\u003C/p>\u003Cp>Speaker 1: Right. No. So what we need to do there is we just need to add a condition to the direct as users collection instead of the role. So go ahead and close this. Scroll down to direct as users, and the read there is the one that we're gonna update.\u003C/p>\u003Cp>Speaker 0: Okay.\u003C/p>\u003Cp>Speaker 1: Alright. So the yeah. It's gonna be the agency partner. You should be able to search for it. Agency partner ID.\u003C/p>\u003Cp>Yep. There you go. Equals current, dollar sign. Right? Current underscore user.\u003C/p>\u003Cp>Yeah. Dot agency_partner.id. Great. Alright. So now let's log in.\u003C/p>\u003Cp>We'll worry about files later. We're gonna open up that other browser, whatever you had. Now hit refresh.\u003C/p>\u003Cp>Speaker 0: And any other agency projects or partners.\u003C/p>\u003Cp>Speaker 1: And you shouldn't be able to see any projects either because we don't have any Yeah. Yeah. We don't have any projects, but as far as the user directory, I shouldn't see any other users either.\u003C/p>\u003Cp>Speaker 0: I see myself.\u003C/p>\u003Cp>Speaker 1: Yeah. And and, again, like, we could go in and restrict that list of roles, I guess. You know, not particularly sensitive, but, you know, we could restrict that to just the agency partner roles if we wanted to. You know, files, they're still gonna be able to see all files. But what I'm gonna do behind the scenes here, we don't have this relationship between your fake user and the project or the agency.\u003C/p>\u003Cp>Right? So that's why you're not seeing any projects. Maybe you wanna pull the admin back up. That way we could just show everybody, I guess. Mhmm.\u003C/p>\u003Cp>Alright. So go to your user's directory. Here. In the the module bar. So, like, the actual user's directory.\u003C/p>\u003Cp>There you go. Alright. Find your fake person. And I don't want any scrubs on my team, so it could be in your agency.\u003C/p>\u003Cp>Speaker 0: Don't want no scrubs.\u003C/p>\u003Cp>Speaker 1: Agency So the agency partner ID, yeah, you could put them in your agency, and hit save. So now you've added that user to that agency, and that user has the appropriate role. They've got a partner ID that's linked. If you log in as that user now, if you switch back to that incognito window and hit refresh Mhmm. We should see, like, on the agency partner side of it, should see your agency.\u003C/p>\u003Cp>And, like, if you click into it, should have the ability to edit that as well. Wonderful.\u003C/p>\u003Cp>Speaker 0: It's just okay. Yeah. Just okay. Oh, cool. So, and then here we could instead of, you know, a table layout, I could do map.\u003C/p>\u003Cp>And wherever the country is, maybe that shows up here.\u003C/p>\u003Cp>Speaker 1: Very cool. There you go. So now within that, right, we could go in and like, you could go in and flesh out all of your projects if you wanted to.\u003C/p>\u003Cp>Speaker 0: Yeah. And then they would all automatically be associated just with that single agency because that's what the person's Correct. Fantastic.\u003C/p>\u003Cp>Speaker 1: Yeah. So as far as, like, the the next steps, right, would be a figure out I I I at this point, I don't think we fully understand how we wanna scope, like, the file library because, yeah, I would think that it it would be helpful for agency partners to have access to, like, all the brand assets.\u003C/p>\u003Cp>Speaker 0: Right.\u003C/p>\u003Cp>Speaker 1: Right? There's there's certain internal files we wanna give them access to, but, you know, there's probably some private things that we wouldn't want them to have access to. So it it would make sense to do it on a combination of maybe, like, folder structure and files that they've uploaded as well. Like, any of the files that we've uploaded, they can't change. They could read those files.\u003C/p>\u003Cp>They could download them. They can't delete or edit. But files that they've uploaded, you know, maybe they've got the ability to edit or replace those.\u003C/p>\u003Cp>Speaker 0: That's a great point. That brand kit. Alright. Awesome. Well, episode 2, part 2.\u003C/p>\u003Cp>I feel like we've covered a lot of good ground here. Part 1, we got the actual data model set up. Part 2, we got the roles and access. Next part, part 3, we'll talk about how to share specific internal assets, how they can upload assets, and only access the things that they need within a direct instance test.\u003C/p>","Everybody, welcome back to the part 2 of Technically, I'm Lost, t I l. As, again, you're probably joining us from the last episode. I'm Matt, and this is Bryant. Put a little French spin on it today. If you've watched part 1, if are we gonna did I just cut you off? I no. No. It's okay. I was gonna say do I look French to you? But We'll have to ask, Alex Chopin, our director of engineering from France. I digress. But yeah. So if you watched part 1, if you haven't, you're probably confused. We suggest you go watch part 1, because this is part 2 of part 1. But, part 1, we are building a partner directory for us to use with our current partners. In that first episode, we planned out, how it was all gonna look, and we built out the form, which I can actually pull up my screen here and show you kind of how far we've gotten along. So, we I will say I, with the help of Bryant, me being a nontechnical person, learning directors for the first time, set up, this initial form in here. So we were able to set up, you know, point of contact, some information about the actual agency themselves, what they specialize in, with the drop down, partner logos, and we had, these projects, here as well as as this. So the general idea just to catch you up, is we wanna create a partner directory on the director's website for our partners, and this is the back end to get that whole thing running. So where we left off last time, Brian, do you remember? Yeah. Yeah. Kind of. No. I I think what we need to do now, Daniel, like, we've got our agency partner collection configured. That's looking nice. We need to go through and create the actual projects that we want them to add. So what's a data model look like for that? And then we need to scope a role for our partners. So, they can only edit their content and only, like, the agency partners and the project's collections. Great. Okay. So let's start with that part 1. So the projects, to give you a little background on how we're thinking about this. So when somebody comes to, you know, direct style slash partners, they'll filter down on country and specialization. By then, they'll find an agency they like. They click on them, and then that page will have a showcase of the projects that that agency has done with Directus. So we'll need to create that collection, as you mentioned. What's a good starting point for this? Is it just diving in? Is it a little bit of planning your strategic approach to this? Or what do you think? I I mean, I I think at a high level, you wanna know what what goes on a project or or, like, what form feels, like, what are we gonna display when you click into a project. Mhmm. You know, if I'm imagining it, like, you've got an agency page where you're you're surfacing all these projects, maybe, like do we have an extra page for each project as well? So I can I'm on the agency page. I see a list of their recent projects. I click in the project, and I get, like, a a mini case study type of thing, or we're gonna show those in a model, like, a pop up window. How what do we we wanna do there? I think it would be good to have a page. I like what you said about, like, a mini case study page. So maybe we'll have, like, the a scroller here of, like, they can go back and forth for, like, images of the actual website. And then I don't like it. You don't like it? I I want a grid. I don't like it. Give me a grid of projects. A grid. Wait for the individual project. Oh, no. No. No. For the individual projects, I I'm thinking well, you got, like, an image gallery. I I'm thinking like a grid still. Big grid guy. Yeah. Let me I'm gonna share. I'm gonna share a link. Let me share. This is, again, this is the agent c OS link. So this is a sample starter kit project that that I put together, to showcase what you could do with Directus. Let me I guess I could put it in the chat here instead of our team comps. Alright. Let me pull this up over here. This is not a a like, the text doesn't really jive here, but, you know, you've got, like, a a title for the project. You got, like, a summary, then you have some content, and then you have an image gallery that, you know, if you click on one of those images, then you could cycle through. Wow. Instead of, like, a instead of a carousel on the actual page, show a grid. And then you have some metadata, like, hey. What's the client? What's it built with? What's the cost? I I don't know if we wanna probably omit that for this. You know? Would be nice to show, like, what it was built with. Those could just be, like, tags. So this is kinda what I'm envisioning. You know, the the header there is probably not it doesn't really jive with, like, the direct as brand guidelines. So we'd probably do something different. But, you know, I I think at a high level, you got a title, a short summary of the project. You've got a featured image for the project. You have some content, in case they wanna expand or go into as much detail as they want to. And then there's probably, like, the the content would probably be, like, text. Right? Mhmm. And then the yeah. And then you could have, like, a separate gallery if you wanted to. Separate gallery. And then, you know, like, some tags for what it was built with, like front end type of stuff, I guess. Like, hey. Is it built with Next? Is it built with Next? I I don't know. I don't know if that's necessary either. Okay. I like this. So, yeah, so we would create a collection with these different items inside of Directus. Last time, if you can refresh my memory, when we created the projects here, this was a one to mini or a mini to 1? So it depends on where you're at. Right? Those are 2 inverse relationships. If you are a for this example, if we're on the agency partner, projects would be a one to many relationship because I've got one agency, many projects. But if I'm inside projects, it's the reverse. Right? I've got, one project or, actually, I'm sorry. Is it many projects to one agency, basically. Yeah. That makes sense. Like a project can only have belong to a single agency is what I'm trying to say. That makes sense. So we'd have this is the one to many from the agency side. So if we go here, this would be the many to 1. Yep. So what you're gonna have to do here is go into our data model for projects because we we didn't add any fields for that. Mhmm. Where is our here. So from the agency side, if if I click here, this will take me automatically there. It's over here. Great. So just like we did last time, you know, obviously, going through, filling out these fields. Title, I assume, would be just a standard input field. Title, String. There you go. I mean, required, obviously. Project title, let's see. The name of the client, input project client. And, again, I would probably just do, like, client name. Right? Because there's, like, where else are you using client name? You're not. Naming conventions. I'm about to get open that can of worms. So short summary. Would you use an input field, or would you use a text area field? Or Text area for sure. No wysiwyg. I don't wanna deal with rendering HTML or, stripping out HTML. I I just want, like, a short description to display on a card or in a heading. And if I'm gonna add a placeholder here, I will do it in the placeholder field. Yeah. You've also got the help field or the the note field, I think, is is what it is as well. Like, the placeholder is gonna be it's gonna disappear as soon as they start typing. Right? The if you go to the field tab when you create 1, you got some helper text that you can add. Okay. Okay. So here, we are creating the main image versus the gallery of images that they could just, like, see. So Yeah. There there's 2 ways you could you could do that. Right? You could just have an image gallery and use the first item in the gallery as, like, the featured image. It's kinda a matter of personal preference. Usually, I like to be more explicit. And because of the way that Directus, like, queries the data and, like, if I'm showing a list of projects, I I can create it or treat it my gosh. I came to talk today. You could treat it like GraphQL, and I could tell it specifically the fields that I want. So, you know, on the index page where we're showing a list of projects, I can just grab the featured image and not worry about the image gallery. So that's that's probably why I would do 2 separate fields for those. So you might have, like, a, like, a featured image field and then, like, an image gallery or gallery, whatever you wanna call it. This is just a single image that you're gonna use across the site. Featured No. No. No. No. What did you do? I created a featured It's not just messing with you. No. You don't need your Oh, Don't be doing that today. Oh, man. Got my heart rate up. So next part, if we're doing a showcase or gallery, I assume files based on the image here. Yep. Definitely. And then showcase. Bro, call it image gallery or a gallery. I was gonna call it a project showcase. I feel like we're going to The Price is Right if we're, like, doing showcase. Okay. So I don't know if we want this required because as long as they have the the Yeah. You don't necessarily have to add an image gallery. Cool. So what else what else here? That's it. Really? Alright. Now you're also gonna want what else do we have? We had the we had, like, the built with tags. That's gonna be yeah. You can use the tag interface for that. It'd be fine. Built with JSON. There you go. And in this case, you're gonna, like, do allow other values. You could also add some presets to this if you wanted to. I'll add a few where people can just choose those. There you go. There you go. Allow other values. So when they type in, it'll add it. So that'll be a continually growing list. Big fan. So for. You could force alphabetical order if you wanted to. Way to standardize. If not, you could have, you know, potentially, like, next being shown in a separate place. Mhmm. Also, just to clarify, that's not my stomach growling. That is this squirrel that I have on my lap. Dog is protecting the house. Love it. Oh, it's not protecting the house. It's it's being a pain in the butt. Tiny dogs, what do you do? Would you force, like, capitalization and and white space and all that sort of stuff? It doesn't matter. I don't know that I would just because, like, some of these well, I'm trying to think of a a good example of, like, a framework that prefers lowercase. I can't really think of any. Like, the white space, you might you know, like, white space, I would definitely, like, trim the white space, like, the the beginning and end, just so you remove white space. There you go. That way, there's, like, no extra, like, the space that's that's big, like breaking formatting or anything like that. Cool. Alright. Awesome. Anything else I should consider here, in advanced field creation mode? Or Nah. I wouldn't worry about it. Great. So I feel like we're good there. I think the next thing we were looking for. Oh, the main content, which would be text area again. Yeah. No. WYSIWYG. This, we're gonna give them formatting options. Why is it why is it main content? Not just content. Because it's different from the short summary. Long But that's already it's already a different field, my man. Alright. Content it is. Good here? I'm good. I'm good. My dog is not good. This This data model is good, though. Alright. Feels good. I might actually go and make this content required. At least I have to share something about it. Great. So our mini to 1 is now done. Yeah. I guess we could go here. Let's say we're going to start a new project. Everything looks good. Yeah. Yeah. Amazing. Alright. So we have our partners. We have our one to many connection to the projects, then we've got the many to one back to the partners. So feel good about these 2 collections. Now it's about actioning the actual, role based permission control. So when somebody signs up on the agency side, they're gonna have to go in and be able to add these projects. Maybe invite somebody to add these projects, invite members of the other team if they have to update, agency information. Let's dive into role based access control. RBAC, direct us off. This is my first time ever using this, so it should be interesting. Oh, okay. Alright. So what do you think you know? What do I think I know? I see this big plus, and then that's what I think I know is I click this to create something. Yeah. That would be a a user. But as far as, like, what we're trying to achieve, like, what's it what what is your current plan of attack in your mind? And then we'll, like, course correct. Alright. Current plane of attack is and I will visualize this. So we're gonna get a partner in, and that's this little circle. This is a partner that fills out our partner request form. They go through the process. Once they have become a partner, via our partner manager, then that is when Are are you supposed to be showing something on the screen? All I see is the user directory. Yes. Yes. I am. Here we go. Okay. Alright. Yeah. Now, we're seeing the circles. Okay. Yeah. Yeah. You missed my circles. Alright. But these these are the phases. Right? So, actually, this is going to be, there's no preset yellow, of course. So I'll use orange. Initial come in, person fills out the form. They are vetted, become a partner, and then at this point is when we would send the send invite to partner directory. Send them here, and then once they fill that out, then they'd be officially a partner as part of that ecosystem. Okay. These circles are super misshapen. So at that point I think that's an oval. Yeah. It's definitely an oval. This is gonna be main oh my gosh. This is crazy. Main agency contact. They would fill fill out that part that we built. And then at this point, they can invite their own team. And I think that's it. So we'd have to figure out a role for this person? Because they're coming in cold, so they have to be able to log in. I think we'll provide them a username and a password they can change. Yep. And then we'll have to figure out a role for this person who doesn't necessarily have the ability to change the point of contact information, but just has access to a few fields in that collection, to update the agency information if they need to. Okay. So we've got a admin at the agency, and then we have, like, a a team member at the agency Yep. Kind of set up. Exactly. So 2 two roles, I think. Okay. Now can a person be a part of multiple agencies? I don't think so. I think that's too too much. Too much. Too much. I'm trying to think of any scenario. It seems like a very rare edge case that would be the case and would have to probably be treated on a one to one basis. You could still accommodate that from, like, a using a separate email, basically, I guess. Separate login Maybe. Kind of scenario. This is also the v two of this partner directory, I'd love to build in a thing where, like, an agency partner can go in and request a license or something for, like, a new project that they're building. I'm trying to think that would that would be either the admin or the team member can make that request, but it would be logged to that specific agency. So Yeah. I I think this is good. Good start. Yeah. We'll just scope it down to, like, hey. You can only be a part of 1 agency at a time, which makes sense to me. Okay. Cool. I like it. Alright. So what are you what are you gonna do, man? What are you gonna do? I'm gonna come to access control. I'm gonna click this big purple create role button. The role I create, the naming convention here is gonna be well, you know what? Why don't you tell me? Because I know whatever I put in this little purple Okay. Thank you. So you give me The no. I I would just say, like, agency partner admin or something. Agency partner admin. Not giving them admin access because that would be No. No. No. No. That's just, like, a different thing. Yeah. So app access only. App access only. As a small pardon me. Yep. Alright. So now, this is where things get interesting, because we have our website powered through this, which we've got, like, the blocks. So there's going to be a ton of these in here. And it's we're gonna have to provide the right access to these. Correct. All we need to really give them access to is the agency specific things. Right? Correct. You got it, boss man. Which So yeah. Command f comes in handy here, for sure. We don't have a search in here yet, but I think it's on the docket. You know, feature request would be great if we had the you know, it actually is frozen up here. That's very nice. I was gonna say, wait. If we could freeze that top column. Alright. So what are you gonna do? Like, how do you wanna play this? You you want me to tell you you wanna step through this? No. Let's I wanna think through this because I am looking at this. I haven't really messed with roles before, but, obviously, this is CRUD. You know, create, update, re what's the r for CRUD? Update. The r? Oh, read. Read. Read. Update. Delete. Yeah. So for the agents for the admin, we're gonna want them to be able to create. Are you? Are you are you not just gonna, like, create a partner and then add the user as part of that partner? Like, is this is this is kind of a high touch program. Right? Yeah. So we would create the agency partner, get the send them the login information. So it would already be created, so they don't need access to create, plus they might go and create stuff that they shouldn't. Yeah. In this case, like, the only thing that they need to be able to do is read their own edit their own. We're not gonna let them delete. We're going to let them create, edit projects. They should be able to delete projects too. Right? Yeah. I was I would allow them to delete their own projects out of the system, but maybe not if it's published. Right? So as long as it's not published, you could delete it. If it is if it's already been published, like, we gotta go through some kind of flow so you're not breaking website. So this would be custom. Yeah. We don't have a field for we didn't add a field for the status of a project. Hey. Like, is this draft or published or not? Alright. Yeah. Add that to the to do list. Alright. And then project files would be the same where you can add project files as you can. Because this is this is just the image gallery. Right? So you need to be able to delete those as well. So question. We have the share functionality, which barely gets used, admittedly, because I think there's a little bit of confusion around, like, what it actually allows for. So in this scenario of sharing a collection, would it be useful for them to share with the non, like, the non admin users That works. So if we're gonna keep everybody contained inside, we probably wouldn't use share. We would just give them access. But but, like, say that somebody did not have user access and you wanted to share something with them, you could do that through the share functionality of, like, hey. I wanna share this one specific piece of content with someone, that's not a part of the Directus application. Okay. So this makes sense. So I think for if they're if they're putting in one of those projects in the showcase and they wanna share it with, like, the client and be like, hey. We wrote this little mini study, like, or case study about the project we did with you. Can you confirm it? Would that be a good application for this? Yeah. You could potentially do that. Alright. Like, if you if you wanted to see it before you go live yeah. Hey. Hey. Well, the other rub is, like, if you're rendering this on the front end, they're probably gonna wanna see the front end as well. So, you know, that kinda goes into, like, a live preview mode on the front end. But just to see the actual content to get approval, you could certainly add share access for this. And we would do that at the project? Project level. Yeah. Cool. Yeah. This feels good so far. Okay. Saves automatically. So Yeah. Alright. Agency So so what's next? I'm gonna create the other role just so it's Okay. Alright. Agency, partner. Boy. Not the admin. Team role. That's it. Team. Just team. Just team. It's already a role. Oh, man. Cracked me up. Alright. So here, they're not going to have access to ad. They'll have access to c, but we don't want them to have access to edit it because that'll be from the admin. No. Actually, we do, because can we use a custom permission here, so where they can't see the proof of the point of contact and, like, edit that? Yeah. You certainly can. So It would be within the field permissions. Field permissions. So here's the here's the fields that they can update. So you're going to hit show more there so you can see the rest of them. Mhmm. Alright. So check everything except for point of contact group because everything that's within that group. That's a great question. Yeah. Let's try it and see. Okay. I I I I think it will just be I I think you'll still have to do contact first name, last name, email. Or well, you don't want them to edit that. I'm sorry. Yeah. Leave that unchecked. Yeah. Printer name. Divider. Country. Partners. Work description, specialization, logo, team size, projects. Alright. So now they have, custom access to that, if that makes sense. Yep. They're gonna need access to projects, so they can add projects, update projects. Don't want them to be able to delete. We wanna leave that to the admin. And project files, add, see, and edit. Yeah. I think this makes sense for v one rule. And if we need to update it later, we can. It's the beauty of automatically saving. Okay. Cool. Cool. Good with these 2. Now the tricky part is alright. What's what is the what is what's the tricky part? The tricky part is whenever we create, when we manually create an agency partner inside of this, we have to create their contact information for that that point of contact. So, like, user directory, we can see here. We can create a user within here. So we fill out, like, their first name, last name, email, password. Interesting we have company info already baked in here. So Yeah. That is, that's interesting. I think that is a factor of the docs. Okay. No. This is good. Okay. So if we were to create a fake person here, fake person, and I'll just add in my email. We'll have to blur these so they don't pop up. I'd I'd hopefully will be deleting fake person later. And you're gonna have to change your email address because you're already I'm already a member here. You're already in in the system. Auto pop are you seeing my auto Yeah. It looks like it's, spazzing out a little bit there. Yeah. I don't know if you see, like, the pop up where it's, like, all of the things I've pre filled. No. No. I don't see the pop up. Alright. It has to do with your sharing settings, I'm sure. Gotcha. Well, that's good because there's some private info in here. So I'm gonna use a personal Gmail here. I'm not worried about that. I'm not worried about any of that. I just wanted to create the fake person stuff. So Okay. Here. I will save. Save. And then for this, I'll go check my email. Did you did you create a password for them? You can also just open up an incognito window and log in. So, like, if you do the if you invite them versus so there's a there's 2 ways. Right? You can invite a user, or you can create a user. So what you did was created a user. They're already in the system. They should already have access. Yes. If you send an invite. Alright. So we're in. As an admin, I have access to, these things. I see you just added a agency I added some agency partners for you. Thank you. So if I were to look at yours, I see your name, your agency, your mug, team size, specializations. Looks good to me. There's my mug. What's the problem here, bro? Problem is you have access to all of our files and our user directory of other team members. And we want to scope that down. Additionally, you have access to our insights, which shouldn't have access to that. So we have to limit access to parts of the app from the admin. And what else? And And then, and then, alright. Can you edit my agency? I can edit your agency. That's right. That is right. I'm I'm not saying, like, that would be in a potential issue. Like, we've got a a great list of community members, but Oh, man. Probably not good if you can update somebody else's agency information. If I had other agencies in the US that were in my territory, I'd be editing, like, this agency sucks. Alright. So how do we fix it? So we're gonna go back, step 1, to our normal back enroll right here. I think what we do here, access control, printer admin. There's a step that comes before this. I don't know what the step is. That's why I brought you. So you need, if if you're gonna restrict to a certain agency partner. Right? You got a user. You got an agency partner. You need an arrow between the 2. If we're looking at, like, a your diagram of your your circles. You gotta have a relationship between the 2 to be able to filter permissions based on it. Right? Right. Alright. Right. I think. It's early. I'm having trouble conceptualizing this. So Okay. So, basically, we have to create a relationship between the user and the agency partner. Who's the user in this scenario? The the person who's logging in to update the actual information. The the team member? Like, the team The team member or the admin role. Right? They're still logging in to direct us. Gotcha. What would be that step? Alright. So you're gonna go to your data model. Going to the data model. Alright. Sorry. That's where we're gonna create the relationship. You're gonna go to your partners collection. Agency partners. Alright. And we're gonna create a relationship here. We're gonna create a relationship here. I don't know. We're gonna create a relationship here. Yeah. Where does, where do you create a relationship at? I have no idea. Right there, man. Where? Here? Create It has a field. Create a field. Yep. Alright. So you tell me what the relationship is gonna be. This is stringing into territory. Get, like, the, like, the jeopardy timer up? Yeah. Like, the final jeopardy question? This is where I'm not sure. Because when I think of a collection, I think of a form, like fields. And the admin here is gonna be creating a mini to 1. Right? Because it'll be multiple team members associated to one agency. Correct. They will create that via a form, or it's not just, like, automatically So we've gotta create the relationship first, and then you can have it automatically populate the information Okay. When users get created. So from the agency partner's perspective, it's gonna be many to 1 because on the other side is the team member that's a one. Now wait. That's it. No. No. No. If you've got if you've got multiple people that are part of the same agency, it is a The agency to many because a user belongs to one agency. The agency could have many users. Gotcha. So here, you're gonna pick the one to one to many option. Okay. One to many. There you go. This is gonna be the admin is the one that's filling this out. So they're gonna be building they're gonna invite team members. User. You're gonna call it user. Yeah. Or servers. Users, plural. There you go. Users. Alright. The related collection is going to be directus_users. That is a system collection. That's why it's prefixed with directus. Yeah. And then for the foreign key, that's gonna be the field that holds the agency partner ID inside the Directus users table or the directus users collection. So that would probably be agency partner or agency partner ID. Is that something that's built already? No. You don't have to build it, though. If you key it in and it doesn't exist, Directus will create it for you. No. Agency partner ID. There you go. Okay. Alright. Doesn't really matter if we show these in a list or a table. Solid. Do we wanna show a link to the user? Probably. Yeah. And we're gonna dismiss. Not sure why that error shows up. But now we have created a relationship. Right? And if you go back to the data model, open up the system fields. There you go. Fields. System collection. There you go. Click on direct as users. So these are the system collections. You can't update any of the, like, the default fields, but we should see at the very bottom of this, you should see an agency partner ID field. You might wanna unhide that just for fun. There you go. Alright. So we've got the relationship now. Now we can actually use that to restrict permissions. That make sense? Yep. Got it? Alright. So we're gonna go back to access control, and we'll we'll just do, like, the part agency partner admin for now because we that's the user that we've got. Alright. So down the bottom, you got scroll up to where you got the actual permissions. There you go. Alright. So agency partners, all these are gonna be custom permissions. Right? So change this from all to custom for read. Right? We only want them to be able to see their own agency. The admin? Right. K. So Alright. So for item permissions there oh, go back. So for here Yep. View. Go to use custom. Yeah. Alright. So for item permissions, we're gonna add a filter for this. Right? And the filter is gonna be the ID. So the agency partner ID, right, is equal to we're gonna use a little bit of Directus magic here. You're gonna type in dollar sign, all caps, current_user. So that's gonna give us the current user that's logged in. Right? We can use the related fields that are attached to that user in our filter here. So we're gonna do current underscore user dot agency underscore, you gotta get now we're going back all lowercase. There you go. Partner underscore underscore ID. Right? That's the field that we set up on that particular on the direct us users collection. So now what we've just said is basically, hey. I can only read the agency partner's collection, like, the items within that collection that that equal this rule, which is only gonna be 1. Right? Okay. Makes sense? Now what you're gonna do, click, click the drop down. Well, hover over rule or just the actual heading. Let me give you a shortcut. Yeah. Or it it says rule right up above that. Click that. Click copy raw value. Mhmm. Save this. And then go to the edit permissions for that agency partners Mhmm. And click use custom, and paste that there for the item permissions here. Say okay. So now we can only see our own agencies that we're a part of. We can only edit our own agency. Now we have to go through and do something similar for projects. Right? Because I I shouldn't be able to edit some other agency's project. Right. So I can create projects. When when I go to custom here and instead of there's no item permissions for creating an item because there's we're creating an item. The item doesn't exist yet. We can't filter by it. But what we're gonna do for the presets, in this case, we're gonna give it a preset. And the preset we're gonna do here, you're gonna do, the mustache brackets so we get some JSON. Okay. And within that, you're gonna create a new field. There you go. What do we hit enter. Mhmm. And what are we gonna do here? Agency okay. So the if we're in the project trying to think of the field. What did we call the field relating back? Partner. Okay. So you're gonna put partner in quotation marks. K. Colon. There you go. Colon. Quotation mark. 2 left mustache brackets, dollar sign current, Whoop. That's a hash. Current. Underscore user dot what? Agency underscore partner underscore ID. And then you're gonna close that mustache syntax and hit the quotation mark. Alright. So what that's gonna do, whenever this user within this role creates a new project, it's gonna default the partner value to that specific field or to the agency partner ID that's attached to that user. So whenever they create a project, it's always gonna be scoped to that specific agency. Gotcha. Okay. That makes sense. Cool. So now you hit save. Should I oh, no. Because this is on creation. So Yep. And then so within that go back down. And then we're gonna apply custom permissions for the other items here. Right? Mhmm. So the rule here is not gonna be ID because now we're inside the project. Right? We're not inside the partner anymore. So it's gonna be the partner dot ID. So there you go. Expand that. Partner dot ID. Yeah. But it's gonna be the same value. Dollar sign current underscore user dot agency_partner.i oh, not dotid_id. Yeah. You got it right. Alright. And now you can copy that, and you can apply it to all the other ones. This is something that's so for as I paste this, that, like, custom type of filter and and building the presets and things like that. Like, that's that's high level stuff. Like, like, the doc, would the docs be the best place to learn things like that, for somebody Yeah. There's a good primer on the on roles and permissions within docs. So hover over role. There you go. Paste. But the the docs are certainly good. There's a couple of great guides on it as well. But all those variables that are available are documented there. Right? Yeah. And they should only be able to share their own things. There you go. Now Alright. So files or So for project files, that's a junction collection. We could go in and, like, scope that as well. It probably not necessary for for this episode. No. We can do that. Because, basically, what that project files collection is is just a, like, a pointer to a direct to file and a pointer to a project. There's nothing else that's being stored in there. Okay. Now the other thing that we're probably gonna want to adjust, and there's there's a couple ways we could get this done, is the file access. Right? We don't want them to be able to access all of our files. Mhmm. We don't want them to be able to delete our files. You know, we probably trying to think of the best way to scope this where you get tied to a specific user who has the same partner. Like, I could see only the files that we've uploaded into the system. So the Does that make sense? You're thinking of doing it tied to the main admin user, or would it be like a So each each user who is logged in is gonna have like, if they're part of this agency partner program, they're gonna have to be tied to a specific agency. Right? We should be able to go through that relationship and just show all of the files that were uploaded by members of that agency. I'm thinking we should be able to do that. This gets a little deeper into, like, the nesting, but, a couple things that I would do here. Right? Like, the the other option is to do something like a folder or, you know, add we could go in and modify the Directus files collection to have a relationship to the actual agency. And then whenever a file gets created, we add the agency relationship to that specific file. So there's multiple ways we could achieve it. I'm trying to think of the the easiest one to do for for this one. Here's a question. Should we make a part 3 where we focus on kind of the system collections and how they interact with, like, the role based access control stuff. Where are we at time wise? We're coming up on about an hour. So may I mean, that seems like a good part through to me, because it sounds like it's gonna be a little bit more in the weeds on kind of structuring this out on the more of the back less of the partner directory itself, so more of, like, how Directus interacts with specific roles and and things like that. So, if you think it's quick fix, quick solution, I'm up for it. But Hey. Let's log in and test this out. Hey. Let's test what we've got so far Alright. And see see how that's working. Right? So at at this point, like, actually, do one more thing for me. Go to the system collections, and we wanna restrict access to the insights. Right? So if you go into Directus dashboards Directus dashboards here. Just set that to none. So there's a shortcut over there. Right? Go to Directus panels. Panels. Set that to none. Mhmm. There you go. Alright. So that should limit any of the actual folks from seeing any of the inside spales. Great. Okay. Oh, and then the other thing that we wanna do here, where this is the agency partner role, So where it says direct as roles Mhmm. We let's change that. So add a custom permission for that. For which one? For the the read. Read. Use custom. Alright. So for the role here, we want to, what roles do we wanna see? The roles of the item yeah. So there's a oh, okay. I think it's actually already set in it. ID equals current rule. Follow automatically applied when okay. So I think that should be good then. Okay. So they'll only be able to see because we should they should only be able to see in the in the admin of, like, users. It should just be their agency users. Yeah. Right. No. So what we need to do there is we just need to add a condition to the direct as users collection instead of the role. So go ahead and close this. Scroll down to direct as users, and the read there is the one that we're gonna update. Okay. Alright. So the yeah. It's gonna be the agency partner. You should be able to search for it. Agency partner ID. Yep. There you go. Equals current, dollar sign. Right? Current underscore user. Yeah. Dot agency_partner.id. Great. Alright. So now let's log in. We'll worry about files later. We're gonna open up that other browser, whatever you had. Now hit refresh. And any other agency projects or partners. And you shouldn't be able to see any projects either because we don't have any Yeah. Yeah. We don't have any projects, but as far as the user directory, I shouldn't see any other users either. I see myself. Yeah. And and, again, like, we could go in and restrict that list of roles, I guess. You know, not particularly sensitive, but, you know, we could restrict that to just the agency partner roles if we wanted to. You know, files, they're still gonna be able to see all files. But what I'm gonna do behind the scenes here, we don't have this relationship between your fake user and the project or the agency. Right? So that's why you're not seeing any projects. Maybe you wanna pull the admin back up. That way we could just show everybody, I guess. Mhmm. Alright. So go to your user's directory. Here. In the the module bar. So, like, the actual user's directory. There you go. Alright. Find your fake person. And I don't want any scrubs on my team, so it could be in your agency. Don't want no scrubs. Agency So the agency partner ID, yeah, you could put them in your agency, and hit save. So now you've added that user to that agency, and that user has the appropriate role. They've got a partner ID that's linked. If you log in as that user now, if you switch back to that incognito window and hit refresh Mhmm. We should see, like, on the agency partner side of it, should see your agency. And, like, if you click into it, should have the ability to edit that as well. Wonderful. It's just okay. Yeah. Just okay. Oh, cool. So, and then here we could instead of, you know, a table layout, I could do map. And wherever the country is, maybe that shows up here. Very cool. There you go. So now within that, right, we could go in and like, you could go in and flesh out all of your projects if you wanted to. Yeah. And then they would all automatically be associated just with that single agency because that's what the person's Correct. Fantastic. Yeah. So as far as, like, the the next steps, right, would be a figure out I I I at this point, I don't think we fully understand how we wanna scope, like, the file library because, yeah, I would think that it it would be helpful for agency partners to have access to, like, all the brand assets. Right. Right? There's there's certain internal files we wanna give them access to, but, you know, there's probably some private things that we wouldn't want them to have access to. So it it would make sense to do it on a combination of maybe, like, folder structure and files that they've uploaded as well. Like, any of the files that we've uploaded, they can't change. They could read those files. They could download them. They can't delete or edit. But files that they've uploaded, you know, maybe they've got the ability to edit or replace those. That's a great point. That brand kit. Alright. Awesome. Well, episode 2, part 2. I feel like we've covered a lot of good ground here. Part 1, we got the actual data model set up. Part 2, we got the roles and access. Next part, part 3, we'll talk about how to share specific internal assets, how they can upload assets, and only access the things that they need within a direct instance test.","704ea83d-44e6-4b22-993a-22108f6f6d96",[182,183],"1c46a971-8c5a-4921-9061-3e4eb9c7d7d1","f37a8ab8-6b45-4e08-b0de-b9e5c3be37f9",[],{"reps":186},[187,243],{"name":188,"sdr":8,"link":189,"countries":190,"states":192},"John Daniels","https://meet.directus.io/meetings/john2144/john-contact-form-meeting",[191],"United States",[193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242],"Michigan","Indiana","Ohio","West Virginia","Kentucky","Virginia","Tennessee","North Carolina","South Carolina","Georgia","Florida","Alabama","Mississippi","New York","MI","IN","OH","WV","KY","VA","TN","NC","SC","GA","FL","AL","MS","NY","Connecticut","CT","Delaware","DE","Maine","ME","Maryland","MD","Massachusetts","MA","New Hampshire","NH","New Jersey","NJ","Pennsylvania","PA","Rhode Island","RI","Vermont","VT","Washington DC","DC",{"name":244,"link":245,"countries":246},"Michelle Riber","https://meetings.hubspot.com/mriber",[247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,224,435,436],"Albania","ALB","Algeria","DZA","Andorra","AND","Angola","AGO","Austria","AUT","Belgium","BEL","Benin","BEN","Bosnia and Herzegovina","BIH","Botswana","BWA","Bulgaria","BGR","Burkina Faso","BFA","Burundi","BDI","Cameroon","CMR","Cape Verde","CPV","Central African Republic","CAF","Chad","TCD","Comoros","COM","Côte d'Ivoire","CIV","Croatia","HRV","Czech Republic","CZE","Democratic Republic of Congo","COD","Denmark","DNK","Djibouti","DJI","Egypt","EGY","Equatorial Guinea","GNQ","Eritrea","ERI","Estonia","EST","Eswatini","SWZ","Ethiopia","ETH","Finland","FIN","France","FRA","Gabon","GAB","Gambia","GMB","Ghana","GHA","Greece","GRC","Guinea","GIN","Guinea-Bissau","GNB","Hungary","HUN","Iceland","ISL","Ireland","IRL","Italy","ITA","Kenya","KEN","Latvia","LVA","Lesotho","LSO","Liberia","LBR","Libya","LBY","Liechtenstein","LIE","Lithuania","LTU","Luxembourg","LUX","Madagascar","MDG","Malawi","MWI","Mali","MLI","Malta","MLT","Mauritania","MRT","Mauritius","MUS","Moldova","MDA","Monaco","MCO","Montenegro","MNE","Morocco","MAR","Mozambique","MOZ","Namibia","NAM","Niger","NER","Nigeria","NGA","North Macedonia","MKD","Norway","NOR","Poland","POL","Portugal","PRT","Republic of Congo","COG","Romania","ROU","Rwanda","RWA","San Marino","SMR","São Tomé and Príncipe","STP","Senegal","SEN","Serbia","SRB","Seychelles","SYC","Sierra Leone","SLE","Slovakia","SVK","Slovenia","SVN","Somalia","SOM","South Africa","ZAF","South Sudan","SSD","Spain","ESP","Sudan","SDN","Sweden","SWE","Tanzania","TZA","Togo","TGO","Tunisia","TUN","Uganda","UGA","United Kingdom","GBR","Vatican City","VAT","Zambia","ZMB","Zimbabwe","ZWE","UK","Germany","Netherlands","Switzerland","CH","NL",1773850423676]