YouTubevideo· Jul 21, 2025· 24:00

This tool cured my JavaScript fatigue

Watch on YouTube ↗

transcript

59 moments
  1. The first video that I put out onto my channel was this video of you should just choose Laravel. The thing that made me jump full send into the Laravel ecosystem is this batteries included piece where I didn't have to piece together uh an OM that I'm talking to a database with as well as some form of connector for dealing with files as well as something to manage authentication as well as pick and choose the particular framework pieces that usually you end up utilizing for 90% of applications.

  2. Usually I had to cobble that all together within the JavaScript ecosystem, but I think I found this tool that solves a lot of those gripes. And if you are still in the JavaScript ecosystem and maybe Laravel isn't something for you, or even if you're just looking to expand your tool set and look at what NodeJS and what the JavaScript ecosystem as a whole has to offer. Now, take a look at this.

  3. All right. and send. Perfect. All right, user number six just signed up. Hey Siri, you set a timer for 10 minutes. We need to get this drip campaign out the door for new sign up.

  4. Hey, what are you doing? Who else is going to send these emails? Every single minute, I need to watch to make sure my users are signed up so that I can get them emails as promptly as possible. So, I got timers. I just use Bento. They have workflows and triggers specifically meant for those kind of automations.

  5. Yeah, that sounds better. Seriously, Bento is fantastic even if you only use a small part of it like I do. My favorite feature, being able to automate my email flows, saying once something happens in my code, and of course there's SDKs for literally everything. I can say I want to wait a certain number of time and then I want to send or this email or start this campaign.

  6. It just makes the things I want to do within my application easier and it makes it better for my users because I don't have to bother them as much as I would otherwise because all the automation's built in and flexible for my use cases.

  7. So seriously try Bento, let them know Josh Siri sent you and get started with it today. It's this project called Better Testack created by uh this author called Aman Varsni. I apologize if I got your name wrong, Aman, or pronounced it incorrectly, but better tstack was created so that you can kind of have all these bits and pieces in the JavaScript world cobbled together for you. You have this better starting point, a CLI for scaffolding end to end type- safe, TypeScript projects.

  8. And while yes, usually a lot of these tools are not something I would reach for right off the bat and say, "Hey, I'm going to use all of this," I do still like to learn, to build, to see what's out there, especially within the JavaScript ecosystem and everything else. And this has been a fantastic starting point to just get up and running, to not have to do all the leg work of putting all this together. So why don't we build out a project just with the default that it has options and then I'll show you this particular options that you can't have.

  9. Let's throw that into a new project. Let's get cloud code running and see what we can do. So that's better-tack.dev.

  10. So what are the options? This is the default stack. You basically get to give it a name. Um and then it gives you the particular command that you can use. Um it's bun by default. I think I have bun installed on my system. It's a lot faster than something like mpm but so look like looks like for web front end we have tanstack routers a default we have no native uh front end so you're not using anything like expo we have a honojs backend uh which is a more

  11. popular choice nowadays type type safe as well as minimalistic backend and then it looks like we have a bun as a runtime we could do nodejs but we'll do bun for that and then tpc as an api I with a SQLite database using Drizzle. And so that DB setup is just going to be no cloud DB integration. Of course, you can use any one of these like Cloudflare for example. And then no deployment.

  12. We could do like deploy to Cloudflare workers and we could do like Cloudflare D1 um runtime set to Cloudflare workers. Great. We could use better o for that as well as bun. And then we could add a turbo repo. We could use biome for linting and formatting as well as like maybe a simple to-do application uh or an AI integration. Looks like it's cutting off right here on the bottom.

  13. But this is where we have initialize git repository or not. Um and so the default stack looks like it's web app with tanstack router bun hono and sqlite which is kind of what we saw. But if I changed it to that tanstack router, of course we can use nux spelt solid. We can have a different backend like convex.

  14. Uh I have a video that you can find up there in the far right corner where that talks about just how cool I think convex is where it is kind of this reactive database by default. So looks like both convex is the option that you can use on Cloudflare workers runtime.

  15. Since I've already done a video about convex, I'm going to keep it with hono and this looks great to me. We're going to do spelt uh with OPC just to have a little bit of you know diversity. So yeah, we get this whole uh kind of command that we can then copy and utilize. So bun create we are going to call it let's go ahead and say this is the speltastic tstack spelttastic tstack. There we go.

  16. And we'll go ahead and copy this. So it's going to use cloudflare workers with D1 database that is a SQLite using a hono back end with spelt on the front end. Um I'm cur I bet

  17. that means spelt kit again I don't think there's because especially with nux and solid I'm thinking spelt means spelt kit I I do like tan stack rider I do like all of these other options but we're going to try spelt and then we have cloudfare workers as a runtime I don't know where bun can be deployed to I'm guessing uh it's just like the no deployment option then we you just put it onto something like versell or something like that I have not gotten a chance to play around with better off.

  18. So I'm curious what that looks like out of the box. And then we're using bun as the package manager. I don't necessarily know if we need this monor repo build system, but I bet it works great with having spelt kit and something like, you know, hono allinone directory. So I'm just going to copy this. We're going to open up our code editor and let's go ahead and say let's just paste this in. This is going to create that speltic tstack.

  19. and fingers crossed we don't have to do anything. Um, again, I think this is a great starting option, especially if you're in the JavaScript ecosystem or you are just looking to continue to learn and build and create in the JavaScript ecosystem because usually the tough part is putting everything together.

  20. And unless you have a, you know, a specific starter kit or template that you already love and use, or you just have something that you specifically built or have seen others build, this is probably a great option for you. especially if you wanted to kind of pick and choose. Maybe this time you wanted to use, I don't know, Cloudflare um on the back end with Convex, but then the next time you want to use Hono and you still get that great starting point.

  21. So again, I don't think this takes the place of a batteries included framework like a Phoenix or a Rails or a Laravel, but this does give you a great starting point without having to put all those pieces together yourself. you are at the mercy now of a creator like Aman where you're like hey

  22. um if something doesn't quite work maybe that's not necessarily Aman's fault but you are using this that is kind of all those pieces put together and so because each one of these separate pieces is built is maintained is deployed by specific individual creators that's where the you know the downsides fall but that's not any different than if you were to put these together yourself so let's go into in this particular stack.

  23. Okay, we do get some next steps. We're going to go into it. We're going to complete the D1 database setup first. So, we need to see these database commands below. We need to log into Cloudflare. We need to create a D1 database. We need to update this JSON C with the database ID and name.

  24. Migrations apply locally. Let's go ahead and do that. So, I deleted this database already. So, I don't necessarily know if this database name and ID is something that you have to keep a secret. Um, since it's deployed as a JSON file, I don't think it is, but just to be safe, I deleted it, so don't try anything. Sorry. Okay, using Drizzle, I'm again, I'm just following these commands. This is not something that I've worked with.

  25. I'm just saying, hey, let me get it to a specific point. I'm going to test it out, look at the code, and then let's run cloud code, initialize it, and see where we go from there. So we got the generations already done. We I think we ran the bun dbg generate. Perfect. So now we can apply those migrations locally. So we have bun wrangular d1 migrations apply. And then looks like we need the like your db name which I think is called speltastic um d-local. Let's see if that does it.

  26. Perfect. So it looks like it generated it used drizzle to generate the migration schema. So migrations are kind of given out of the box for a lot of and I would assume a lot of this is kind of similar to better off rather than wrangular specific. These are just drizzle creating those migrations for uh D1 Cloudflare database. This is schema for O. So this is Drizzle schema. Again I'm not going to take a look too much at this code just yet. This will be before we finish all of these instructions.

  27. All right, I already kind of hit a hiccup in the sense of a lot of the instructions is kind of it it's dependent on specific parts of that, you know, framework spec specific parts of those particular libraries that you're kind of cobbling together. And I don't know how Drizzle I didn't know how Drizzle connected to Cloudflare D1. So I had to go to the Drizzle docs to find what it was looking for. And since we did say that this should be a mono repo, I'm curious if we can run, you know, bundev um from the from the root.

  28. So if I was to even close out of that particular server and go into the root, if I can run bunddev, does that? Yeah, that runs turb. Okay, so we're running the webdev server as well as the server dev server.

  29. And so now we should be able to open this up and have that uh looks like the API is still not working and we're like we're signin doesn't look like it's working either. Okay, there we go. We're connected to this API. Perfect. So we have two files and I'll kind of plop this over here so we can see.

  30. So, we kind of have these two uh versions. And why don't I actually open this up in the full version of it. So, this is the turbo repo file right here. So, we have a apps folder which has the server directory and then we have the web directory. And so, that's our mono repo that we have. The server looks like it has source. It has the DB migrations that we kind of already took a look at where we have this text that the Drizzle Studio has already applied.

  31. We have um specific routers and I would imagine yeah this is OPC's version of particular information and how we're sending data from the again type safe from the server to the client. So if I was to say um this is a private message I would imagine this is what we will see then on the screen. Let's refresh. There we go.

  32. This is a private message. Perfect. And so the user is the specific context of the user. So the reason the the whole thing of why a lot of people like this type safety thing. So if I was to say that this was now a messages and I was to go into the dashboard page. Uh this is probably going to throw an error where this particular private data. Um and it looks like yeah there we go. This message does not exist on type of message.

  33. So if I was to kind of pull this up, looks like yes, we are looking for the messages property and it's as simple as that being able to have that kind of type safe front end to back end.

  34. So that is definitely a advantage of something like this and that it's already hooked up for you. I have not used RPC. I have used TRPC before but this is looks like just a different version. Uh but yeah, so this is a front end that is built specifically by spfelt. And let's see if we do have any kind of backend or is this just straight spelt. It looks more like spelt. We do have the plus page. So this is technically spelt kit. Uh because you know uh stuff like plus page or plus layout that is spelt kit.

  35. That's its routing application or the front-end routing portion of spelt. But a lot of this is we're getting things on, you know, we don't have any kind of like TR uh like Tensac query or anything out of the box. This is just using like an on-mount hook to do all of all of the loading as well as putting in any kind of information.

  36. So then we also have the particular RPC client that this is what it is using to grab the information from this particular instance of RPC. All right. Yeah. And and again, a lot of this is just all of this boilerplate that you would typically have to set up within a JavaScript application, but now you don't have to think about it really. You don't have to worry about it too much. I'm curious how claude code does.

  37. I'm curious how it grabs this information and uses, you know, this type safety feature. So, let's initialize a new cloud code in this instance and let's see if we can get bookmark it up and running. So this is in the main repo, the mono repo which should have our apps as well uh for both web and server.

  38. Usually people would say the benefit of something like a full stack one uh singular language file like a JavaScript frontend backend kind of project is that you don't kind of confuse the LLM where you're kind of working across multiple stacks how you're connecting them. Is that better than uh a a batteries included framework like a Rails or a Laravel or a Phoenix?

  39. Or is the issue also then with knowing that hey uh we have these two different sides of the puzzle where all of these pieces are now cobbled together and maybe you know we're using outdated information or sources from one or the other. I still am going to ask it to use MCP servers such as contact 7. If I don't have that already running right now, I'll make sure to run it and then we'll go from there. Now, cloud code just initialized everything.

  40. And one of the neat parts that I didn't get to mention is a lot of people like that kind of simplicity of what something like better off might bring to this kind of better t stack where you do have everything put together, but you still have very bare bones. So there is hardly any styling. These components that come in with these sign on form.

  41. I believe this is all um all you know all better off in a lot of ways where these components give you all these pieces and it's then just hey you can use them how you want and it's automatically going to give you all these schemas and validation everything like that. I know better off out of the box also includes things like uh things like being able to hook into two-factor authentication, being able to hook into reset passwords, and you're not going to get, you know, the email provider connections as well.

  42. It just gives you those primitives. So, it's it's kind of like one step above building your own in a lot of ways. And now we're just going to add this particular prompt. Say, hey, this is what we want to build. Let's use the context 7 for any kind of up-to-date information about spelt as well as honojs because while I didn't take a look at it the uh server is where the honojs implementation looks. So this is the index.ts where that routing as well as those API calls are kind of put all together in one this RPC uh route.

  43. So this initial prompt is probably a little bit more information than I would normally give because that initialization from cloud code should have enough information to know, okay, what kind of tools are we already working with, but I do want to be a little bit more thorough than I might typically be. So let's run this prompt, see what Cloud Code gives back. I'm probably not going to change too much or reprompt things, mostly because I want to see how it works out of the box and see, you know, is something like this, a better tstack that's cobbled together.

  44. Does this work better with something like AI like claude code? So, first off, it does create the bookmark schema so that way we get that migration up and running. I'm curious if it is going to run like the bun db push command which also syncs it with cloudflare. That is the piece that would be interesting and also very uh you know very intriguing if it does nail because then we have this kind of local development environment that is also synced with the production environment.

  45. So next up is creating the particular OPC router marks where it's saying hey this is what is needed on the API end of things to say this is when we create a bookmark. Um protected procedures is where it has to be authenticated. I think we can actually say how it's protected. I don't know if that's going to be a specific middleware within honojs or if that happens on the OPC things.

  46. I haven't do dove into that particular in that world in quite some time and I might have been wrong in the sense that it was act it is looks like it is using a spelt query unless it is completely uh you know hallucinating that and thinking that it does have spelt query already attached to this particular application but if it does that's nice that's a nice little nicity I guess within this stack now we're

  47. trying to create the database migration in order to make sure everything's up and running looks like it's having a little bit of errors within that particular drizzle setup. So, let's see what happens. All right. Cloud code was not that much help. And I don't know if this is just because uh I I didn't give it enough information or it just doesn't know enough about this particular stack put together.

  48. Uh but basically because there is this mono repo I had to be in the app development or the app folder the app directory in order to apply the changes to the the remote server for wrangular wrangler the uh cloudflare database and then I had to uh make sure that those changes were pushed using bun db push. So that's Drizzle's way of ch making, you know, applying those changes with the migrations to Wrangler using the bun wrangler command.

  49. But then I had to actually make sure that those migrations were pushed and deployed both in that local and remote server. And so now I'm getting a 200 okay on bookmarks where before I was not. So we should be able to be good to go at least to try try to check this out within our application. And so yeah, it looks like we have our bookmarks page. Some styles are a little bit off, but we have the ability to add a bookmark. Let's say first one. Again, styles are way off.

  50. First one. You can't see this, but that is says first one. We'll go ahead and say this is Drizzle. And we'll create a description. Uh description. Looks like they have the ability to add a tag. Maybe first add. Okay, there. Nice. Create bookmark.

  51. Sweet. We have this ability to see the bookmark. Everything looks good. We can edit. Can we delete? We can. Great. So, all of those particular functions are working. Great. First save that new one. Tag one. Add. Create. Let's sign out. See if we see those bookmarks. So, we This is the authorization piece. Dashboard. We do not see the bookmarks.

  52. Refresh. I saw like a flash something. I don't know if that was a bookmark or just like another page, but yeah, it looks like it's specifically linked to a particular user, which is great. So, authorization good to go. Authentication still good to go. That was kind of out of the box. Um, so yeah, it looks like, you know, Claude did a great job of of creating that and the application gives a good bare bones to start it.

  53. So, what do we have? uh had those migrations and it just looked like the actual deployment and pushing to Cloudflare to get this up and running on Cloudflare workers was the only piece that it kind of struggled a little bit. So we do now have that routers where we have the bookmarks and looks like this is where okay we have a create procedure list um is where we have to make sure this is where we have that we need to make sure that this is equal to the session the context session user.

  54. So that is their particular bookmarks and then when we create um I'm curious how it links it to a particular user. Yeah, linked create a new bookmark with the user ID. So we have DB schema of bookmarks. So yeah, we have a user ID. Perfect.

  55. That is linked to the text user ID. It references the user ID. So importing user from this OT ts. Great. So, that makes a ton of sense. And then we have a select bookmark and an insert bookmark, which is I I'm assuming it is inferring based off of what this particular type is.

  56. And then that's that router file. Um, looks like none of these changed. It's just those information. And then in web, we have that new component for bookmark card. But this page didn't change too much other than adding those particular page. This is more like a single page application particularly within this individual page is where a lot of that got added into for bookmarks. So yeah, if I had to reach for an all JavaScript framework stack, better tstack is probably where I would start.

  57. One, because I'm not too familiar with uh a bunch of different parts of these tools in the sense that I don't feel comfortable enough at this point in time to put all these together. It would take a day for me. it would take, you know, a couple hours in the sense that uh this gives me that up and running from the get- go and it gives me all the tools I would need for the pieces that I would want. The ability to kind of pick and choose the pieces that I would want is fantastic. Again, with all of these different options.

  58. So, if you're someone who is building the JavaScript framework and you're like, hey, I don't necessarily know which pieces I would normally choose. I don't have a starter kit that's out of the box. Then definitely take a look at the better tstack. If you're also someone who's just curious about how the JavaScript framework world looks currently, maybe you do exist within the Laravel world or the Rails world or the Phoenix world, or you just haven't touched anything backend or maybe you're back and you haven't touched anything front end in a while.

  59. This is a great way to kind of just get your feet a little bit wet within what's new, what's fresh, what's now. Uh so use this, keep building and until next time, keep creating.

just you here