Stream 5: Giving You the Ability to Create DrAlexWibberley Scripts
Okay, now I'm live. Wait, have I been live for a while? Trying to look at here. Okay, either I have Yeah. 5 seconds delay. That's okay. Okay. So, last time one of my other friends said that uh the stream they really liked the the planning part of the stream whereas my coder friend obviously said he didn't he didn't love that.
That was too boring. Uh I'm going to try to strike a balance. I'm going to try to do add more planning but still keep it interesting at the later part. So, I'm going to do uh things more quickly. Uh, it looks like my audio is not bad, but let me know if you hear a fan or anything. Okay. Right. So, I've got everything closed.
What's the goal of this stream? Let's try to open that. I'm just going to hide that for a sec just in case my screen shows anything I don't want you to see. I got to keep some surprises. Got to have a little mystery, you know. All right. So this is uh these are the stream plans we've had previously. I think this is Yeah.
Okay. So that's stream three. That's stream four. So we've already done that one. We still never got to do the the script listening. I feel like that's a thing I'm going to keep punting off. Excuse me for a bit. But uh in Streamlab, we want to be we want to give other people the ability to use this uh the system that we've created so far.
And so the goals are, you know, to make it Yeah. make it so that anybody can just submit a title for a a video, a YouTube video script and get a the script basically in the Dr. Alex style fully done by AI. So that's the end goal, right? But we to like there are some things we need to we need to do to be able to get to that point.
We have to basically have to protect that endpoint so that it doesn't get spammed and just like denial of wallet me. Uh that's just like when you open up an endpoint but then somebody spams it and cost you a lot of money because AI costs money. Okay. So we're going to So those are So to do that I'm probably going to have a login I guess and then be the third one is you know even if you have it protected you might want to protect it from from bots.
Uh from my understanding Cloudflare is the best at doing that. So that's going to be an easy choice. Maybe maybe AWS has some tools, but Cloudflare we're not really tied to AWS for any reason. So we could use Cloudflare. If we could use Cloudflare, might as well do that. Okay. So let's do the decisions first.
So the final decision we have to make here is allow uh users Yeah. to get script using title. Okay. And then the one I talked about is protect script generator with login and we also want to protect script generator. U well here I'll say login and then we'll do the cloudflare one if we have time. It's better to have you know both protections but obviously it costs time.
If it does become a problem, then I can get to it. But otherwise, this is something I can, you know, tick tech depth in the meantime. I'm so glad I said debt, right? I usually say depth. Just I don't know. I feel like if I say debt, it doesn't sound right. Sounds like I'm trying to say death or something, but I have a lisp.
I guess that would be death. I don't know. How would Mike D say it? Okay. All right. All right. So, we Oh, god. Delete. Uh, delete one of the important ones. Ah, whatever. Okay. So, this is the one. Did I ever even change it? When did I Okay, we got claw flare. There we go. Okay, cloud flare title. All right, so those are the three things.
Maybe I added there right for a second, but you know, long day. My brain is a bit burnt, but we can do this. Yeah, we can. All right, number five. Let's go. Oh, we've got somebody here. Hey yo, say something in the chat. All right, I'm sketching you out. I'll um today I'm going to make it easy to for anybody to use the Alex overly script generator.
All right, I haven't filled out the options yet. So, let's do that. The option one is just like have a you know form autogenerated. Uh we'll say that's option one and so autogenerated is like no Q just like as soon as a user submits it it creates it. Uh this is, you know, it's great for if users are, you know, they're willing to wait for the script to get generated, but some cases the script may take a minute.
And if you have a network connection error, then that's a problem. So I'm going to Oh god, I'm so thirsty. I got the furnichch today. Whatever she had other day. All right. So, I'll say that's called synchronous. I'm just going to write that down for the technical people. All right. And then immediate.
Yeah. And then the option two is like uh form Q asynchronous. So those are basically just the two options but you can have you know it's worthwhile noting the nuance within asynchronous. So I'll say asynchronous v v1 version one and then we'll copy that and then I guess in all the cases we're going to have forms.
I'm not maybe I should just remove it but whatever. uh like formal Q right and then here we can have an abstract Q and that just to say that we can just put it in a database and then cue it ourselves uh or consume it or you know have the consumer get it from the database DB insertion and DQ Okay, I'm actually leading towards this one. So, I'm just going to put that there.
Okay. And then the uh I can explain the reason as I as we do it, but for now, I'll just say that that's the one I want to do. Um, here really are options. We're like, I'll just say cloud. We'll just say clouds, right? And option one is cloud flare. And that's the one we want to do. So, I'll just put it in the green one.
Save me some coloring. And then the option one would have been to like use something like AWS. Uh I forget the name but like they have they have a anti-bot system. I'll just say antibbot system not sponsored by AWS. Okay. And then with login with login we have so many options. The first option is like you know you could like fully generate the login vertically.
Uh so vertical username and password you know just go crazy. And then another option is um you can go uh use a third party. So third third party login like like Facebook, Google, etc. Um and we can even have like a another layer on top of it. So we can it's also a third party. Um but third party with abstraction and so these like don't you don't even have to go through Facebook or Google you can just use whatever cloud provider you have.
So if you're for using loable or superbase then we can do that. I'm not sure if lovable does provide anything. I think superbase does but we'll have to look into that when we get there. Uh, let's Yeah, I want to hold off this. I want to go with this decision, but like let's see how much time it takes.
If it takes too much time, then I'm not going to do it. I might just go with this one, right? It's just so easy. Or takes so little time. You know, and that's like an important decision, right? You don't want to do things in a rush, obviously all the time, but if you don't know how many people are going to use it and the scalability requirements basically, you can just do whatever it takes and then make the investment later when you find out that it actually needs uh that scale, right?
You don't need a Ferrari to just, you know, cross the house. Okay. So, stream five, that's where we're uh these are the three decisions we're going to make. This is the most important thing. Just having a a system that'll allow you to like insert in the database so you can submit it and then it'll make the queue or make the script.
because we want to base things around this. Oh, sorry. I'm so thirsty. I'm looking back at the stream and it looks like it looks like I'm taking 10 seconds to drink something. All right. Oh, hey, Fern. I thought she was going to come. Oh, well. Okay, so because we this is the end goal and we know we're going to have to add login, we might as well add the login first so that our coding agents know how what to add later.
Okay, so let's do that. First things I want to know if it's like lovable login add users. No, that's not what I meant. Okay. Uh add authentication. Let's say excuse me. This is a carbonated water. Okay. Superbase. Okay. So, it uses us superbase. So, that's great. Uh, okay. So, Google authentication. Let's see how it does that.
Google or own Google Cloud credentials allow it. What do we actually need? like is instead of going to be troublesome. Oh wow. You can do you can do manage by global. It's interesting. Simplest setups. You don't want to configure Google cloud. You do not need ownership of the all credentials. I mean we don't need that.
Do not need user manage blah blah consent screen. Sh the first time user signs in. All right. Application name. I think this will look nice and it's minimal setup for us. So we can get it done within the stream. So that's what we're probably going to do. Users are asked to approve access once. Okay. Add Google login.
So this is a good one to add. I bet Lovable also has the ability to add like a passwordbased login really easily. I'm just going to look that up again. So lovable add authentication passwordbased uh to add password authentication superbase cloud create a signup page. Oh, okay. That'll do it. I wonder if it'll try to like create the password itself.
That would be nuts. I don't want to do that. Okay. Okay. So, Superbase has a providers page. Superbase looks pretty safe to show you guys. So, I'm just going to go there. Okay. So, authentication. So, we got authentication here. How easy is it to add one? Oh, I bet I bet we can just like Yeah, I bet we can just say use the name password.
Oh, now I accidentally did that. Two windows here now. The same thing. I'm going to refresh because I don't know what the hell I just did here. This is a Google feature. Never had that happen. Oh, there we go. Oh yeah, this is a Google feature and now all this I don't even know how I opened that but I got to figure that out later.
Okay, so off servers sessions let's look. Okay, so we can create users uh we can create users through this. Sure. Okay, let me try configure it. Uh, guess I don't need that. All right, we'll figure out we'll just initially we'll just ask Lovable to just build it with like a username password and then if we have time to do other ones and we'll just do that.
I'm just going to write that down so that we we don't lose track of it. Okay. Uh so we'll we'll try first. Yeah. First username, password, maybe Google if time permits. All right. Now let's ask Lable to do this. I want you. Okay. We know. We're creating a a base authentication um system to be used on both the front end and back And we're going to add a back in later.
Our rules. It needs to be compatible with superbase authentication. I the tokens will be easily translatable to a user ID in database two and then create your task is to wait. Your task is to create a base to be used. All right. So that's how I want to write it. Uh it needs to only have password login now but we but extensible so that later we can add Google other other off systems.
Okay. Do not we do not want it to be overengineered. So do not add any O. Actually I don't think we need to constrain lovable as much. Uh I think their agent is pretty constrained. So that's pretty good. Okay. Uh we need a login page that is accessible by a new uh sorry a log in button at the top right within the header.
Uh logged in users should have their name and a log out in the same place. All right. So, let's do that. Have their email actually. Do we need any access right now for the users? Not really. Okay. Do not current do not limit authentication right now. ization within the app yet. What else? Oh, we need to have obviously a create username page.
Okay. Okay. Actually, we'll just do one at a time. We need a sign up and we need a login page. We need to sign a page that is accessible by register button at the top right. Okay, we need a a login page that is accessible uh by a login link at the bottom. Sorry. Within the register page or in the footer and in the website footer.
All right. This should only actually No, let's not limit that because we need login, registration, log out. Yeah. What else do we need? All right, this is pretty good. Once you create a user, no, I don't think we need anything else once you create a user. So, let's have it build that. Oh, okay. Let's discuss.
There we go. Oh god, I thought I lost that prompt. Spent like an hour writing it. Okay, I'm gonna I'm gonna go refill my water. I'll be right back. I was going to watch it work. I hope it doesn't expose anything. some drinks. Okay, so it's just been creating a basically authentication so users login registration etc.
so that users can log in. Press script. I want to read this. All right. So, let's read this plan. My audio by the way. Is it going good? Okay, it's going in. Wait. Oh, maybe that could be better directed test. Okay, that's better. All right. Yeah, that's right. This is going to do it's going to create an off context.
Doesn't really give me options here. It's just telling me what it's going to do. Feel like lovable could do a better job with this plan or this plan interface. It's obviously nothing like anti-gravity. It's way better. All right, so create Create a React context and get session user wrap. Okay. Register page update navbar.
Okay. Yeah. No profiles table needed. Yeah, we don't need profiles. We just need the users. That's great. Yes, nor changes. Do appreciate that. So, nor level security. Uh, we can do that. We can do that later. And we can just add all later like that. Okay, that's great. Good plan. I mean, I guess the point of the plan is that you can tell it not to do whatever is just saying.
So, you can't really just give it specific feedback. I don't think I'm not really sure. I've never tried double bolts plan interface. Hey, it's got a to-do list. That's pretty cool. That's pretty cool. Actually, it looks like it's taking good a good while. So, I think that's this. This is the repo. So, let's just open that one.
Is it done? Yeah. pull it at the right time. Okay, great. Let's see what it did. It's the registration page. Then once you got all that stuff, you sign up interface. Is that going through? Where's going getting that? Okay. Use off from the context. Okay. Can we trace that? I think the way he's putting the impulse is not great for my environment.
I feel like they're Nah, they can't be intentional about that. Okay. Don't want to be too paranoid here. So sign up. Yeah, use superbase o sign up password and then tell you where to redirect. Okay, that'll keep us logged in. So that's good. So that's registration looks like sign in follows similar pattern.
We saw the sign in function when we were looking at uh the uh the super base code which is where is the zupa base code? Oh did it what is that? Oh, are these individual commits that we can see? That's pretty cool. But it just says changes. That's pretty interesting though. That's ideal. It's more It really is more like what you're supposed to do as an engineer.
It's pretty close to making it, you know, readable enough. Oh, I'm just drinking my thing. Does not look good on the stream. Here, let me open it up. Okay, now it's easier. See? Okay. So, save the plan. Was that all in one? Let's here. Bunlock. That was a while ago. April 8th changes. Yeah, that's not great.
So we added them. Oh, this is giving us the full delta because it's telling us about the addition. All right. I don't know why this is this interface is confusing me. Just I usually don't review things like that or in this in this way to be specific on off state change. Yeah. So that's when you refresh the page, you want to be able to make sure that the user's session is properly maintained or removed.
Oh yeah, you got that logout button for the users who are logged in and registration otherwise. And then in the app, we've got the new routes. Okay, great. So, now that it's all pulled, I guess I can run it here. Oh, sorry. Force of habit. Okay, ready? Oh, it's 8080. It's also weird. We can both see the login and registration.
I guess that's not a problem. That's not what I asked for. Yeah. Did I tell it to use a register versus sign up? Whatever. I actually like register. Keep it register. Is that enough information? I feel like we need more than this. I think we need the first name, the last name. Uh, and it's also not a great interface.
I might improve this off stream. Wait a minute. Okay. Uh yeah, we need first name, last name, email, and optionally a number. Okay. Might have to add a a profiles table after all. Hey, we'll do that. Sure. Uh gosh, it's not suggesting a password. Give it a All right. Leave it a shitty password. Yes, I'm not punished for that.
Yeah. Uh okay. Hold on. I gotta make sure I don't see you don't see my passwords. Oh no, it's gone. Wait a minute. No, it didn't show it. Okay, I guess I got to verify my account. That's pretty good. It built that out. We'll confirm. Wait, what happens if I don't confirm? Let's try Oh, email. Oh, that's great.
Okay, let's go confirm it. Oh, I know automatically logged this in and the right domain, too. But I guess it knows we logged in on local host. Yeah, it says redirect to local host 8080 at the end. This is what it looks like now that we're logged in. That was not a bad flow. We do need more information.
Uh so let's try that now. Login. Yeah. I think that's the login page. Yeah. So I already checked everything. Okay, great. Now I'm going to tell Love Bull to uh add a thingy. Let's make this prompt just like the one previous and we don't need to modify the plan. I think we're like pretty clear here. Your task is to blah blah blah.
Yeah, it responds really well to that. Oh, excuse me. Gosh, I'm burpy today. We're running out of time. All right. Your task is to be able to sign up. Oh, okay. Okay. Okay. So, previously we prevented it from profiles table your uh your to allow users to input uh to sorry to require users to input first name and last name.
require registration to input first name, last name, and optionally number. Okay. Needs to be a nice user experience like type form. It needs to be a nice user experience like type form where input is shown one at a time. Users The order needs to be uh email, password, first name, last name, phone number, Indicate the phone number is optional and allow user to submit without it.
Allow users to press next to navigate. Okay. uh to go through the fields. Uh users to click on a on a next button except the last submit button. Navigate next field. Yeah. Use a nice animation between each field. Yes. This information needs to be definitely linked to each user and only accessible by the user.
Create uh read, update, delete. Okay. I want to see this plan. I feel like it's going to want to use a profiles table, which is fine. That's usually the best way to do it, but I want to see you can come up with it or if it has a better idea. I'm hydrating well today, though. Thank you for keeping me accountable.
All right. Whoa. It's almost the plan. It's like we can read it as it's being made. Yeah, that was pretty good. Redesign. Yeah. Smooth animations. New profile. Yeah. Yep. Exactly. Okay. So, create a profile table. First name, phone number. Yeah. It doesn't say not null. So it's optional. Obviously low level security for the read update delete.
Users can insert obviously users can insert their own profile but like how are you going to check that? Like what other profile you going to enter? All right. Uh, it's keeping an updated out of field. Yeah, it's conventional. It's normal. We'll do. I think that's fine. Whatever. I don't really care about that right now.
I don't really want a step indicator. Okay. Um don't proceed except with Okay. Don't use a step indicator or progress bar. Okay. So, it's only going to create the profile if sign up via base works. Okay. Proceed. But don't use a Oh, wait. I gota I gotta have it modify the plan. Oh, no. Wait. You could still use a plan.
Let's try this. Oh, no. It's just this process. I didn't say proceed. I'm rad. Okay. We might use all our lovable credits today which is okay. I don't think I'm When did I get this? I don't know how much time I have on this settings messages. We know cloud balance plan and credits may be in there here.
I'm just going to look in there. Sounds like it might be sketchy. Okay, so we're only 12 days in. We got a lot considering we don't really use it that often. Okay, it's interesting. It seems like it took two years for AI agents to be like have these concepts of like tools be standardized tools, plans, to-do lists, the same tools, the same concepts that humans have.
Yeah. I mean, it just makes sense for maintainability and explanability. So these are the details. I read it. I implemented it. Okay. What am I previewing? Okay. Guess I get to try here. Yeah. Okay. Oh, I didn't confirm password. That's kind of annoying. Eh, whatever. Ah, I'll use my stage name or nickname.
All right. I feel like it's gonna say no because Oh, yeah. I want to skip this. This is optional. I can just create account. Okay, great. Sure. Oh, that's weird. This is letting me do it even though I've already logged in or even though I've already done this. Did I get an email for this? I didn't. Yeah, because I already did this.
What? I have to delete it probably. But that was nice, you know, nice flow, but we can't really trust it because because I already have the accounts. So, I'm going to delete it and then try it again locally. We just get the repo with the git pull. I want to delete it. Okay, this is the user. If I delete it, hopefully it'll delete everything.
Yeah. Yeah. Like I I want to be able to remove the profile as well. Did it remove the profile? Oh, wait. Got a little schemaizer. Do I like that? Yeah. So, profile refers to the user's ID. So, if the user's ID gets deleted, then presumably the user will get deleted. The profile gets deleted. I want to be able to actually look through the table.
Come on. Oh, table editor. Just got to be here. The scripts profiles are deleted. Okay, let's try that now again. Okay, I'm g have to might have to remove that. Yeah, that's not fun. Create account. Okay, so now we got it and you can see the profiles been created. Refresh. That's created to be bamboozled.
Oh no. Or could it all be getting saved elsewhere? I don't know. Thought it' be here. Because once you get all that information here, I got to look at the actual registration page. Handle submit. Okay. So, we insert. Do we not get a user ID? Because if we didn't, then we get an error. I don't think we got an error.
So, it should have been right. I'm going to delete it and then we'll try that again. But I'm not going to do it locally actually. Okay, I want to add some logging first. Console warn. This is the style that I prefer. Handle submit error. Yep. Okay. Console warn. Yep. Yep. Okay, just adding a bunch of logs.
Hopefully she tells us if there is a problem, which it looks like there might be log potential issue. Get that to the cloud. Delete that user. Delete him again. Yeah, I don't think we'll have time for Google off. Read this is going. All right. We said we'd try it on the thing. So, I'm gonna try it on the thing here.
Preview. Okay. So, this is the latest one. Log fail because Yeah. All right, we're almost there. Oh, email rate late limit exceeded. I'm getting throttled. I gota try another email. Okay, I'll uh I use my I'll use my real email. So, I'm just going to hide the screen here a little bit so I can use my real ML and then I'll delete it.
Then I can show you guys Hey, cached all this information. That's pretty good. It's saying email rate limit exceeded also with this email. Let's see. Super base rate limit exceeded. Oh, it's because uh it's cuz Yeah. Okay. So, this is a real thing. It's not based on my email. It's based on uh it's based on the provider because you have to email the user to tell them um hey, you uh signed up kind of thing.
So, what are we going to do? See per hour is not great. Oh, maybe super base lands. Does that say three per hour? Says 550,000 multi-active users. Maybe it's because of the email authentication. I think we can ask the AI assistant. Oh, use can use nano. Why getting a All right. That's not the one I want.
Let's see if we can just turn off emailification. Save some time here. Okay. So, let's go to the dashboard authentication providers. I'll figure this out later, but we don't have time to do this on stream. Come on. Don't tell me I lost that. Okay. Yeah. Okay. So, get the email and then we'll open it.
Got that, but it's the verification one that's kind of annoying us. So, where is that? It doesn't seem to be Oh, here. Okay, cool. Let's see if that fixes it. Oh, still says they sent an email. Uh, I'll fix this before uh eventually so that this is true. I'll put this in my to-do list. All right. So, we got a user ID and you can see it.
We should have a table now or a record in the profiles table. There we go. Okay. So, this is the problem that we wanted to fix. We've got that fixed. I just have to do this one. Uh, where should I put my list of things to do? Here, I can put it here. To-do items to do MD F superbase email confirmation.
Yeah, so I could do that later. Okay, cool. And now we've got registration. It works. We're logged in. That's our email. That's what we said we wanted to do the stream. Got that. Okay. DB insertion DQ. dropped the mic there. Okay. So, what we want to do with DB insertion DQ I was thinking basically we just have instead of using a a normal Q which you do usually use to handle um a lot of stuff.
We'll just insert things in the database and then just take it from there. We're not going to have a first in first out order, but the app is going to be simpler because we're going to be using more of the same units. It's just not expectable, but that's fine because I'm the only one encoding it and I can monitor it as or document it as tech debt.
So, I'm just going to do that. Okay. Uh, so I want Yeah, I want it. Okay. Let's add Okay, your task. Let's get that. Let's get that prompt going. These verbose prompts is to require. Okay, here we want to to allow logged in users to create records in a new table that we're using as a to-do Q. Yeah, we're using as a queue.
Okay, we're just going to have this as a set of rules. Okay. So when a when a record is created, okay, when a record is created, an event is emitted so that a consumer has superbase. Superbase edge function can consume the record. Okay. Yeah. Each record or row should have a a title string and a reference to the user that submitted it.
Is there anything else? No, but hopefully it'll know to create the uh create it at and update it at time. Actually, we don't need updated updated at time. Okay. Consume. Yeah. Consume the record and create a Yeah. You add Yeah. Add a dummy create script function for now. Create this. You create the script.
Consumes the record. Creates the script and then inserts it into scripts. Forget what script derivations is. Oh, it's the the match the man to table we created last time. Doesn't matter. All right. to bless me. Excuse me. F create script. Yeah. If something is successfully inserted into the scripts table, remove it from the Yeah, from the new table.
I don't know what to call this table. It's probably fine. Let's see if it has anything else in it. And I should wait for it. Pretty happy we got the AC fixed. It's 69 Fahrenheit right now, so I could wear this in the summer. Oh, I thought I was going to have to wear a tank top or something. It's off brand.
Okay, looks like it's almost done here PGE or superb base database web hook. I think I'll I just want to use a superb base native right now. Process Qsert record. Yeah. Uh text. Yep. Yep. Created a insert their own records. Yeah. Obviously select their own rows. Sure. You want to make that possible. I create a trigger on script Q.
But since we want it codified, we'll use PG. I was just thinking here Oh yeah, it's actually creating UI for this user interface. Sorry I went dark. I'm just like reading this plan. God, running out of time here. Kind of want to be over with this at 900 PM. All right. Add route and nav link for submission page.
I just have something a nine. All right. Uh technical details. It's going to use Postgress networking. That's fine. Simple form. I think this is the the least expected submission page. Uh toast on success error. So last time I think we just asked to make the change. We took the plan. Uh so uh do the plan except for the submit script UI make it accessible right over Um, if I if we put it here, then it's going to look like a search.
No, I put it here. If it looks looks like a search. If we put it there. Where should I put it? I think we could do We could do it here. Okay. In the banner below. Put it in the banner below. Uh with placeholder text. Create insert title title for new AI script. And then on the right uh within the input.
Right? Aligned, nicely styled. animate the button when clicked. It'll be it'll conform the rounding of the input field. It should Yeah. All right. Got that plant fired up. Now we can go get some more liquids in us. I'm sorry. I don't know if you can hear me. You'll watch I should didn't get more liquids, but I figured it would be done by now.
I've been just have to get a really long bathroom break. All right. Um, create a script. Q. Yep. Oh, it needs my approval for the sequel. Well, I'm glad I came back. Let's look at the only logged in. Yep. Only users can view their own Q items. You don't need to. We're not going to create entries for that, but if you're a hacker, you can do that.
Okay. Users can create uh insert their own Q items. Yeah. Read. All right. So the PGET is to call that consumer. Um, you know, this is one of the problems with um using this architecture for the queue is that uh if this request fails and doesn't get retrieded, we've we've lost that message. So, I'll probably find a better way to do this.
I might actually use a regular key. I'm not sure what Superbase supports, but I figured it would be able to support this really easily. Um, and the nice part about having it in a database is that like um we're using less different types of parts, but also we can rely on the atomicity of the database.
Okay. Oh no. Okay. So, it's creating functions to call functions. I really don't want to do that. I don't want it to have, you know, database functions. They're just not really easy to maintain. Right. It's using PLP GSQL. This is not great. Right. Because if we change something, no, no, no. Okay. Okay.
So, we're here. Instead of Let me put this on. creating a function and passing the payload. Wait, very hard to maintain add rule. no DB functions. Um, what else can we do to call the planned edge function? I wonder if I can Is there a Oh, I could add knowledge. That's pretty good. I wonder if plan works for asking questions.
Okay. I definitely don't want to do that. Uh that's the whole reason why we have this table. Uh, super database. Superb base database web hooks fires and insert. Oh, it's configured via UI. That's even worse. And it's not version controlled. I to be honest wouldn't even consider Postgress functions version controlled.
Unless you have your own diff file because it just recreates the function every time. Uh in a migration I do not want to do that. I do not want to do any of these review. I do not want to do any of these. Let's double check that Superbase database web hooks are dashboard only. Superbase database web hook.
Um, version control because that could be hallucination. All right. SQL migrations. So, pretty much the same thing. Honestly, I guess it really is like a database base. I don't know any of these. Uh what other Q options? Okay, let's instead make a Postgress function that we never need to update. It should just call create script with no input.
um create script. Oh, just ID actually because we don't want to have multiple things consuming the same ID with the ID. also add this as a DP rule. as a sorry as a rule to your knowledge. I should have not put the question mark. I I think I was going to confuse it. Uh I'm confused about the knowledge.
That's nice. You can add custom instructions. All projects projects and then workspace. There we go. Apps scope target users. That's nice. I doubt it's going to add to the knowledge. Seems like overkill. Okay. to create set and then this is the function take this superbase URL call the create script function.
Okay. So, this that's better. Sorry, I was holding my breath. I am kind of curious. Did I Is that what I was doing the first time? It kind of looks similar. All right, we'll allow that and let it run and then we'll be back. Oh, I want to go fill up fluids. odds. Okay, it's messing up the configuration.
It should know the configuration better than I do because this is a lovable superb base integration. As long as we call the right database and we should be fine. We're not going to self host. Okay. It's getting really cold here. We got it at 69 degrees. We're just so excited we've got the uh air conditioner working again.
The other day we had it at 87. I think it was last night to be honest. Uh but they came in and fixed it today. So we're doing good. All right. Just created the edge function. Let's doing this. How are we doing for for thing? Oh, really? Didn't even use that many. I thought surely would have used a lot on the planning.
Something is a mess. Okay. That's pretty good. All right. So, add a table. Just a Q ID. Oh, did I say Q ID? Hopefully it means item ID. Okay. Uh, insert deletes hero banner input. Here we go. Oh, this is nice. This is nice. I'm logged in. Let's I kind of want to read this. So, but I was just saying that the input looks nice.
It doesn't look great that it's like it's kind of hard to see, but it looks nice to me. All right. Where do we look at all these changes changes? Changes. Changes. Oh wow. It just fixed the bug I guess in a separate commit. It's kind of nice that it's separated. What did have here? It's got some actual token.
Okay. I hope that's not important. I'm g try to remember this so I can blur it. It's 8:37. All right. So, this is the Yeah. Okay. So, all the changes that it made are in the index. Where is the UI? It should have created the UI somewhere. I can see the UI user interface. I feel like Okay. Well, these are all the delta changes.
This is the edge function that's creating the script. We're going to replace it uh with what we had from the previous streams. And then okay. Oh, the the main page is called index. That's why I'm confused. Okay. So, what we need to do is test this script cued It's all it's going to do. It'll appear shortly.
I wonder is it if it's using a web hook to receive these. Yeah, let's try 100. Yeah, 100 foods. No, that's too many. Let's try 100 food. No, it's not going to actually use the 100 foods that increase your blood pressure. Send it. Oh, okay. Great. What is it trying to do there? I swear it's surfacing.
Yeah, it's throwing is surfacing this error. So that's that's interesting. What's the error say? Uh I guess I gota set up got to set something up. So let's look in Superbase at the project. See if there's any errors here. Let's read the logs. Want to see all of them. Let's not that. Is it the API gateway?
We had the 404 here. So, that's a good sign. At least we're picking that up. Wonder if I can double click on it. It's not telling us what the the error was, what the response was. So, this is the metadata method. Maybe the API gateway doesn't see everything. Okay, post. Nothing there. Edge functions maybe.
No. So, I expected something here. Maybe there's just so much being logged. Okay. Yeah, we found it here. You might need to add explicit type casts. Let's see if L can handle this. Okay. Responded. Sorry. Let's look at the analytics for the latest video. Says it's doing well. So, we'll see. Okay. trigger cast by the text, but it's expected as JSON.
Okay, it doesn't it didn't really give me all the options. So, I guess it's pretty sure that this is the only reason or it's really bad. I don't have much experience in this side um of lovable or developments to be honest. I usually don't code directly in the database. So, we're just exploring it together.
Removes the text from the body. Yep. Yep. That's what you said. I just don't like this database function style. It is faster though. Yeah, this AI chat bots video is doing well. Last 60 minutes it got 15, no nine views. To be honest though, I don't know if people are enjoying it. I feel like it might not be my usual crowd.
That video, you either love it or you hate it. And I guess there enough people love it for YouTube to keep testing it. Okay. Through now passes. Yeah. Yeah. All right. I'll just call this because we don't really it's not actually going to generate a real one. Hey, cool. So, it says it's cued now. I don't know if I need to refresh to see it cuz it's supposed to just create a dummy and then return it.
Let's just refresh because that's the end point and if you don't see it then we can diagnose. I should just see 100 food or something. There we go. Okay. Nice. So, the problem why we didn't see it is because it's not a websocket, but that's not a huge issue. I can fix that later. What we want to do right now is attach the actual script generator that we had previously.
Okay, so let's do that. We can once we're done with that, then we can finish the stream. I think it was in this one. The stream. Okay. There you go. This thing. Oh, no. It's in Python. I forgot about that. Okay, so I don't know if I can deploy Python on Super Base. Let's ask Lovables. Or should we translate this all to JSON able to have uh create script?
Excuse me. I know I keep apologizing, but at the same time, I'm actually drinking all the stuff and he won't stop. Okay. So, we're looking for create script within the U create script edge function. create no load. Uh wait, call um a Python function that we also deploy with superbase. Can we deploy a Python edge function using superbase?
So I actually use this part mostly for the building. It looks like for the planning it doesn't use that much. So that's good. I guess this Okay, this is bad news. That would really make this long. Yeah, I believe that they work fine from Dino, but you know, it's going to take time to refactor it. Just didn't have this account.
Okay, a hybrid approach using the external content to push content and then have it just orchestrate the database, right? H but the whole point is of this. It's really interesting that they kept track of this, but anyways, the whole point of this is to have it automatically use the edge function. Uh, I guess we can just like not DQ it and then just have me review the titles and then create something and then maybe eventually automate it.
That's just a really slow experience. You know, it's nice to see it in real time. All right, let's see. Let's look at this. See if we can refactor it. I just don't want to have duplicates, you know? Should I just be writing in Dino all the time? I don't want to do that. What kind of life is that? Not a life I want to live.
Why? Oh, then I have to add all the keys. Yeah, it's gonna take a while. Here's what we're going to do. I only have seven minutes to wrap this up, so we'll say for now. I might change this soon. Uh but we'll make it so that this just creates the record doesn't dq it. We'll do the dqing and script creation on our end.
So we is a na mean ass and hopefully eventually I'll have time to refactor it. But for now I'll have to do this myself. It's just because I got like six minutes. All right. Okay. Let's instead just change the create script edge function to not I mean I guess do we even need the create script edge function?
Because as long as we have it in that table, we're fine because it'll get it. It'll generate something. Yeah. Okay. Let's instead Um, silence early return there with a comment that this is not active code. Turn off um actually. Yeah. After logging the request uh the Q ID. Yeah. I'm going to TQ generate script and remove.
Yeah, sorry. offline for now. Let's see the plan for this. We got three minutes. I got to go to bed. I want to start winding down. It's pretty good. All right, I'm have to delete this net 100 foods thing. It'll eventually make this user experience way better. Hey, you did it pretty quickly. What's it actually do here?
It's doing a lot of plan saving. Oh, okay. I see. But it's not like the whole plan. It's just like the current plan. Okay. Okay. So, we removed all this that we had. It's not an early return. It's actually It's actually still calling it. Yeah, it doesn't need to call base because it's not You can't request.
Sorry, my dog's just being a dog. Okay. So now if we say 99 foods, I expect this message is still there. It'll appear shortly. Hopefully I'll just fix this offline to be honest. But what happens? Well, if we yeah, if we refresh it should still say just 100 foods, not 99 foods because it doesn't create the script.
And if we actually look in here, uh, the edge function should lock the QD. So this was it. It's not very Yeah, I know. It doesn't say receive Q ID, does it? Is this the invocation name? Am I missing something here? Maybe the logging isn't working. That's okay. What matters, excuse you, Fern. All right.
What matters is that the scripts Q has the item. Yeah. And then we can just generate offline. I don't think we need anything else, right, for for creating these scripts because if we don't, then we should be able to wrap this up. Yeah. title maybe original script ID that was for us and transcript path the output and then we know we had a pipeline that would also push it.
That's right. So I wouldn't have been able to connect even the right the right one. It would have been a mess. Okay, great. Well, it's 91 and uh we have something good good enough. I think you can log in. Unfortunately, just takes a username and password right now. Uh we spend like an hour on that and then uh you can submit uh an item to be cute, but obviously lots of to-dos there.
It's just not finished. We did have a to-do for the uh authentication. Um, we added it here. No, I think it was there. Yeah. Yeah, I had to silence the email confirmation, so I'll have to put that back on. All right, that's it for today and broadcast.