
Next-js Dev Learns RedwoodJS
Anthony teaches Dev Agrawal RedwoodJS, a full-stack React framework that integrates GraphQL and Prisma, while discussing its real-world application
Episode Description
Dev Agrawal and Anthony Campolo live-code a RedwoodJS blog tutorial, exploring its CLI generators, GraphQL backend, Prisma integration, and the framework's Rails-inspired philosophy.
Episode Summary
Dev Agrawal hosts a Framework Friday livestream where Anthony Campolo, a longtime RedwoodJS contributor known as the "Redwood Bard," walks him through the framework's blog tutorial. Anthony begins with the framework's origin story — how Tom Preston-Werner (creator of GitHub, Jekyll, TOML, and Semver) and Peter co-created Redwood after struggling to connect a React frontend to a Ruby on Rails GraphQL backend. The pair then work through scaffolding a project, generating pages and routes using Redwood's custom CLI, setting up a PostgreSQL database on Railway, and running Prisma migrations. Anthony highlights Redwood's distinctive features: named route functions that decouple URLs from code references, "cells" that handle loading, error, empty, and success states for data fetching, auto-generated tests and Storybook files, and scaffold commands that produce full CRUD interfaces from a single Prisma model. The stream surfaces real friction points too — TypeScript type mismatches with generated code, the need to regenerate SDL files after schema changes, and a failed Vercel deployment due to migration issues. The conversation broadens into React Server Components, where Anthony explains Redwood's commitment to making the transition invisible to app developers, and into a spirited debate about code colocation versus separation of frontend and backend. The session wraps with a discussion of Tom's startup investment fund, which offers funding to companies building on Redwood, and plans for a follow-up stream covering Clerk authentication and role-based access control.
Chapters
00:00:00 - Stream Setup and Pre-Show
Dev opens the stream solo, greeting viewers and filling time while waiting for Anthony Campolo to join. He browses the RedwoodJS website, noting its startup-focused messaging and tech stack of React, GraphQL, Prisma, and TypeScript. He encounters some confusion with Dark Reader distorting the site's appearance and muses about whether Redwood's community support is a bigger draw than the technology itself.
Dev also fields chat messages, mentions other streams happening concurrently, and struggles briefly with the decision of whether to install Yarn, which Redwood requires. The casual banter sets a relaxed tone before the technical walkthrough begins.
00:05:19 - Getting Connected and Stream Tech Troubles
Dev and Anthony work through technical difficulties getting their audio and video synced over Discord while streaming through OBS. Anthony's camera doesn't connect properly, leaving a blue screen placeholder, and the two troubleshoot microphone levels and screen sharing. They discuss the irony of OBS creating problems that tools like Streamyard would solve automatically.
Once the setup is functional enough to proceed, they briefly mention an upcoming podcast episode and other content projects before transitioning into the Redwood tutorial. Anthony shares a GitHub gist with code snippets they'll walk through during the session.
00:11:35 - RedwoodJS History and Origins
Anthony shares the framework's naming history — from Der Spielplatz to Chainsaw to Hammer to finally RedwoodJS, named after the trees near Tom Preston-Werner's Bay Area home. He explains how Tom, the first CEO of GitHub and creator of Jekyll, TOML, and Semver, built Redwood after experiencing the pain of connecting a React frontend to a Ruby on Rails GraphQL backend while working on a language learning app called Chatterbug.
Anthony describes how Rob Cameron and David Price joined the project early, and how Redwood has evolved its underlying tools — migrating from Apollo Server to GraphQL Yoga — while keeping the developer-facing API remarkably stable. He emphasizes that the tutorial he's about to give is nearly identical to the one he first used in September 2020.
00:17:20 - Project Scaffolding and Page Generation
Anthony walks Dev through creating a new Redwood project using Yarn, explaining the CLI's alias system where commands like yarn rw g page replace longer forms. They generate a homepage and an about page, examining how Redwood's custom router uses a single Routes file with named route functions rather than filesystem-based routing — a deliberate choice inspired by Rails.
Dev discovers that generated pages come with test files and Storybook stories out of the box. Anthony explains the philosophy behind this: Redwood treats developer app code as sacred and aims to never break it, even across major version upgrades. They also receive a raid from Ryan Carniato's stream, bringing new viewers into the Redwood walkthrough.
00:31:25 - Building the Blog with Prisma and GraphQL
Dev installs Yarn, scaffolds the Redwood project, and writes a Prisma schema for a blog post model with title, body, and timestamp fields. They spin up a PostgreSQL database on Railway, configure environment variables, and run the first migration. Anthony explains the project structure — a web side for the React frontend and an API side for GraphQL and Prisma.
The scaffold command generates an entire CRUD interface including an admin-like dashboard where Dev creates his first blog post. Anthony clarifies that while a blog isn't Redwood's ideal use case, it serves as a familiar domain for teaching the framework's conventions without requiring learners to think about application design.
00:42:08 - React Router Debate and Routing Philosophy
A lively tangent erupts when Anthony claims nobody actually uses React Router standalone anymore. Dev pushes back, citing his own experience using it on a project for the Supreme Court with a team of five. Anthony argues that popularity on NPM charts doesn't reflect real-world adoption and challenges Dev to name anyone else using it independently of Remix.
The debate touches on how teams choose tools based on perceived popularity rather than fitness for purpose, and circles back to why Redwood built its own router. Anthony argues this independence has proven wise as React Router's evolution has created confusion in the broader ecosystem.
00:47:22 - Cells, Data Fetching, and the Scaffold System
Anthony introduces Redwood's cell concept — a data fetching component that automatically handles loading, error, empty, and success states with a GraphQL query at the top. Dev imports the generated ArticlesCell into the homepage and sees blog posts appear. They discuss how cells differ from approaches like tRPC, which Anthony says took inspiration from Redwood's cell pattern.
Dev creates an Article component, explores the generated scaffold UI at the /posts route, and creates blog posts through the auto-generated admin interface. The conversation touches on TypeScript friction with generated code, with Anthony arguing that Redwood's built-in type inference from the database makes explicit TypeScript unnecessary.
00:54:25 - Testing, Storybook, and the TypeScript Debate
Dev runs the auto-generated test suite and attempts to write a custom test for the article list component. The tests use mock data and connect to a real database rather than mocks, which Anthony argues is better for resembling production. Dev encounters issues with React Testing Library assertions but appreciates that Redwood provides testing infrastructure from the start.
Anthony makes the case that Redwood is unique among frameworks for generating baseline tests automatically, so developers always have a foundation to build on. They also launch Storybook and debate whether TypeScript is necessary when Redwood already provides full typing through the database schema — a point Anthony feels strongly about from his experience.
01:00:27 - Customizing Queries and Schema Changes
Dev adds an "approved" boolean field to the post model and attempts to filter posts on the backend using Prisma. This surfaces the friction of modifying schemas after scaffolding — the GraphQL SDL files don't automatically update, requiring Dev to regenerate them. Anthony acknowledges this as an area where the scaffold workflow becomes less useful for evolving applications.
They discuss where filtering logic should live — client-side in the cell or server-side in Prisma services — and Anthony explains that Redwood's role-based access control system would typically handle visibility rules. The segment highlights the boundary between what scaffolds provide and where custom development begins.
01:06:16 - Deployment Attempts and Storybook Exploration
Dev attempts to deploy the blog to Vercel using the CLI after running the Redwood deploy setup command. The deployment fails due to a database migration error with the PostgreSQL schema. They briefly troubleshoot before deciding to move on, and Dev explores the Vercel dashboard to configure environment variables manually.
Anthony takes the opportunity to mention Redwood Studio, a new developer companion tool offering SQL query inspection and OpenTelemetry traces for local development. Dev draws comparisons to Nuxt DevTools and other framework-specific tooling, noting a broader trend of frameworks investing in developer experience beyond just the code itself.
01:17:39 - React Server Components and Redwood's Future
Anthony explains Redwood's approach to React Server Components: the goal is to make the transition completely invisible to application developers. He acknowledges the enormous challenge — requiring expertise in both Redwood internals and RSC architecture — and invites community contributors. The discussion contrasts this with Next.js's approach, where users had to learn new patterns like use client and use server directives.
Dev questions whether it's truly possible to hide RSC complexity from developers, especially given GraphQL's role in the data layer. Anthony insists this is achievable and that Redwood's existing clear separation of frontend and backend actually makes it easier than for frameworks where everything is mixed together.
01:22:37 - Code Colocation vs. Separation Debate
Dev and Anthony have a spirited philosophical exchange about whether frontend and backend code should live together or apart. Dev advocates for vertical slices and colocation — putting data fetching, UI, and actions in the same component — while Anthony argues that physical separation prevents accidental server-side bugs and that split-screen editing achieves the same productivity benefit.
Anthony presses Dev to articulate why colocation is better, and Dev admits he struggles to explain it concisely but maintains it's a genuine preference rather than an unfounded one. The debate illustrates a fundamental tension in modern web development between Rails-style separation and the emerging RSC-style colocation pattern.
01:30:27 - Redwood's Startup Fund and Closing Thoughts
The stream wraps with a discussion of Tom Preston-Werner's startup investment fund, which provides funding to companies building on Redwood — a unique incentive no other framework offers. Anthony describes Tom as an "eccentric billionaire" whose passion project supports both framework development and the startups using it, with a focus on climate-focused companies.
Dev shares his overall impressions: he appreciates the auto-generated code, built-in testing, and comprehensive tooling, but his preference for code colocation remains a personal friction point. They plan a follow-up stream covering Clerk authentication integration and role-based access control, and the stream ends with a raid to another channel and a post-show discussion about Astro, SvelteKit, and the future of meta-frameworks.
Transcript
00:05:19 - Dev Agrawal
What up? How's it going people? Yo, how's it going? Long time no see. Been off for a bit. Really need to get back to some regular regularly scared program. TVRs, how's it going? Great to have people here. We will get started soon shortly. Have some stuff to do in the meantime. Me take this a bit. Go engage with the tweet, please. So that people can know that I'm live. Wait, where did my tweet go? Live now come hang. Also watching Ryan Stream. That's amazing. Should we just watch Ryan Streams in the meantime? Anthony gets here. What do we want to do? Let's go to RedwoodJS and see what they have cooking up. We're doing Redwood today. Focus on building your startup, not fighting your framework. I kind of thought there was going to be a background image that didn't load. Is that the case? No. Okay. Looks like there is no image. Okay, cool. Not my bad. Startups using Redwood have raised 52 million. Should I just use Redwood so that I can raise money with them? Damn. Dark. Oh, it's Dark Reader. That's my bad. That's my bad. There we go. Yep, that's much better.
00:07:21 - Dev Agrawal
Much better. Yeah, I struggle with Dark Reader sometimes. Sometimes I really need it. Like I miss it and I'll re enable it, but the other times I'll get annoyed and I'll literally disable it. So it's. Yeah, it's funny having to deal with Dark Reader. We warmly welcome you to join our community because going from side project to startup is hard. Hard. And nobody should have to do it alone. Damn, I am inspired. I'll have to check this with Anthony, but I feel like the bigger reason people end up using Redwood is because of how much they support a business. Not. Not necessarily just the technology. And if that's the case, you know what? I might actually switch to Redwood first for most of my projects. But yeah, let's see. We can do like, we can get started a little bit I guess before Anthony gets here. It's. It's going to be like another 15ish minutes or so. So. Yeah, Half the testing reference reads like a tutorial, half the logger reference reads like a how to. Okay, good, that's nice. Okay, it's good that they acknowledge this stuff. React graphql, Prisma typescript Just in Storybook.
00:09:19 - Dev Agrawal
I like most of these things in here. Quick Start Create Redwood app. Or wait, this is Yarn. Can I not do npm? Come on. I have to install Yarn to use type to use Redwood. I guess why not? At this point, is there any reason I shouldn't have your yarn? Maybe. Kind of. So typescript is an optional flag. Got it. I could go to the. Through the tutorial. Nah, I'll just wait for Anthony. What's going on? Until then. All right, give me one second. Got some work stuff. What's up, Scott? How's it going? What's up? Damn, I missed you when I came to St. Louis. St. Louis. We had a fun time. We should have joined. Was it just too far for you or. I forgot what. What the issue was. Let's go back to this. Talking about the super lame framework. About trees. Right, about trees, probably, yeah. This one right here. I do see a lot of trees, so I guess that's the one you're talking. This is the one you're talking about. 16K stars. Not bad. Ready to hop on Anthony, or are you still busy? We've been waiting. Oh, you're ready to go.
00:11:35 - Dev Agrawal
Okay, you messaged me. I'll just call. So I was gonna do this on streamyard, but then I just started the stream using obs, so. So now I don't want to stop it and restart it with streamyard. So we'll just do Discord for now. Let's see how this works. Let's use that. Oh, nope. All right, we'll cut the music. How's it going? My camera seems to be not working with this, so we'll just have to stick to blue screen for now. Can you hear me? Oh, Anthony cannot hear me.
00:12:29 - Anthony Campolo
Hold on one second. I can hear.
00:12:33 - Dev Agrawal
Okay, how about now? Can everyone on the stream hear? Anthony?
00:12:40 - Anthony Campolo
Yo, I'm going through my actual mic right now, so mic check, 1, 2.
00:12:44 - Dev Agrawal
Same. I also had to disable one of my. Change the mic. There we go. There's our guy. Say hi to Anthony. Oh, I need to make this. There we go. We'll stick to this for now. All right. No music, I guess, for now, since
00:13:11 - Anthony Campolo
we're doing redwood stuff on Discord. I can see myself, but there's just a blue screen behind me.
00:13:16 - Dev Agrawal
Yeah.
00:13:17 - Anthony Campolo
See everything on the Twitch. But then I'm like, five seconds behind what I'm saying.
00:13:22 - Dev Agrawal
Yeah, I'm. I'm using Droid Cam for this. It's enabled for obs.
00:13:28 - Anthony Campolo
Exactly. I pay for streamyard, and I think lots of people should.
00:13:32 - Dev Agrawal
Yeah. Now, even with streamyard, this problem would still be there because this is an obs mic, not mike.
00:13:39 - Anthony Campolo
Well, no, I'd say the problem. Me not being able to see what the heck's going on through the Thing I'm actually going through.
00:13:44 - Dev Agrawal
I can still share my screen, I think, if I. Let me try to share my.
00:13:51 - Anthony Campolo
So I'm not seeing you at all.
00:13:52 - Dev Agrawal
Yeah, that's my. That's my camera. Discord is not using my iPhone camera because of the way Droid cam works. It's very weird. Can I just share this entire thing? Go live. I'll just drop to 15.
00:14:13 - Anthony Campolo
Yeah. See? Do you see there's that blue square over my.
00:14:16 - Dev Agrawal
Yeah, I see it. I don't have. Oh, I can't. I have a way to remove. Do I have a way to remove that? I don't know if I can. Oh, show my camera. There we go. There. Show non video participants. I'll get rid of everything. Yeah, I don't know if I can get rid of that. I don't think I can, so I always laugh.
00:14:42 - Anthony Campolo
People tell me you can't be a real streamer without obs. Like, people are solving problems that know that you don't have if you don't use.
00:14:51 - Dev Agrawal
So you see my screen? Oh, perfect. In here.
00:14:56 - Anthony Campolo
Yeah, that looks pretty good. Yeah.
00:14:57 - Dev Agrawal
Cool.
00:14:58 - Anthony Campolo
Obs right now, but that's okay.
00:15:02 - Dev Agrawal
Let's see. Obs virtual cam. I think I tried that. Does that work better? Show my camera. Nope. Obs virtual camera. I might need a different plugin for that. I think so I'll just turn it off for now. Oh, okay. It got rid of my blue square from there. Perfect. I don't have chat on screen. Wait, I think I just need to do like that.
00:15:34 - Anthony Campolo
Honestly, if you want to do that, just pull it onto. Onto your screen with a window.
00:15:38 - Dev Agrawal
It is. It's right. It's. It's right here. It's just on the.
00:15:42 - Anthony Campolo
Say, literally, like, open another one. Open a second one, and then actually put it on your screen.
00:15:48 - Dev Agrawal
Yeah, I need to figure out my stream setup for sure. Oops. Where'd it go? Can I pin you to the. Pin this to the top. I'll stay on top. There we go. Perfect. All right, I think we're ready to go. How's it going? Yeah, when is that podcast episode coming out?
00:16:11 - Anthony Campolo
Which one? Oh, the. Oh, yeah. So we ended up not recording Colin's part, so I needed to do a little more editing with it, and it'll go next week.
00:16:21 - Dev Agrawal
Okay, cool, Cool.
00:16:22 - Anthony Campolo
Yeah.
00:16:23 - Dev Agrawal
All right. Yeah, there's a podcast episode coming out apparently next week. I don't know how much you want to talk. Want me to talk about it?
00:16:30 - Anthony Campolo
Yeah. No. Yeah. Feel free to say whatever you want about it.
00:16:33 - Dev Agrawal
All right. Yeah, it's a podcast episode with JavaScript Jim, and according to Got, it's never going to come out. So that's also cool. Launch our one one on one on the couch. When are you gonna launch our one to one on the couch? I'll have to check with like. I sent it to like, James. He never got back to me about it. I'll have to talk to him. And I really want to like, ship that. Actually both of them. Them both. The one I did with you and the one I did with Mark, they were both pretty interesting. But let's not talk about stuff that no one knows about. RedwoodJS so I'm all yours.
00:17:20 - Anthony Campolo
Cool. Just finishing one thing. So I have a short little gist that I'm going to post here and that you can. This is basically what I'm going to walk you through. So this way I won't have to like speak the code to you. It doesn't really explain anything. It's just like chunks of code that we'll go through.
00:17:37 - Dev Agrawal
But install Yarn. Can I not do.
00:17:42 - Anthony Campolo
Well, if you. If you've never. You. If you literally don't have Yarn, your computer. No, I think you have to install Yarn. But it's not.
00:17:48 - Dev Agrawal
Okay, got it. Yeah, I don't. Never used it.
00:17:52 - Anthony Campolo
Yeah, it's. This is the only thing I use Yarn for now. Also, I think, you know, we made a bet on Yarn three and yeah, it worked out fine, but problem is no one else is gonna use it, so we're gonna be the only people using Yarn for probably the next three years.
00:18:10 - Dev Agrawal
That's funny.
00:18:13 - Anthony Campolo
I need to switch earbuds real quick.
00:18:15 - Dev Agrawal
Okay, no problem. We'll go through this real quick, then create pages. So there seems to be a red with C CLI which we can use to generate pages at. At least Pages might be able to generate more stuff. I think there's models and things. That's the home page meta tags header. Okay. No. HTML meta tags does everything about page and database migration. Oh, that's Prisma migration basically. Okay. And this is deployed on Railway Angry Orchard.
00:18:59 - Anthony Campolo
Yeah. So can you hear me still?
00:19:00 - Dev Agrawal
Yep, I can hear you.
00:19:02 - Anthony Campolo
Okay. So, yeah, so Redwood is a full stack framework that uses React and GraphQL. And the idea is to kind of give you like a Ruby on Rails like experience so you have everything in one application. You don't have like your API thing decoupled from your front end thing. It's all one project, but it is decoupled in the sense that you have an independent GraphQL server that's either being deployed into a server, like an actual server, or using a serverless function, kind of up to you. And then the react front end has like a way to speak to it directly and a way to do all this where you write very little GraphQL schema code. You write very little code at all. So much of it gets kind of scaffold out for you. So you end up, like they always say, you want to be able to just write business logic. I hear that all the time. It's almost never true. But this is one case where it actually really gets out of your way and lets you almost just write what is unique to your app and make sure your site has a functional front end, back end pages authentication.
00:20:06 - Anthony Campolo
All that is set up in a way where you don't write any lines of code. It's essentially guaranteed to work if you use the set of tools that are kind of the recommended path.
00:20:14 - Dev Agrawal
Nice. I'm definitely a big fan of tools that you only have to write. Sorry about that. You only have to write your business logic
00:20:26 - Anthony Campolo
and then doesn't seem to necessarily pick the things that enable it.
00:20:30 - Dev Agrawal
Yeah. Now whether the tool actually does allow you to write only business logic or not, that's up for debate most of the times. Yeah, I know a bunch of people.
00:20:40 - Anthony Campolo
Yeah. I mean, there's definitely. I would say there's a learning curve to it. So you have to understand how it works.
00:20:45 - Dev Agrawal
Right.
00:20:46 - Anthony Campolo
But the reason why I say you write very little code to do anything of business logic is because I literally mean that in this example, we're going to have an entire blog with a front and a back end and an admin UI where you can input them and edit and delete and all that. And the way you get to that point, you don't have to actually write any code. You just. Just accepts. You write a Prisma schema. So you start with this. As long as you have a Prisma schema written, you're able to create an entire CRUD dashboard that corresponds to that specific model without writing any code.
00:21:20 - Dev Agrawal
Prisma schema is code accounts as code.
00:21:23 - Anthony Campolo
Yeah, that's why I say that's the only code you got to write. You got to write the Prisma schema.
00:21:26 - Dev Agrawal
Okay, well, I'm excited. All right, so what do I got to do?
00:21:31 - Anthony Campolo
Start step one. Oh, actually, let me talk about the history, like, at least for just a couple minutes because I am referred to as the Redwood Bard by Peter, one of the creators of the framework, Basically because I have the entire oral history of the framework. In my head and have now been a part of that history for longer than not, which is cool. The project's like five years old, and I've been part of it for, like, three years. So it was originally started by. You say it's a good name.
00:21:56 - Dev Agrawal
Peter's Goodwin names.
00:21:59 - Anthony Campolo
Yeah. Yeah, he is. It's funny, actually. Redwood went through four names. It was. Was first called Der Spielplatz, which is German for playground. That was just kind of like the test bed of ideas. That was never really going to be the name. And then it was called Chainsaw, which they decided was too violent or, like, you know, too destructive, I think was the term Peter used. And then they wanted to use Hammer. Hammer js. And they wrote the first readme when it was called Hammer js and they had a whole explanation for why it was called Hammer and why the framework was. The name was so perfect for the framework. And then they had to change the name. So there's another Hammer js, apparently.
00:22:38 - Dev Agrawal
Oh, no.
00:22:39 - Anthony Campolo
So they called it Redwood js Because Tom lives around the redwoods in California in the Bay Area. And so he went and they took the explanation, like, rewrote it. So now it was like, actually, this is why Redwood is the perfect name for it, which is pretty funny.
00:22:55 - Dev Agrawal
I remember the hearing. Oh, by the way, pretty low.
00:23:00 - Anthony Campolo
Going to increase my volume's low.
00:23:01 - Dev Agrawal
No, it's on my obs. So. Okay. Because I had it low because I was playing music, but then I forgot to increase it. When you join. Yeah, I remember hearing that somewhere. He might have mentioned it in some sort of some conference talk. He lives in around Redwoods, and that's why he named it. Okay, so that's the history of the name. What about the history of the framework?
00:23:22 - Anthony Campolo
Yeah, so the history of the framework is that Tom. Tom Preston Warner, who was the first CEO of GitHub and then the creator of Toml and Semver, and he's just, like, generally. Oh. And I used to have these all, like, really clear in my head. Then Jekyll, he also created, like, the most important stacks I generator of all time. I remember the first time when I was hearing about Redwood and I saw that and I saw his background, and I'm like, why does anyone talk about how, like, one dude is, like, the most accomplished person in deck? Like, he built all this stuff. Like, isn't that incredible? And it just, like, now, like, if you're in the industry, like, people know who Tom is, obviously, but it's just like, I was just surprised that he wasn't like kind of seen as like a bigger deal. And there's a whole history about how he ended up leaving GitHub and I think he got totally screwed. Honestly. I think that it was really bad what they did to him. And he's never really talked about it publicly, I don't think so. I don't really want to get into it, but Tom's incredible.
00:24:20 - Anthony Campolo
Tom's like such a good dude and has like helped me so much and helped everyone in the Redwood project so much. So yeah, he's a really good dude. Nice. Anyway, him and Peter were working on a language learning app called chatterbug and they built a React front end that spoke to a GraphQL server that was running Ruby on Rails. So they had this kind of bespoke Ruby on rails backend outputting GraphQL that then react would work with. And just like setting that up, they realized just a total nightmare. Like people talk about how hard GraphQ is now when you're using it in like JavaScript and it's like optimized for that. Like imagine doing it and like that kind of thing. So they basically saw how hard that was and decided to create a framework that would make that really easy in a way that was native to the current tool set that exists. So they kind of looked at, you know, what is like the way to build this with all the current REACT kind of tech and the current GraphQL tech. And we eventually kind of migrated with the ecosystem. We used to use Apollo Server and then we switched to GraphQL yoga.
00:25:25 - Anthony Campolo
We have been using regular React, but now we're working on REACT server components. So we are, as far as I know, the only and still best way to do GraphQL and react with like a framework in a way that kind of doesn't require having to learn a whole bunch of GraphQL.
00:25:42 - Dev Agrawal
So other than Gatsby, you mean? I'm sorry. Yeah, it's not.
00:25:46 - Anthony Campolo
Yeah, like Gatsby. Yeah, not well. And no one uses Gatsby anymore, so.
00:25:51 - Dev Agrawal
Well, my personal website still does. I need to move that to Astro. I've been saying that for months now.
00:25:56 - Anthony Campolo
Nice. Yeah, yeah, yeah.
00:26:00 - Dev Agrawal
I got caught up in the Gatsby height a bit. A bit.
00:26:04 - Anthony Campolo
I mean, it was a perfectly fine choice at the time. It's just like the. Things changed now there's better things. It's like there were types at the time, it was cool and it was unique and there wasn't things like it and. But you weren't writing like a backend graphQL. You had this kind of like content mesh thing and then they would figure out how to make that actually map to like different backends and stuff. So this is. You create a. You write your own schema and you have a backend. You create that backend. So you create your own GraphQL backend. But they just make it incredibly easy to do that.
00:26:33 - Dev Agrawal
Right? Yeah. It makes sense that the someone who use Rails Extended extensively would be able. Would think about building something like this.
00:26:44 - Anthony Campolo
Yeah, yeah. And then you have people like Rob Cameron, he was the like the third person they kind of brought in to help build it. And then David Price was to help build a community. And Rob Cameron is like 20. He's been doing rails for like 20 years. He's like one of those old grizzled developers who will just be like, ah, everyone's trying to reinvent the wheel a million times. Just do this the way we did it 10 years ago. What?
00:27:10 - Dev Agrawal
So DHH.
00:27:12 - Anthony Campolo
Oh, I mean, he's not. He definitely is not like dhh. But he. There's that same kind of kind of mindset of, you know, the front of his face is always trying to reinvent the wheel, you know, kind of kind of deal. He was also the person who said that we should create our own off. And then when we did it ended up having a security bug in it.
00:27:33 - Dev Agrawal
And.
00:27:33 - Anthony Campolo
And I was like. And then they had to like make this patch and they're like this, you need to upgrade the security vulnerability. You only have this vulnerability though, if you're using the Redwood built in Auth instead of say, clerk. So I thought that was pretty funny and shows why people who just say, oh, build everything yourself sometimes are not actually giving you good advice.
00:27:52 - Dev Agrawal
Yeah, makes sense. Yeah. So it sounds like Redwood has like as a tool it's. Or as an experience, it said it's been pretty consistent and the underlying implementations have changed from Apollo to Yoga and things like that.
00:28:10 - Anthony Campolo
Yeah, that's correct. The way you write the code. So like, this tutorial I'm giving you is almost line for line. Exactly the same tutorial I went through in September 2020 when I first demoed Redwood Live. And all that stuff changed in the meantime and none of this code had to change. So Redwood itself treats your app code as sacred. It's something that should never, ever break even when we break the framework.
00:28:37 - Dev Agrawal
Damn. Okay. So very backwards compatible.
00:28:41 - Anthony Campolo
And obviously there will be times where if there's a small change and we think it's good enough reason we may do it. There's times where you had to add one word to one line of code sometimes, and that was when we need to get from 1 to 2. So now, as we continue getting further and further, that happening is less and less likely. So I feel even more confident saying that now. But in the past that's been the case. You know, they're. We're very good about not breaking your app.
00:29:07 - Dev Agrawal
Cool. Let's see if that holds up with rscs.
00:29:12 - Anthony Campolo
Yeah, that's. It's going to be the challenge for sure.
00:29:15 - Dev Agrawal
All right.
00:29:16 - Anthony Campolo
We already have, like, a clear separation of front end and back end, though. So for us, continuing to enforce that will probably make it easier because people who are getting confused are people who like, write all their crap in one file and do all this ridiculous stuff and never want the framework to figure it out for them. Where it's like, we're always like, no, you have a front, you have a back end. You need to know you can do things here and things here and things you can't do here and you can't do here. That's what RSCs are saying now. Everyone's flipping out because they have to think about places where you can't do stuff and can do stuff.
00:29:44 - Dev Agrawal
Yeah, it's very interesting. I'll probably have to watch, like, Ryan Carniado stream today. I watch. I'll have to watch the stream.
00:29:55 - Anthony Campolo
What?
00:29:55 - Dev Agrawal
At some point. I hate missing his streams. But Framework Friday's gotta happen. I mean, he hasn't streamed me months.
00:30:03 - Anthony Campolo
Well, I'll say what you should do. What I was saying is you should start this a little bit later and then try and catch a raid from him.
00:30:09 - Dev Agrawal
Yeah, I should do that. I already, like, kind of scheduled this one, so.
00:30:14 - Anthony Campolo
Yeah, that's fine. But that would be the thing to do.
00:30:17 - Dev Agrawal
Yeah, I could do a lot of things. I could just, like, stream more consistently.
00:30:22 - Anthony Campolo
That doesn't get you that Ryan Carniato. Bump it.
00:30:26 - Dev Agrawal
Get some other. Get some other bumps. I can catch some other streams as well. Some other raids as well. Primes every day. I can probably catch his.
00:30:34 - Anthony Campolo
That's true.
00:30:35 - Dev Agrawal
But he's.
00:30:36 - Anthony Campolo
Yeah, I don't know. I don't know enough streamers with thousands of followers. Well, enough to be able to do that.
00:30:42 - Dev Agrawal
Yeah, you do.
00:30:44 - Anthony Campolo
Not really. No, I don't actually. All the streamers I know get 50 to 100 people usually watching them.
00:30:49 - Dev Agrawal
I mean, same. Even the rate from them is enough for, like, the four viewers I have right now. Like, I used to be, like, consistently at 10 or 15. I really need to get Back into streaming and making YouTube videos anyways.
00:31:03 - Anthony Campolo
Yeah, well, see, Theo is the only person I would say, actually, like, know. Well, in the stream world. Like, I don't know. Primark prime doesn't know me, that's for sure.
00:31:10 - Dev Agrawal
That's fair. Yeah. You could go on his stream, talk about Redwood.
00:31:14 - Anthony Campolo
I would. I'll be down.
00:31:16 - Dev Agrawal
Yeah, he's not into react as much as the VR, unfortunately.
00:31:23 - Anthony Campolo
Yup.
00:31:23 - Dev Agrawal
Okay, so what do I run? Those are yarn.
00:31:25 - Anthony Campolo
So just run. Just run the first command that was in the gist. It's gonna generate your project, your create.
00:31:30 - Dev Agrawal
I don't have yarn.
00:31:32 - Anthony Campolo
Well, then, so install yarn. How do you install things on NPM or, like, globals?
00:31:38 - Dev Agrawal
Do I really have.
00:31:39 - Anthony Campolo
Yeah, you really have to. Yeah. Oh, yeah, yeah. If you're using, like, voltaire or something, I'd also say specify, I guess.
00:31:47 - Dev Agrawal
I guess I did.
00:31:49 - Anthony Campolo
Yeah. So you should be good now.
00:31:50 - Dev Agrawal
One second. That would take longer.
00:31:54 - Anthony Campolo
Yeah. You probably already had it. Yeah.
00:31:58 - Dev Agrawal
All right, so this is Create Redwood app.
00:32:01 - Anthony Campolo
You should bump up your block.
00:32:03 - Dev Agrawal
By the way, are we building a blog?
00:32:09 - Anthony Campolo
So we are. So this is an important thing to call out is that Redwood's not really a great tool to use to build a blog. And if you're building a blog, I would not recommend you build Redwood with it. The point of the tutorial is to actually teach you something. And so a blog is meant that everyone understands and has lots of shared conventions. And so something that you don't have to think about the app itself because you want to learn how the framework works. That's why we use the blog as an example to teach people how Redwood works. But we're not saying you should build your blog with Redwood. That Redwood is good for blogs.
00:32:41 - Dev Agrawal
That's fair. Yeah. So in that case, we. I guess we're following the tutorial. So we are building a blog today.
00:32:48 - Anthony Campolo
So bump up the font on the gist, too.
00:32:50 - Dev Agrawal
On the gist too.
00:32:52 - Anthony Campolo
Yeah, exactly. It's like, super, super small. Even more than that.
00:32:55 - Dev Agrawal
Yeah.
00:32:56 - Anthony Campolo
There you go.
00:32:56 - Dev Agrawal
Oh, you're. Where Are you looking at the discord or the. You're looking at this.
00:33:01 - Anthony Campolo
I'm looking. I'm looking at both, like. Yeah, Trust me.
00:33:05 - Dev Agrawal
Got it. How's this going? This could take a while.
00:33:10 - Anthony Campolo
Yeah, that'll take a minute. So what it's doing is it's basically scaffolding out your whole project with a example Prisma schema and a homepage, and basically everything's, like, ready to go. So that if you want to start doing more, you can either, like, run Commands, generate stuff or just start writing code. So the way I usually walk people through this is basically the same way this tutorial does. And you start by creating extra page. So you have a homepage already or actually, no, sorry, you don't. You don't have a homepage. You start by creating the homepage. You start. They give you a kind of boilerplate thing if you. Before you create the page though, first you should show what you see before you create a page that has a kind of fallback. That's really nice. So just Yarn Run yarn RWDev
00:34:01 - Dev Agrawal
do you want to install recommended extensions from Wix?
00:34:04 - Anthony Campolo
I'll do any of that. Don't install any of those extensions.
00:34:07 - Dev Agrawal
Yeah, I'm not. I'm just really prop types. Haven't seen that in a. In years.
00:34:15 - Anthony Campolo
Yeah, this is like.
00:34:16 - Dev Agrawal
That's a lot of red.
00:34:17 - Anthony Campolo
Was like I said, red was built in 2019.
00:34:21 - Dev Agrawal
Cool. So I'm running yarn. What?
00:34:27 - Anthony Campolo
Yarn Dev RW. That. Yeah. So RW is the alias for redwoods. That's how you start all your commands and then the dev script is just dev the U script.
00:34:39 - Dev Agrawal
The U script because you're dev the me script. Got it.
00:34:47 - Anthony Campolo
That's like rising in the Simpsons. There's like Smokey the Bear thing where you press a button. It's like who is supposed to be able to rep forest fires? And he hits you and it's like you picked you, which is me. That is incorrect.
00:35:00 - Dev Agrawal
Very incorrect. Also, by the way, we got a raid from Ryan. Solid. Damn.
00:35:06 - Anthony Campolo
Hey, what do you know? That's what I'm saying.
00:35:08 - Dev Agrawal
What's up? How's it going? We're looking at Redwood js. I thought you were gonna stream for longer. That was. That was a decently quick stream for. Or.
00:35:18 - Anthony Campolo
That's the shortest stream he's probably ever done.
00:35:21 - Dev Agrawal
Could be, yeah. How's it going? Thank you very much for the raid. That's a pretty big raid. Honestly, even for this stream, I have Doc reader on again, don't I? Alright, there we go. That's much better. So this is what it looks like. You're using this because you don't have any pages yet. Short stream for today. Got it. Okay, so this is how we generate a page.
00:35:43 - Anthony Campolo
And that's basically similar to the next step I gave you in the gist, but it gives you a different name. You don't want to call it my page. You don't want to create an about page.
00:35:50 - Dev Agrawal
Yeah. By the way, I probably would have done one of these on solid start already if I Hadn't already used it, but I'm almost certainly going to use more solid and Solid Start on stream. I'm yeah, really excited about Solid Start, honestly. Let's see what Redwood has, though. Maybe we can take from Redwood and hoping to do.
00:36:17 - Anthony Campolo
Yeah, I've been hoping to do a redwood stream on Ryan. I've pitched him on it. He's. He's down. I think he just has another time.
00:36:24 - Dev Agrawal
Got it. Are we trying Solid Start on Astro? On Dino? I don't know about that one. All right, so we have this running. What's the next step?
00:36:34 - Anthony Campolo
So keep that running and then open another terminal and run that first command which is going to generate your homepage.
00:36:39 - Dev Agrawal
Open another terminal. Let's see what the. Or let's just generate the project first because why not? So that's our home page that already this commits.
00:36:49 - Anthony Campolo
Let me. Let me explain what this command is doing. So actually change redwood to RW yarn redwood generate and then change generate to just the letter G actually. So make it a little easier to see. Yeah, so you can do both those aliases. So there's different generate commands. So that's why after the G, you specify what you're generating, you might generate a page, you might generate a layout, you might generate like a GraphQL schema. But this time we're generating a page. We want that page to be called home, and we want to go to our forward slash route because you can have a different name from what the route is going to be if you want. But I tend to keep them the same a lot of the time. So when we do about, we won't specify about about, we'll just do about and it'll be for both of them.
00:37:35 - Dev Agrawal
So you're saying I don't need to do this. I can just do this and it'll automatically become this.
00:37:41 - Anthony Campolo
Yeah, exactly.
00:37:43 - Dev Agrawal
Got it. And it automatically adds the like trailing slash or not trading proceeding slash.
00:37:49 - Anthony Campolo
Yeah.
00:37:49 - Dev Agrawal
Nice.
00:37:49 - Anthony Campolo
Yeah. I'll show you the routing stuff in a second.
00:37:51 - Dev Agrawal
Cool.
00:37:52 - Anthony Campolo
So did you generate the homepage or
00:37:54 - Dev Agrawal
is this not the homepage?
00:37:57 - Anthony Campolo
You have to generate the homepage.
00:37:59 - Dev Agrawal
Okay, but homepage is generated for the slash, the root route.
00:38:05 - Anthony Campolo
Yeah.
00:38:06 - Dev Agrawal
Does it override this page then?
00:38:08 - Anthony Campolo
Or run the command and find out.
00:38:10 - Dev Agrawal
Okay. All right, let's do that
00:38:15 - Anthony Campolo
and then go back to look at your. What changed?
00:38:18 - Dev Agrawal
So I did override it. Cool. Damn, I like that.
00:38:21 - Anthony Campolo
So make that a lot bigger for the text.
00:38:26 - Dev Agrawal
200%. Let's go with that. Let's try to find where it is.
00:38:32 - Anthony Campolo
Yes. So you're Going to have a website and an API side. So the website is the front end. The API side is all the GraphQL and Prisma stuff.
00:38:39 - Dev Agrawal
Okay.
00:38:40 - Anthony Campolo
And then src. You'll have components, layouts. Sorry. So close the API one for now and go to Pages and then homepage. And then the homepage. So you have three files because you also have a test. So you already have tests written. We are TDDing and you have a storybook file. If you're someone who wants to use Storybook.
00:39:01 - Dev Agrawal
I would love to tdd. Honestly. Let's tdd. The tutorial, I'm assuming does not include tdd.
00:39:09 - Anthony Campolo
Yeah, it does. The tutorial actually includes. Well, not T includes a whole section on testing.
00:39:14 - Dev Agrawal
A whole section. Okay. Yeah.
00:39:16 - Anthony Campolo
Because Redwood actually cares about tests. That's why we write them for you, so you don't have to care about them.
00:39:21 - Dev Agrawal
That's great. But writing test later is different from TDD though. Just to be purist about it.
00:39:28 - Anthony Campolo
I'm a little loud, apparently. Or you're quiet.
00:39:31 - Dev Agrawal
My mic is a bit loud compared to. Yeah, that's what I thought. So I'll turn your volume back up to full.
00:39:37 - Anthony Campolo
And I also talk more consistently at a volume.
00:39:42 - Dev Agrawal
I think you're too loud. Can't. Oh, my mic is a bit low there.
00:39:50 - Anthony Campolo
Audio leveling alone is a good enough reason to make the case why people should not use. Oh, yes.
00:39:56 - Dev Agrawal
I mean the audio leveling is. It's easier if I have feedback. I don't have feedback enabled. I'll just enable.
00:40:03 - Anthony Campolo
You shouldn't have to worry about it though. You shouldn't have to think about it. No one else does.
00:40:08 - Dev Agrawal
Yeah. Make a rails like experience for streaming. Don't. Don't necessarily. Don't give me the knobs. Could use a bit more. I'll just make it full. How about now? And I'll bring the mic closer to my mouth.
00:40:24 - Anthony Campolo
Yeah, you got. Yeah, that's the thing. You just gotta talk to your mic. That's gonna make a big difference.
00:40:28 - Dev Agrawal
And we can do a bit of asmr. Cool. Let's see. What do we have? Generate page. Let's generate an about page that's automatically generated for the about route. Let's see what it does here. There we go. About page. And I like that.
00:40:50 - Anthony Campolo
Let me explain the routing file too. So it's a Routes tsx.
00:40:54 - Dev Agrawal
I was just going to say that I kind of like. You don't do file system routing.
00:40:59 - Anthony Campolo
That's great. Yeah. No, it was a very conscious decision that this was kind of. We wanted just a Single routing file where you specify all the routes. Then you can have nested layouts. You can have all sorts of stuff. You can also choose to pre render specific pages if you want to statically generate them by adding the pre render prop to each route. So, yeah, it's pretty simple in terms of conventions you just look at. Usually kind of get a sense of what's happening and. Yeah, so that's the thing that makes Redwood fairly unique, is that this is the way we do routing.
00:41:30 - Dev Agrawal
And this looks like react router under the hood.
00:41:33 - Anthony Campolo
Nope. We wrote our own router.
00:41:35 - Dev Agrawal
Really?
00:41:36 - Anthony Campolo
Yeah.
00:41:37 - Dev Agrawal
Damn. Nice.
00:41:38 - Anthony Campolo
Because they wanted to be like the Rails router, obviously.
00:41:42 - Dev Agrawal
Interesting. So was there like something in existing routers you. You guys were unhappy about?
00:41:49 - Anthony Campolo
They weren't of like the Rails router, obviously. I don't know. I have no idea.
00:41:54 - Dev Agrawal
That makes sense.
00:41:55 - Anthony Campolo
React router. They just said it did things that they didn't like, that they wanted to be done differently. So they wrote their own.
00:42:00 - Dev Agrawal
That's fair. That's fair. Cool.
00:42:03 - Anthony Campolo
Which in hindsight is probably great. Like, no one uses React router except Remix now.
00:42:08 - Dev Agrawal
I mean. Yeah, I mean, I would. I would accept that statement as a joke, but.
00:42:16 - Anthony Campolo
Yeah, no, it's a fact. Like, they'll teach you a boot camp, then you'll never use it again, and you'll have no idea what's going on during your boot camp. But that's all it's good for.
00:42:24 - Dev Agrawal
I mean,
00:42:27 - Anthony Campolo
name me. Who do you know who's using React router in production by itself without Remix? Maybe one person.
00:42:33 - Dev Agrawal
Me, last year.
00:42:35 - Anthony Campolo
No, not you. I'm saying someone else.
00:42:38 - Dev Agrawal
No, like the project I was working on last year with a team of five people for the supreme freaking Court.
00:42:46 - Anthony Campolo
That was a school project, though.
00:42:47 - Dev Agrawal
No, it's not a school project. School projects are. I've maybe done like three school projects. I don't do school projects.
00:42:58 - Anthony Campolo
But who. What was the project for? Like, who paid you to do it?
00:43:01 - Dev Agrawal
The Supreme Court. That's what I'm saying.
00:43:03 - Anthony Campolo
The Supreme Court. So why'd you choose react router?
00:43:07 - Dev Agrawal
Because. Because of this right here.
00:43:11 - Anthony Campolo
Okay, so because of group think.
00:43:13 - Dev Agrawal
Yeah, exactly. It is still the most popular router that react has.
00:43:17 - Anthony Campolo
Okay, but I'm saying when you. When you go to a company, you try and make that case that that's not as easy to make. But like, yeah, you can say everyone uses react router, so we should use React router. But the fact is everyone isn't using React router.
00:43:27 - Dev Agrawal
Honestly, that's an easier.
00:43:29 - Anthony Campolo
Name another person who's not you who's using it.
00:43:32 - Dev Agrawal
Honestly, that's a pretty easy case to make with many companies that, hey, most people are using. This is the most popular choice. Let's just. That's why it even.
00:43:39 - Anthony Campolo
Right, but I'm saying it's not the most popular choice. I'm saying that NPM chart is a lie.
00:43:44 - Dev Agrawal
Okay, that's a whole different conversation.
00:43:46 - Anthony Campolo
Have you named me a single person who's not you, who's using it? Name me one. One person. Just one. That's all I'm asking.
00:43:52 - Dev Agrawal
Parasocial fix in chat. There we go.
00:43:55 - Anthony Campolo
So you can't. You can't name me a single person using it. You're saying it's popular?
00:44:00 - Dev Agrawal
Yeah.
00:44:01 - Anthony Campolo
That doesn't make any sense.
00:44:03 - Dev Agrawal
See, the circle I hang around with are like the next JS and remix crowd.
00:44:08 - Anthony Campolo
But it doesn't matter. You know lots of people, you know a lot of people. And if you. If it was a popular thing, you would know people who used it because that's what popular means.
00:44:16 - Dev Agrawal
Do you want me to name my previous co workers?
00:44:20 - Anthony Campolo
I mean, I get that. Yes, you used it on one. On one project and that's fine. No, we had example you can give. That just means no one's using it.
00:44:28 - Dev Agrawal
We had like four projects there that were using React and all four of them are React router.
00:44:35 - Anthony Campolo
Right. Because all of you are making decisions by going to NPM charts and choosing which one to use.
00:44:40 - Dev Agrawal
Yeah, a lot of people do that apparently.
00:44:42 - Anthony Campolo
Yeah. And then a lot of people who realize how to make better decisions at some point in their life will stop doing that.
00:44:47 - Dev Agrawal
That's fair. I agree with that. That's for sure. All right, so you have your own router. That's what your homepage looks. Is that what my homepage looks like? Let's see. Let's go to the homepage. No. Oh, this is generated files. Okay. So I should not control click. Are these auto imported
00:45:09 - Anthony Campolo
are like if
00:45:11 - Dev Agrawal
I control click, I go to generate it. Okay.
00:45:13 - Anthony Campolo
Yeah. So there's a whole bunch of Babel magic happening that lets you not have to worry about that.
00:45:19 - Dev Agrawal
Okay. I mean, honestly, I would prefer it if control clicking here sent me here, but okay, not too big of an issue. I'm not going to spend too much time in here anyways. Okay, so that's my homepage. That's a link that also comes from the router. There's the routes and. Oh, so you don't pass URLs in here. You pass references to routes.
00:45:48 - Anthony Campolo
So these are what called named route Functions. So this is. If you want to, like, change stuff without. So if you want to change the actual URL route without having to change the code here, you can do that.
00:46:01 - Dev Agrawal
That's awesome. I love it. I wish frameworks had.
00:46:06 - Anthony Campolo
And no one else can do that. And this is why, like, this is the thing about. If you actually. If you choose to build something yourself and you actually have a good reason to do it, you end up with like some really nice dev experience sometimes.
00:46:14 - Dev Agrawal
Mm. I mean, why is it better? Parasocial. I honestly, yeah.
00:46:22 - Anthony Campolo
I mean, I don't need to make the case. I don't need to make the case. Our Redwood router is better than React router because no one ever used redwood router by itself in the way React router is used. The fact that React router exists in its current form is what is wrong with it.
00:46:36 - Dev Agrawal
Fair. Yeah, that's fair. Okay, that's nice. That's really nice. Okay, what's next here? Creating a database migration. So I should create a Prisma file.
00:46:50 - Anthony Campolo
You have a Prisma file?
00:46:51 - Dev Agrawal
Oh, I have a Prisma file. API DB schema, Prisma. I have. Please remove the following example. Removed. Thank you. Could have just done that in the boilerplate. Okay, what are we adding here? Post model. Post ID title body created at. I am not going to copy it. I want to do this by doing and I can just do that.
00:47:22 - Anthony Campolo
I don't believe in doing. I believe in don'ting.
00:47:26 - Dev Agrawal
Wait, what is that moving a Prisma 1 data model which is based on the GraphQL syntax. The current Prisma language server doesn't support the syntax.
00:47:37 - Anthony Campolo
Don't worry about that.
00:47:38 - Dev Agrawal
Don't worry about that. That's what I thought. Okay, so I have an ID title body created at. Title body. Nope, created at. Cool. All right, I have.
00:47:57 - Anthony Campolo
You don't have to use Railway if you don't want to. If you have your own way spinning up a postgres database, you're welcome to use that.
00:48:02 - Dev Agrawal
Okay, so I do need to spin one up for.
00:48:06 - Anthony Campolo
So yes and no. Okay, so technically you don't actually have to. You could do it with SQLite. I like to include this step because I think that most people are going to end up using a Postgres database anyway. And if you follow the whole tutorial using SQLite and then at the very end try and switch to postgres, there's a couple of things that happen that are a little bit weird you have to handle. I think it makes more sense to go through the five second step of spinning up A database on railway and just using that.
00:48:33 - Dev Agrawal
That makes sense. Yeah. By the way, we have someone in the chat saying they're a big fan of Redwood. And the first thing looked at after several projects in Meteor, Nest and PHP days. I'm literally in the same boat. I did php, I did Nest, I did Meteor and I think Redwood might be the next thing that I end up using in the.
00:48:53 - Anthony Campolo
Yeah, this is super cool. And I can. I can see the chat messages by the way for anyone tell me things. Meteor is the actual best precedent for the thing that came before Redwood that is most like it. And I think in many ways if you wanted. If you were in a Meteor you're like man, I wish Meteor stuck around. There's a.
00:49:11 - Dev Agrawal
Continue to get literally what I think.
00:49:13 - Anthony Campolo
Yeah, that's literally what you use Redwood then. Because Redwood is what that would have ended up being most likely.
00:49:19 - Dev Agrawal
Okay, cool. I guess GraphQL has the real time layer so. Because the biggest thing about Meteor was that it's fully like it's real time out of the box and everything is.
00:49:33 - Anthony Campolo
Yeah. And there's like an asterisk next to that which is like we are just now adding support for that technically because it's really in GraphQL but no one ever does it.
00:49:42 - Dev Agrawal
That's fair. Yeah, most people I guess also like if you're all the time deploying to serverless functions, you don't have access to websockets.
00:49:49 - Anthony Campolo
I do think that's like across. Almost across the finish line now though. And that was like took us. We were talking about Stream like two years. So now is actually if you are into that. We can now proudly say yes you can do that.
00:50:00 - Dev Agrawal
Nice. Back to Meteor and Redwood. Yeah, honestly like my like I discovered Redwood as the full stack framework like right around the time I was getting bored with Meteor and them not doing anything. It's just that I was pulled into single page applications after that or like some weird stacks, whatever didn't get time to explore at that time.
00:50:23 - Anthony Campolo
This is good about streaming is you can kind of learn all these. You at least get a sense of all of them and you know it's like kind of stick with I only do this because I only do this and it's like well you know, do some other things every now and then.
00:50:38 - Dev Agrawal
I don't have railways. Cli.
00:50:40 - Anthony Campolo
You don't need an account actually you will need an account to use the CLI but just go to dev. Go to dev new.
00:50:48 - Dev Agrawal
Oh dev new.
00:50:49 - Anthony Campolo
Yeah. Dev new. This is also our rail is incredible you don't even need an account to do this.
00:50:54 - Dev Agrawal
I want to make sure I don't leak anything.
00:50:58 - Anthony Campolo
You can. Because if you don't have an account, the database gets torn down anyway after like a week or two. So just don't worry about exposing the key.
00:51:08 - Dev Agrawal
Okay. Well, key is not here anyways. I think they also have it hidden. It's in connect somewhere. It's in connect. Connect. There we go. RAW PSQL how do.
00:51:19 - Anthony Campolo
Sorry. It's actually. It's variables, I think.
00:51:23 - Dev Agrawal
Copy. And I need to plug this in. Database URL My ENV database URL is this right here. And I'll close it. Perfect. Didn't even have the whole thing on my screen. What else? So that was Railway. Don't need to do any of that. I can do the Prisma migrate now.
00:51:52 - Anthony Campolo
Yeah.
00:51:53 - Dev Agrawal
The yarn her RW Prisma migrate. Was there a. Yeah. I need to supply a name.
00:52:00 - Anthony Campolo
Oh, I can just give a name, say it just runs the command, doesn't ask you for anything.
00:52:07 - Dev Agrawal
Validation error. The URL must start with.
00:52:13 - Anthony Campolo
I skipped a step. Sorry. Because I forgot I need to tell you to change the provider to PostgreSQL. Yeah.
00:52:22 - Dev Agrawal
Cool. To make sure we're actually using Postgres and not Railway Environment variables. Loaded. How long does this take? Oh, is it. It's running the rust binary.
00:52:33 - Anthony Campolo
10 to 20 seconds.
00:52:36 - Dev Agrawal
It's running the Rust engine, isn't it? I thought it was supposed to be fast.
00:52:43 - Anthony Campolo
That's funny. I mean, it's more so that you're reaching out to a database on the network, I would imagine.
00:52:49 - Dev Agrawal
That's fair. So do I have stuff in here now? Data?
00:52:54 - Anthony Campolo
You do not that set up your table.
00:52:58 - Dev Agrawal
Yeah, I mean, that's all I. That's all I wanted to see.
00:53:01 - Anthony Campolo
Yeah. So now I'll show you how to get the data into it. You could do it through the Railway dashboard, but we're doing it through the Redwood auto generated dashboard.
00:53:10 - Dev Agrawal
There's an auto generated dashboard?
00:53:12 - Anthony Campolo
That's right. There is. So you know how like, you know, you'd have. I don't know if you ever use Rails, but in Rails, you know, you'd have. Or Django, there would be an admin dashboard where you can kind of like easily go look at the stuff and edit it.
00:53:24 - Dev Agrawal
I've definitely used that.
00:53:24 - Anthony Campolo
Yes. Yeah.
00:53:26 - Dev Agrawal
So this is what Meteor had one, I guess. Like it didn't have it built in, but there were dev tools around. Yeah, the people that were working on the Meteor ecosystem were pretty great. There's so many great tools. Around Meteor. Anyways, I'll stop reminiscing so that I just run a scaffold. What is that supposed to do? Scaffold files. Oh, so it. So my guess so far, looking at that and looking at so many green folders is that it created model a component, it generated an API. How much stuff did that generate that scaffold generate? I guess I just need to follow the next steps.
00:54:21 - Anthony Campolo
Yeah.
00:54:22 - Dev Agrawal
What's a cell?
00:54:25 - Anthony Campolo
So great question. The cell. So this is really one of the things that makes redwood super duper sweet. And other frameworks could do this. They just don't because they're lazy. A cell is a type of data fetching component that automatically handles error states, loading states, empty states and success states always and will never mess them up.
00:54:46 - Dev Agrawal
Interesting.
00:54:48 - Anthony Campolo
Yeah, it's mind blowing. It's completely changed the way I developed.
00:54:53 - Dev Agrawal
Okay, so looking at this, there is a. I don't know why import order is a thing. Wow. Oh, there should be an empty line after this. Apparently.
00:55:04 - Anthony Campolo
So Alex, from. What are you doing?
00:55:08 - Dev Agrawal
I was just looking at. Yeah, if I did that, Eslint was complaining that there needs to be an empty line apparently.
00:55:17 - Anthony Campolo
Well, why do you need either delete both of those? Do those come when you generate it?
00:55:21 - Dev Agrawal
Yeah, this is generated code.
00:55:24 - Anthony Campolo
This is why. Yeah, I never use typescript with it.
00:55:26 - Dev Agrawal
So you never use typescript with redwood?
00:55:31 - Anthony Campolo
Nope, never.
00:55:32 - Dev Agrawal
Okay.
00:55:32 - Anthony Campolo
There's no need like honestly, you get the typing already because it's fully typed to the database. You write js and you get the autocomplete and typing already.
00:55:41 - Dev Agrawal
That's fair. I still like typescript.
00:55:42 - Anthony Campolo
There's literally no reason to use typescript for the redwood and people will anyway because they don't understand how these things work.
00:55:49 - Dev Agrawal
Yeah, I mean we do need custom types at some point though. I'm not a like infer everything from source. I like to have. I like to have some explicit types when I'm writing some functions.
00:56:03 - Anthony Campolo
Like.
00:56:08 - Dev Agrawal
Any inter. Like not all data structures come from the database. Basically.
00:56:12 - Anthony Campolo
Not sure.
00:56:13 - Dev Agrawal
Yeah, that's basically it. Don't worry, parasocial, we're not getting into that debate here. Okay, so this is what you're talking about, the cell. There's a loading, there's an empty state, a failure state and a success.
00:56:25 - Anthony Campolo
A cell is a thing for client side data fetching. It doesn't make any sense. The question does a cell fundamentally makes no sense.
00:56:33 - Dev Agrawal
I mean this is a part of it. Like when I ran that generate cell, this is one of the things that was created
00:56:42 - Anthony Campolo
and so let me Explain also. So the way it actually works is there's the four different states it can be in and there's the query at the top. So the query at the top is the GraphQL query that you're sending to your GraphQL API. So this is where the front actually connects to the back end. And this is the place where even if you run these commands, have everything generated for yourself, you do have to at least understand what a GraphQL query is. Thankfully, it's literally the simplest thing you could ever be asked to learn is how to write a GraphQL query.
00:57:06 - Dev Agrawal
Yeah. Do I need some sort of a GraphQL VS code plugin for this?
00:57:15 - Anthony Campolo
It's possible. I'm not sure. I think what I would recommend, honestly, I recommend never writing your query in. If you, if you're writing GraphQL and you're working with GraphQL queries, you should always start by just sending queries to your API using a graphical editor or even just curl, you know.
00:57:32 - Dev Agrawal
Okay.
00:57:32 - Anthony Campolo
And then once you have your query for sure figured out, then bring it into your front end and don't even bother trying to write your query on your front end until you know the query for sure. Yeah, you should make a hard separation there.
00:57:44 - Dev Agrawal
That makes sense. Yeah, that fully makes sense. All right, what next generated the cell?
00:57:50 - Anthony Campolo
So this is the cell now. Now we need to import this wherever we want to see it. So we want to see this on our home page. So we're going to have to import the article cell. And you can see we're importing it and then just making it, putting it as just a component.
00:58:03 - Dev Agrawal
Okay, so homepage here I can say.
00:58:09 - Anthony Campolo
Okay, so again, parasocial, while you're asking, doesn't make any sense, you're saying. I was thinking if it has backend, it would be more like trpc. TRPC took inspiration from cells and implemented themselves. I thought it was really cool. That was something we already could do and TRP couldn't do. It has nothing to do with the back end. It's a way to put a convention in that verifies whether your data has errored or not and whether it's still in a loading state or not. That is something that cannot be done on the back end because there is no loading state until you've already queried it from the front end. So it's a way, it's a front end mechanism and you can do it in other frameworks. So now trpc, if you copy Alex's huge boilerplate example where he wrote all the types for it. Then you can do that. Then you have this huge hunk of code you're just copy pasting around, which is what I did in my TRPC tutorial. But with this, it's about how do you actually handle it on the client side itself. Because everyone always has to do that themselves.
00:59:05 - Anthony Campolo
They have to figure out what to do when it's loading and figure out what to do when you get an error message. They have to handle their error message. It's like, what if you remove that set from your the rest of your life?
00:59:13 - Dev Agrawal
Yep. It's very powerful. For sure. Had to reload because I couldn't live with. Yes, lint. All right, that's going to. Where are my mod controls? I need my mod controls back. Show mod icons. There we go. Oops. Because that is going to catch a timeout. All right. Article sell. So we imported it.
00:59:49 - Anthony Campolo
He was making a joke about what I was saying to Parasocial. I don't think he was trying to insult me.
00:59:54 - Dev Agrawal
Okay, that's fine. It's a quick timeout. So this imported from SRC Components Article Cell. That's where I have this. Okay, but I don't have an index page here. How much stuff does this generate? Yeah, this import went into the build stuff. So this import comes from the generated. Is that the case?
01:00:27 - Anthony Campolo
Sorry, what's the question?
01:00:30 - Dev Agrawal
So I imported this like it was mentioned in. Why do I keep doing that in the tutorial? Right here. Starts the components.
01:00:42 - Anthony Campolo
Yeah. So you're asking where. How it's being exported?
01:00:45 - Dev Agrawal
Yeah.
01:00:45 - Anthony Campolo
It seems like it's through the sheer magic of Peter's brain hiding it in the code base for us to never have to worry about it.
01:00:52 - Dev Agrawal
Oh, my gosh.
01:00:52 - Anthony Campolo
It's some Babel thing.
01:00:56 - Dev Agrawal
All right, and why does. Go ahead.
01:00:59 - Anthony Campolo
Why does what? Have. What?
01:01:01 - Dev Agrawal
This says there's no exported member types. Articles can't be in my project, so
01:01:09 - Anthony Campolo
I can't tell you. That's. That's. That's a problem I won't. I wouldn't have to solve.
01:01:15 - Dev Agrawal
Okay, let's see. GraphQL post.
01:01:20 - Anthony Campolo
Okay, let's suppose I always find it so funny. People tell me how much time Typescript saves, and they ask me all these questions about things they need to fix when they're using it. And I'm like, if you don't use Typescript, you wouldn't have to do that.
01:01:30 - Dev Agrawal
Okay, so this is a typescript issue, not a GraphQL issue or not a Redwood issue. You're saying that.
01:01:36 - Anthony Campolo
Yeah, no, I'm saying this is the thing about VS Code and TypeScript and how all that stuff works. And why would you ask a framework author to have to handle that for you?
01:01:45 - Dev Agrawal
I mean, if. Okay, that's fine. Let's just go with this. Let's see if this runs. If it runs, I mean, I'm sure
01:01:51 - Anthony Campolo
someone on the team could figure out what that error is. I'm sure we could probably figure out a way to fix it. So.
01:01:56 - Dev Agrawal
Right, that's fair. Yeah. Now, if this runs, that's fine. I'll put a ts-ignore in here. The only thing is that I trust Typescript to tell me if things are going to run or not. So if it's like so if.
01:02:08 - Anthony Campolo
I know. And the fact that you can't do that should tell you something about Typescript.
01:02:11 - Dev Agrawal
No, that tells me something about Redwood. For sure.
01:02:14 - Anthony Campolo
No, but it's happens in Svelte. This happens in Astro. This happens in lots of frameworks.
01:02:18 - Dev Agrawal
There we go.
01:02:19 - Anthony Campolo
We're going to get. So hold on. Oh, sorry. We skipped a step. We did the scaffold. We didn't actually go to the UI yet. That's not a redwood thing. Okay.
01:02:28 - Dev Agrawal
What happened? That's a user issue. Cool. Okay, so in the articles, looks like this modified the query a bit. So that's qwerty articles.
01:02:40 - Anthony Campolo
That's not the problem. So hold on.
01:02:41 - Dev Agrawal
Okay.
01:02:42 - Anthony Campolo
Keep this. Keep this just the way it is right now.
01:02:44 - Dev Agrawal
Okay. Just the way it is.
01:02:46 - Anthony Campolo
Go back to your site and go to forward slash posts.
01:02:50 - Dev Agrawal
Forward slash posts. And now create a blog post. Cool. Let's create a blog post learning. Or let's say struggling with Redwood Js and body Redwood Js. Cool. I've been writing too many blog posts recently. Okay, so there we have our first blog post.
01:03:17 - Anthony Campolo
And then go back to your homepage now.
01:03:19 - Dev Agrawal
And go back to my homepage and
01:03:21 - Anthony Campolo
you'll just see and refresh it and refresh. Try restarting. Restart your dev server actually, because I we changed the environment variable since we started.
01:03:31 - Dev Agrawal
I did. I reloaded my entire.
01:03:33 - Anthony Campolo
Oh, okay.
01:03:35 - Dev Agrawal
Oh, I mean it worked.
01:03:37 - Anthony Campolo
I know why it is because I don't know. I know why. So yeah, now go back and grab the piece of code where it aliases the articles to post correctly. Is this didn't used to be in this tutorial. It always throws me off.
01:03:49 - Dev Agrawal
Not quite there.
01:03:51 - Anthony Campolo
There you go.
01:03:52 - Dev Agrawal
So I guess I don't need that now. Something is breaking. Oh, you needed that. Okay, sure. Going to put a TS expect error for now. We'll revisit this at some point. So now if we go here, we see the post. Perfect. Great. Cool. So what did we just do here?
01:04:19 - Anthony Campolo
So what doing now is it's taking that GraphQL query and it's sending it to the server and then go down to your success part of the cell.
01:04:29 - Dev Agrawal
What's wrong here? Oh, so now it. Never mind. Now it knows it's there. Now it's there. Perfect.
01:04:36 - Anthony Campolo
So there was never an issue at all. Thank God. Typescript saved us all that time. So look at success.
01:04:42 - Dev Agrawal
Yes, Typescript saved so much time. Let's go. Okay. Yeah, you were saying go down to
01:04:48 - Anthony Campolo
where it goes success and then see how it's basically then mapping over and just JSON stringifying it. So the next step I have you do is actually create a component there.
01:04:57 - Dev Agrawal
Okay, let's create a component. This is. Oh, this is what you're doing right there?
01:05:03 - Anthony Campolo
Yeah, yeah. Just grab that whole success thing and
01:05:08 - Dev Agrawal
return it from here. Let's call this article Dude, Just copy paste.
01:05:14 - Anthony Campolo
All success.
01:05:16 - Dev Agrawal
I like at least writing some stuff on my own.
01:05:20 - Anthony Campolo
Why? That's where you write something that could be wrong. Like you.
01:05:23 - Dev Agrawal
Because I'm learning.
01:05:24 - Anthony Campolo
I could add errors, I guess.
01:05:26 - Dev Agrawal
This is a traditional react. I don't need to learn this. I can just copy this like as a.
01:05:31 - Anthony Campolo
As a learning exercise. That is a legit reason. But it's just like. I don't know, I just find this whole obsession with writing code reminds me of like handwriting versus typing. It's like I was like, you gotta learn to handwrite because reasons. And it's like, no, you don't. You really don't.
01:05:47 - Dev Agrawal
Yeah. Cool. So I changed this and now it looks like this. Can I add tailwind to this already? Is that a part of the tutorial? Except. Doesn't need to be tutorial. It's fine.
01:06:00 - Anthony Campolo
Adding tailwind is just you yarn redwood set up tailwind or something like that.
01:06:04 - Dev Agrawal
Okay. Pretty nice. What's next? This is the homepage. Our homepage looks. We added the article in the homepage. Cool.
01:06:16 - Anthony Campolo
So that's the whole thing I got right here up until the deployment step. Unless you want to go through the testing. Storybook stuff.
01:06:22 - Dev Agrawal
Yeah, definitely want to go through testing. Great.
01:06:26 - Anthony Campolo
Run yarn redwood tests and your tests are done. And obviously all it does is just verify your component actually work, works and doesn't break.
01:06:34 - Dev Agrawal
Right. I mean, that's what the original test does, right?
01:06:39 - Anthony Campolo
Yes. Yeah. The auto generated test. Yeah. So that's why I say kind of gives you TD out of the box. If you think of TD as make sure my component Renders, which I like. I think that's pretty smart way to do it and pretty good way to split the difference between having to deal with a TDD kind of lifestyle and maybe just wanting like something that can kind of TDD for you.
01:07:00 - Dev Agrawal
So it uses this mock data as what? The query data. Where does it use the mock data? I guess right here.
01:07:11 - Anthony Campolo
The mock data. It uses it in Storybook.
01:07:14 - Dev Agrawal
Oh, okay.
01:07:16 - Anthony Campolo
It might use it for the test as well. I'm not really sure. I know it uses mock service worker under the hood.
01:07:22 - Dev Agrawal
Okay. Yeah. It's also using it for the test. So success articles and I'm. Or the test is piping in some stuff into there. Prisma schema validation. So something failed. When I'm trying to run my test, DB must start with PostgreSQL.
01:07:42 - Anthony Campolo
Oh, that's because. Yeah. There's an extra step, I think, when you have to test with okay. Prisma. It should tell you in there. I think in there
01:07:53 - Dev Agrawal
I can do this to make it easier. That's a little too much, I think.
01:07:59 - Anthony Campolo
I think I know what you need to do. Just go to your emv. Yeah. And then basically make a second one. Yeah. Test database. But give it the same URL. Yeah.
01:08:11 - Dev Agrawal
Okay. So it uses the same database for testing.
01:08:17 - Anthony Campolo
Yeah. Obviously you don't want to do that, but for this example, that's what we're doing. Yeah.
01:08:24 - Dev Agrawal
So it's using the database for the automated tests, not some sort of a mock.
01:08:29 - Anthony Campolo
Oh, see, that's even better. That's what you want. You want to actually test with something that's going to resemble a thing that's going to run in some sense.
01:08:37 - Dev Agrawal
Fair. Yeah. But that does mean a test database.
01:08:42 - Anthony Campolo
Yeah.
01:08:43 - Dev Agrawal
I mean, I would like to not have one.
01:08:45 - Anthony Campolo
Test database button on Railway.
01:08:47 - Dev Agrawal
Yeah. Somewhere. Okay. So the tests pass. Let's make sure.
01:08:52 - Anthony Campolo
Yeah. Railway already has staging environments for you for your databases. It's super simple.
01:08:57 - Dev Agrawal
The day Redwood supports MongoDB, I switch.
01:09:02 - Anthony Campolo
We do. We support Prisma. Prisma supports MongoDB. I wrote a whole MongoDB tutorial.
01:09:07 - Dev Agrawal
Prisma is just not the greatest at it. The whole point of MongoDB is I don't. I shouldn't have to write a schema file then.
01:09:14 - Anthony Campolo
Then use the MongoDB client directly. There's nothing stopping you.
01:09:17 - Dev Agrawal
Sucks.
01:09:20 - Anthony Campolo
Then what do you want? You want to use MongoDB but not have to write MongoDB. Then don't use MongoDB.
01:09:29 - Dev Agrawal
There's. Yeah, there's some. If I start to express what I want, it'll take the whole. It'll take a couple hours.
01:09:36 - Anthony Campolo
Well, what you want doesn't exist is the problem. So you need to build yourself.
01:09:39 - Dev Agrawal
I know.
01:09:39 - Anthony Campolo
You can't just ask someone to build the thing you want that no one else wants.
01:09:43 - Dev Agrawal
That's the biggest problem. I have to like try to build everything on my own because the things that I want don't exist, which sucks.
01:09:51 - Anthony Campolo
A lot of times. You build the thing you thought you want, then you realize you didn't want and then you really feel dumb.
01:09:56 - Dev Agrawal
Yeah, I mean, it's better than not building the thing and living in regret.
01:10:02 - Anthony Campolo
Well, you wouldn't regret it. There's more regret if you build it and didn't want it then. If you didn't build it, then never know.
01:10:08 - Dev Agrawal
Okay, that's fair. All right, let renders a list of articles. Let's do expect. Let's give it some articles. What do you want? Type name post. Well, that's not gonna happen, so I'm just going to give you what do you want. ID title body created at id1test article body created at. See, this is what typescript gives me. I can write my tests for me at least.
01:10:43 - Anthony Campolo
Dude, ChatGPT would have written the test for me and I wouldn't have to type anything.
01:10:48 - Dev Agrawal
I mean, if it could have gotten some keys wrong this way.
01:10:54 - Anthony Campolo
What if it didn't?
01:10:55 - Dev Agrawal
It could have hallucinated.
01:10:57 - Anthony Campolo
How would you know? You gotta try.
01:11:00 - Dev Agrawal
So I want to just say I'm
01:11:02 - Anthony Campolo
not gonna use the things that may have done the wrong thing. I don't know if it would have, but it might have.
01:11:07 - Dev Agrawal
What is that to include? How do I test if there is. There are. There is some text in here. Can I start? Text to have text content. There we go. What do you want here? Another. Oh, you want another bracket. There we go. Okay, so let's see if this test passes. Should say 6 tests now. Last time there were 5 runs it from the top. So it doesn't only run the test that changed. Seems to run every test again.
01:11:45 - Anthony Campolo
I mean that'll be down to whatever testing library we're using, which is probably the standards react testing library. In jest.
01:11:52 - Dev Agrawal
Okay, so it did not have text content test article. I guess this only works for like very specific. Like I need to drill down to the title. Cannot just fuzzy match. See value must be a node. Okay, I haven't done much react testing honestly, so I'm going to skip this part for now. I do need to get get more into testing.
01:12:20 - Anthony Campolo
Do you though?
01:12:21 - Dev Agrawal
Yes, I do.
01:12:22 - Anthony Campolo
Do you really?
01:12:23 - Dev Agrawal
I do. Why it's great. It's fun. TDD is a lot of fun.
01:12:28 - Anthony Campolo
It's fun. It's different from need. You. You do something that's fun because you want to, not because you need to. If you need to, you have a reason. If you want. If you. It's fun, that means you want to do it.
01:12:37 - Dev Agrawal
I mean, it's also good. It ends up with like really nice code.
01:12:45 - Anthony Campolo
Does it though?
01:12:47 - Dev Agrawal
Kind of. I mean, it definitely increases my confidence in that I can freely refactor things without worrying about if.
01:12:54 - Anthony Campolo
Right. What happens when you refactor? But then your test break because your tests were coupled to what was written?
01:13:00 - Dev Agrawal
That means I wrote bad tests, which means I need to get better at testing. Which is why I'm saying I need to get into testing so I can get better at testing. Yeah.
01:13:10 - Anthony Campolo
Who's there? I don't know. Actually, there's ways to verify that your thing works. That's not like using a testing library. Like, to me, I test my thing by doing the thing that I want it to do and then I see if it does it.
01:13:23 - Dev Agrawal
Yeah, that's exactly what a test does. Just million times faster than I do. Wait, why am I scrolling up? Okay, run Storybook. Let's also run Storybook while we're here because why not Yarn Redwood, Storybook.
01:13:38 - Anthony Campolo
Ferris, those guys here. Dev, I like tdd, but I don't do tests.
01:13:42 - Dev Agrawal
I don't do react tests. I don't do TDD on the front end.
01:13:46 - Anthony Campolo
What do you test when you're testing? What are you testing?
01:13:49 - Dev Agrawal
Honestly, I haven't written code in a long time.
01:13:52 - Anthony Campolo
Did you just test that? So you don't write tests then?
01:13:55 - Dev Agrawal
I mean, I haven't worked on like a proper like for production software in a while now, so I've definitely been very much out of the loop for a few months now. So I don't do tests because I just don't write a lot of code these days. But TDD is definitely like, in my opinion, it's definitely the best.
01:14:17 - Anthony Campolo
But even the times when you have been coding and you built whatever projects you built in the last year or so, did you also write tests for those or did you still not write tests?
01:14:26 - Dev Agrawal
When I did, I was pretty happy. I would say that.
01:14:30 - Anthony Campolo
So when you did, you did write tests?
01:14:31 - Dev Agrawal
Yeah, not all the times I would have preferred to write tests because we started the project without testing, without tdd. So it's really hard to like, it's really difficult to introduce testing into an existing project than it is to start from scratch. So yeah. The times that I was writing new features from scratch.
01:14:51 - Anthony Campolo
This is a huge point here in Redwood's favor because Redwood is the only framework that will do that for you, that will set up your testing infrastructure and have baseline tests and give that to you. So at any point you decide you need tests, you will have at least something that you started with already.
01:15:06 - Dev Agrawal
Yeah, I definitely agree with that.
01:15:08 - Anthony Campolo
And no other framework has that. And no one ever talks about that.
01:15:12 - Dev Agrawal
Yeah, because front end people don't like to talk about tests.
01:15:17 - Anthony Campolo
I mean, they talk about more than ever.
01:15:20 - Dev Agrawal
Yeah.
01:15:21 - Anthony Campolo
Epic Stack's not a framework. It's a template.
01:15:24 - Dev Agrawal
It's a meta. Meta framework.
01:15:27 - Anthony Campolo
No, it's like. It's not a framework. He's never even called it a framework. No one has ever said React is a framework.
01:15:33 - Dev Agrawal
Yeah, it's a stack. The same way T3 stack is a stack, I guess.
01:15:37 - Anthony Campolo
No, see, create T3 app is a framework. Epic Stack is not a framework.
01:15:42 - Dev Agrawal
It's a cli, not necessarily a framework.
01:15:46 - Anthony Campolo
What else do you need? Redwood's a cli.
01:15:49 - Dev Agrawal
You also wired up a bunch of. I mean, I also.
01:15:52 - Anthony Campolo
Redwood is a CLI that does more stuff. Sure. Like Redwood does more stuff. Create T3 app is also a CLI. It does stuff for you. Redwood is a CLI. It does stuff for you.
01:16:00 - Dev Agrawal
But you don't import red create E3 app.
01:16:04 - Anthony Campolo
You don't what?
01:16:06 - Dev Agrawal
Like, you don't import create E3 app, you import redwood. You import from Redwood.
01:16:11 - Anthony Campolo
No, but you don't import the. Okay, so that's the Redwood client library, though that's not the Redwood framework.
01:16:16 - Dev Agrawal
Okay.
01:16:17 - Anthony Campolo
Redwood itself is basically a CLI that does stuff for. Which involves using a client library that was written by the same team.
01:16:24 - Dev Agrawal
So would you say the redbook framework is a combination of the client library and the CLI tool
01:16:31 - Anthony Campolo
along with other things? Yes.
01:16:33 - Dev Agrawal
Okay, so what are some other things? What are these other things?
01:16:38 - Anthony Campolo
So the main thing is the Auth library. Then it also gives you. Because there's a specific Redwood AUTH library as well. And then there's an API. So there's a library for the front end, a library for the back end, a library for Auth. Then the CLI that generates projects that uses all those libraries.
01:16:55 - Dev Agrawal
Okay. Okay, so I heard everything except for the Auth part. All right.
01:17:03 - Anthony Campolo
And most of that stuff is in Create T3 app. Create T3 app gives you all that too. They just didn't. The team also did not build the client and server libraries and Auth libraries.
01:17:12 - Dev Agrawal
Got it. Cool. Okay. Storybook. I guess we are not really at a point where we can take advantage of Storybook yet. Oh, it has zooms. Okay. I've also never used Storybook. Maybe you need to look into that at some point. All right. So I guess. Is that the end of the tutorial? Deploy. Not really doing that right now. So what? What more can we do? I want to see more.
01:17:39 - Anthony Campolo
Deploy it. We got to deploy it. It's not even a website yet.
01:17:42 - Dev Agrawal
I do got to deploy it. Do I really have to?
01:17:44 - Anthony Campolo
Yeah, deploy it. Of course you got to deploy it. There's a deploy step. Always deploy it.
01:17:49 - Dev Agrawal
Okay, let's do that then.
01:17:52 - Anthony Campolo
You haven't deployed it. You haven't built anything. So that's why I fully believe that I've never once written a tutorial that did not end with a deploy step. Your thing does not deploy. It does not exist.
01:18:04 - Dev Agrawal
Okay, got it. Set up. Deploy vercel. So we did that. What did that do in here? Or create a redwood. Toml. Of course it's a toml. Kind of wish more framework were using TOML files. It's not that bad.
01:18:22 - Anthony Campolo
That's a take I've never heard before. Tom would be so happy to hear that you're the first person to ever say something nice about Tommel.
01:18:30 - Dev Agrawal
Really? Is Tamil that universally hated? Why?
01:18:34 - Anthony Campolo
I don't understand why. I think Tamil's fine. Yeah. Write ridiculously complex code in these, like, small languages that were not meant to do the thing they're trying to do in them so they, like, get all butthurt about it.
01:18:46 - Dev Agrawal
Okay. I just need to push and stuff.
01:18:50 - Anthony Campolo
Do you have the GitHub CLI? It's awesome.
01:18:53 - Dev Agrawal
I think so. I do not. Apparently I had it in My Work MacBook last year.
01:18:59 - Anthony Campolo
Dude, you should start using it.
01:19:02 - Dev Agrawal
I use it quite a bit.
01:19:03 - Anthony Campolo
Copy paste. That command I gave you. That's the push everything command. It generates the repo and pushes it for you and gives you a description. You can do it all on a single CLI command. It's so epic.
01:19:13 - Dev Agrawal
I had a bunch of those commands aliased, and I used them quite frequently. I had one that stashes whatever I have right now and pulls everything or I like, switches to a different branch and then I had, like a bunch of different combinations. It's pretty interesting to play with GitHub CLI. But this one, I don't have it right in here. Don't use it too often. So I'll just do git commit m tutorial and I'll just do gp. Oh, nope. Nothing is defined because I Need to create a repo. So the other thing I can do is. Oh, I guess I. Every time I move you I have to resize you because of the tiling. But the other thing I can do is I can just do publish branch. I guess I have to move you again. But it'll create a repo and we'll just do that from here. So this is like one of the reasons why I didn't have to use GitHub CLI in the recently. Cool. So that's our repo does it automatically deploys to Vercel.
01:20:28 - Anthony Campolo
So then you have to basically just link the repo to Vercel. You just do it through the Vercel Dashboard.
01:20:34 - Dev Agrawal
Yeah, or I can just.
01:20:35 - Anthony Campolo
There's a way to do it with the cli, but it's easier to just do with Dashboard. You can do whatever you want. If you want to try it through the cli, go for it, but if it breaks, I can't help you.
01:20:45 - Dev Agrawal
Okay.
01:20:45 - Anthony Campolo
Linked to an existing Versal CLI too, so I would assume it's going to work. We'll see.
01:20:52 - Dev Agrawal
Yeah, it should probably detect that this was a redwood.
01:20:54 - Anthony Campolo
You got to give it the environment variable though, right there.
01:20:57 - Dev Agrawal
Yeah, it should automatically pick that up from env.
01:21:02 - Anthony Campolo
Really? Why is there an ENV flag for Vercel CLI then?
01:21:09 - Dev Agrawal
Probably like
01:21:12 - Anthony Campolo
before they handle it for you.
01:21:13 - Dev Agrawal
Yeah, before they started doing it automatically. Which settings would you like to overwrite? None.
01:21:18 - Anthony Campolo
That's good. I can remove some from the Create T3 app docs. Then there's a step where I have that first all command that says, yeah, use that.
01:21:27 - Dev Agrawal
I'm pretty sure it does that.
01:21:29 - Anthony Campolo
Although I find out.
01:21:32 - Dev Agrawal
Yeah, time to find out. I mean, we can find out right now. Go to Ursul Dashboard. Thanks for the follow. Nando 1x1 Damn. First follow in this entire stream. No production deployments. Cool. There's one deployment.
01:21:52 - Anthony Campolo
It takes a little while.
01:21:53 - Dev Agrawal
Yeah. If you go to environment files, environment variables. Okay, so it did not.
01:22:00 - Anthony Campolo
Yeah, I didn't think it would.
01:22:01 - Dev Agrawal
Yeah, I remember it doing that for me automatically, but I guess it doesn't do that anymore.
01:22:07 - Anthony Campolo
Maybe you imagined it.
01:22:08 - Dev Agrawal
Yeah, at least I can copy paste into it. There's still like, I wish I could copy paste. I would override other variables. Like it's like with these kind of settings, it's hard to keep a single source of truth because it's always in multiple places. All right, so while it's building, what is. What does React server components in Redwood look like?
01:22:37 - Anthony Campolo
Like a whole lot of pain for A whole lot of people for a whole long time for something that may or may not have any benefit, but we're doing it anyway. God damn it. Because you people won't shut up about it. And I honestly think that it's probably the right move in the long run. Okay. It's still in the works right now. I mean, honestly, we have absolutely nothing right now that we can show for beyond like some notion docs with a whole bunch of links and things that we need to do to make it work. So not super great place. I am thinking about kind of taking it on as like a personal project myself because no one else on the team is going to do it and I feel like that would be useful and it's like that would allow me to kind of get back into development with the framework also. So, yeah, it's basically, it's just like if you want to get involved, I can send you like for people. If people are watching right now and actually want to help with this, then we would love help because this is incredibly complicated and there's really not that many people who are doing full time development on the framework.
01:23:35 - Anthony Campolo
Even though there are a handful who Tom is funding. There's some notion docs we've got. We're kind of like coordinating the development. So the ones that you linked on Twitter. Exactly. Yeah.
01:23:46 - Dev Agrawal
Okay.
01:23:48 - Anthony Campolo
No, that's what I'm talking about. Yeah. So we want to create like a proof of concept. That's like the first thing we're working on and then research. So Parasol is just saying what is the main challenge? The main challenge is that to do this at all requires being an expert in Redwood and an expert in React server components, and that person does not exist at all. So either someone on Redwood has to spend a couple months learning how to react server components works and make Redwood work with it, or someone who knows React server components has to spend a couple of months to learn Redwood to learn how to make it work. So either way you can't point to a main challenge. The challenge is that you have to rewrite the entire framework to do this.
01:24:26 - Dev Agrawal
Yeah, I think even beyond what's up, Darren? I think even beyond just implementing it. Like the bigger question I have is that what does the API look like? How exactly do server components nothing will change into for you.
01:24:45 - Anthony Campolo
The person who writes Redwood code will have no idea anything changed.
01:24:49 - Dev Agrawal
See, I don't think it's possible to do that with server components.
01:24:53 - Anthony Campolo
Okay. That's their claim to fame. That if we can make that happen, which I know we can, then we can say that we did it and then finally people can say that, all right, we did something other people can do. Because that's the thing, is that it is entirely possible. Of course it's possible. It's code is Turing complete. There is nothing that's impossible in code.
01:25:11 - Dev Agrawal
I mean it's, it's possible, but like I'm looking at these components and it's just hard.
01:25:17 - Anthony Campolo
It's not impossible. Nothing's impossible.
01:25:19 - Dev Agrawal
No, I mean the point is that it's a, it's a very different paradigm. Like so what?
01:25:26 - Anthony Campolo
Like exactly. So the framework has to figure out when you want things to be in one place versus the other. So honestly, it doesn't change. It won't. If you already know how Redwood works, React Server components won't change the way you write Redwood code. It won't at all. And that's the point. Point of writing Redwood to have the clear front separation in the back, to have it have conventions so that you can just write it and have it work the way you expect it to. And then when the whole frame, the whole ecosystem breaks, that's up to the framework authors to fix, not you.
01:25:56 - Dev Agrawal
So you is in this case is a person who's using Redwood or the person who is writing Redwood.
01:26:04 - Anthony Campolo
The person who is using Redwood. The, the people who are writing the rubber frame themselves need to spend years figuring out how to make this happen. So they gotta do a lot.
01:26:13 - Dev Agrawal
Yeah.
01:26:13 - Anthony Campolo
Now what's happening now is the next T decided to split the difference and say we're gonna do most of it, then make the users have to think about some of it and now everyone's mad because they didn't do it all themselves.
01:26:23 - Dev Agrawal
True. Yeah.
01:26:25 - Anthony Campolo
Because they could have, they just didn't. They chose to make trade offs and have things that people on this, the user side would need to know to make it work. Where they could have spent more time to not do that. There's no fundamental reason why they had to make it that way.
01:26:40 - Dev Agrawal
True. Oh, I also just saw that this entire route set was generated for posts. That's cool. It definitely helps in a lot of ways. And the Vercel build is breaking, so I'll have to do it from the dashboard like you said.
01:27:01 - Anthony Campolo
Yeah, so I'm saying it's a different architecture. This argument breaks when you learn about use client and use server existing. Yeah. So use client, use server. You would never write those in a Redwood app.
01:27:12 - Dev Agrawal
Do you think that it's like having to write use client, use server is a problem?
01:27:18 - Anthony Campolo
Well, it's a thing that should be in the framework side. So we'll have to write that somewhere in the Redwood code to figure out what to do. Oh, wow. Yeah. So, yeah. So he's like, apparently your core team will have to be 10x better than the next JS team. They completely changed their core API due to RSC and it really affected everyone using the framework. Yeah. I mean, I can't speak for the Next team and say they made a bad decision. I know that it was a hard decision to make, I'm sure. And that if they wanted to. Right. In a way that would have been transparent to Next users, it might take them an extra year. So it's a question of like, would it have been worth it for them to take an extra year to ship it if it was going to not break anyone's code? You know, it's hard to say who. What. What you should really do in that situation. I'm sympathetic to the. To the next team being stuck in that dilemma. So. But the Redwood team, we're taking the tack that your app cannot break when we upgrade to React server components.
01:28:12 - Anthony Campolo
That is. That is a core. That is like a fundamental part of how we are doing this. If we end up finding out it has to break in one certain way for a certain reason, that might be the case. And it will clearly document and tell you what you have to do and it will be something so simple it will take you five minutes. You will not have to rewrite your entire app. If you have to rewrite your entire app. We failed and we would not ship that. We would not do that.
01:28:35 - Dev Agrawal
I think the other problem with Next JS was that they also realized that the Next JS patterns were not super useful or like, I mean, they were useful, but they could have done better. And it's not just that implementing rscs causes cause them to like create a whole new pattern to write Next js. It also that they made them realize that there is a better way to write Next JS using server components. For example, like Theo has done many videos on this on like how getserverside props and how the typing doesn't quite make sense. And Next JS is basically used as a single page app hosting site as a project where you can put both server and client code. That's really just it.
01:29:26 - Anthony Campolo
Can I use Clerk React server components in parasocial fix asking? I'm not sure what Clerk React server components even means or if even the Clerk team would say that's a thing that exists. You're on the clerk team. So what does that mean?
01:29:42 - Dev Agrawal
Yeah, I don't think Clerk react server components are a thing like all of our embedded components are.
01:29:47 - Anthony Campolo
Actually a question that funnily doesn't even make sense. So first, Redwood has been using clerk for a long time, so we have very good clerk support. There is no such thing as supporting clerk react server components.
01:30:02 - Dev Agrawal
Interesting. Command fail with exit code. Something. Command failure. Redwood Prisma Migrate Deploy data Migrate up. Some issue with data migration, I guess. Even though I have all the correct environment variables this time I don't see anything else in here. So we're going to skip the deployment for now. Can we skip the deployment for now?
01:30:27 - Anthony Campolo
Hold on, hold on. What? Sorry. Let me see the error message.
01:30:32 - Dev Agrawal
So it failed? Apparently.
01:30:37 - Anthony Campolo
Well, show me. Show me the whole build. The whole build output.
01:30:39 - Dev Agrawal
So you want to expand.
01:30:41 - Anthony Campolo
Yeah.
01:30:45 - Dev Agrawal
Okay. Database schema is not empty. Oh, it's trying to run a migration on empty database.
01:30:52 - Anthony Campolo
Yeah. So this happened to me before. We can fix this. If you wipe your railway database and do it again. It's up to you whether you we should do that. I think it's. I always like have an actual thing that actually works at the end just to. This is important. So all you have to do is just wipe it.
01:31:08 - Dev Agrawal
Actually, I don't know how to access my postgres database anymore. It's not here. This just creates a new. I guess we. There we go. It creates a new postgres database. Let's go.
01:31:18 - Anthony Campolo
Yeah. While you're doing this, there's an interesting question here in the chat. So someone's saying how you can have an opt in design to where you need to opt into react server components. That's likely what Redwood's going to do. But when I say opt in, I don't mean that you need to opt in by rewriting your code. I mean opt in by setting the opt in parameter. And like your red. There's a single Redwood configuration file where sometimes we have experimental features or whatever you can opt into. So it'll be like you'll write react server components true or something like that. And that means you'll turn it on. The reason why you want to do that is. Is because if there is something that is going to be weird about it that you need to be aware of, then you can kind of separate those two environments. That's kind of like this is because ultimately it's probably not going to be possible to make it entire everyone to be able to migrate with everyone not having to rewrite a single line of code. What happens is you end up with a small, small percentage of people who need to write a small percentage of code and a small percentage of app.
01:32:19 - Anthony Campolo
So you make it opt in so that that case does not break. So you save the edge cases from breaking. You make it opt in. But ultimately most people, that's not going to be an issue for this is for handling those specific edge cases. So hopefully that makes sense to whoever asking out of the crowd. These are really good questions. Though
01:32:42 - Dev Agrawal
I'd be more interested in seeing how it plays with GraphQL because React Server components are supposed to be their own. Like you fetch data directly in a component instead of outside in a GraphQL layer somehow. So that'll be the more interesting part.
01:32:59 - Anthony Campolo
Yeah, let's see. That's the question that no one is ever going to answer that question except Redwood. No one's even going to ask that question except Redwood or even attempt a solution to that question except Redwood.
01:33:11 - Dev Agrawal
Yeah.
01:33:11 - Anthony Campolo
So if you want to do that, like we're. We're your guys. You got no one else.
01:33:17 - Dev Agrawal
RCS will become the RCS will become the new.
01:33:20 - Anthony Campolo
Yeah, best.
01:33:22 - Dev Agrawal
Real quick. Yeah, go ahead.
01:33:23 - Anthony Campolo
I'll be back just in like a couple minutes.
01:33:24 - Dev Agrawal
It's deploying. Cool. So. Oh, there we go. It deployed. Let's visit this. There we go. It's empty right now. Let's go to slash posts and we can create a new post here. Hello world. And we can save it. There we go. Can I open this post? If I go to post id 1, what happens? There we go. We see post details and I can edit them. I can delete it. Cool. So this is not a. Not like an admin panel. It's more like a generate, like fully generated CRUD UI for everything. I think this can definitely see this being super useful but requiring like a lot of modifications for any real applications. And I'll be. I'll be curious to see if most people who use Redwood, like do they end up customizing a lot of this or do they end up like sticking to the same thing? How hard is it to customize if we just go to, let's say components, article, cell. So I guess this is not it.
01:34:51 - Anthony Campolo
What are you trying to customize?
01:34:53 - Dev Agrawal
So I was wondering. There we go. So the ui, the pre generated ui. I'm wondering how many people who use red would end up like either completely removing them or heavily customizing them or just taking the same thing.
01:35:11 - Anthony Campolo
What would you want to customize?
01:35:15 - Dev Agrawal
I don't know. This thing can get pretty complicated. I'm assuming this doesn't automatically do includes or like relationships. Like if I have a post.
01:35:27 - Anthony Campolo
No, Prisma handles relationships.
01:35:30 - Dev Agrawal
I'm saying the ui. Like is there going to be an author field in here that's going to have my data or like link to a slash user slash my user ID or something like that?
01:35:42 - Anthony Campolo
I have never scaffold it with a Prisma relation to see what would happen. I'm very curious now to see what would that. It should. It should at least give you an input field to edit and do the crud thing. I'd be extremely surprised if it did not. And if so, then our scaffolds are broken right now per relations. There's no reason why it shouldn't the. I mean it. You shouldn't have to customize the functionality. You can customize the look. Sure. But I think most people won't because it's not for. It's not an externally facing thing. But there's a. There's a point in this tutorial where they add a comment, an article comment. We should use that because then we'll ensure we're at least. If it doesn't work, it's not because we wrote code that didn't work. So let me grab that real quick.
01:36:28 - Dev Agrawal
Is that a different tutorial?
01:36:31 - Anthony Campolo
It's not in my gist, but it's in the Redwood tutorial. So you can just go to redwoodjs.com and check out the docs they're going to be in.
01:36:38 - Dev Agrawal
The tutorial reminds of Rails admin panel stuff.
01:36:43 - Anthony Campolo
Yes.
01:36:43 - Dev Agrawal
Because the creator of Redwood or one of the creators of Redwood is a heavy Rails user.
01:36:49 - Anthony Campolo
Yeah, exactly. Yeah. So a lot of this stuff. So already apparently this is not. So someone asking if there's like. If this is like the Redwood Studio. So there's a. There is an idea called the Redwood Studio which is a whole. It gives you a whole bunch of other stuff. So this is like brand new and I haven't even used it yet and I don't think it's even done yet, but something to check out. So it gives you kind of like also logging and things like that. So that's going to be like super, super sweet. Should watch how long is that video? Okay, it's 10 minutes. Yeah, let's not watch that. Yeah, interesting.
01:37:30 - Dev Agrawal
So this is not just Prisma Data Studio.
01:37:34 - Anthony Campolo
No, no. This would be for your Redwood app entirely, not just your database. If you want to use a Prisma Studio, just use Prisma Studio. Like we give you Prisma. So Prisma Studio is.
01:37:41 - Dev Agrawal
So this is like a place to like monitor the production server, something like that.
01:37:48 - Anthony Campolo
I think the idea is to test it in dev. Like it was a production server running in a production environment.
01:37:57 - Dev Agrawal
Okay, let's see if I can scrub through this a bit. Dev companion. This looks pretty good. I think a lot of people are doing some interesting stuff with dev tools. Nest just released their own.
01:38:09 - Anthony Campolo
This is a command line tool. Yeah. So it's definitely local. It's not for deployment.
01:38:15 - Dev Agrawal
Looks like it has like, SQL queries, open telemetry traces.
01:38:19 - Anthony Campolo
Yeah. Really interesting. Yeah. And like I said, this is. This was just announced a couple months ago, but looks pretty cool.
01:38:28 - Dev Agrawal
Okay.
01:38:30 - Anthony Campolo
And it says you can use it now, I guess in beta, but there you go.
01:38:34 - Dev Agrawal
So very exciting. Nuxt. Dev tools are insane too. I'll check that out on my next framework Friday. I did one nuxt already, but I might revisit some of these frameworks at some point. I definitely want to revisit Nuxt and Laravel and I might just do other frameworks that I've already done before.
01:38:54 - Anthony Campolo
Yeah, that's the only reason I liked. I have this series of posts I call a First look at X and it's just like I just pick, you know, kind of like we were doing with these streams. I just pick a thing and then I write a blog post about it and then. Yeah, you know, it doesn't make you an expert in it, but at least gives you a sense like what all these things are and why you should use one together.
01:39:13 - Dev Agrawal
Okay, so I want to create a new migration because I just added tags in here. Host the Prisma migrate, migrate dev name tags. Or do I need to run Prisma generate first? Oh, no. Or Dev automatically looks at the schema file, I think. Yeah, I think so. It does. We need to reset the public schema at this. Sure. Unless it like to. Unless Railway tore down my database in the meantime.
01:39:51 - Anthony Campolo
Now it didn't.
01:39:52 - Dev Agrawal
Cool. Database is now in scheme in sync with my schema, so I can now create a new cell. Redwood. Okay. I'll just type it out.
01:40:06 - Anthony Campolo
Yeah.
01:40:06 - Dev Agrawal
And red word generate Cell. Right. And I can call this tags. Wait, no, it's not cell. Scaffold.
01:40:18 - Anthony Campolo
Yeah, you want to scaffold.
01:40:22 - Dev Agrawal
Scaffold. What was it? Tag.
01:40:27 - Anthony Campolo
The fact that you're already just writing commands on the fly, though, shows how simple and easy it is to pick up the CLI and start working with it. That's one of the arguments people make against using something like this. They're like, oh, well, it has all these opinions. I learned it takes time. Like Getting the conventions. This is like well what if it actually just took you two hours to learn? Like what then would you do it?
01:40:49 - Dev Agrawal
I mean, it wasn't even two hours really so.
01:40:53 - Anthony Campolo
Well, you're lucky because you had the premier Redwood educating Redwood education expert in the world and helping you. But most people would not be able to pick up everything that quickly. They would have to actually read through, go through the tutorial and read the docs and kind of put the pieces together themselves. So. But that's why I say just watch a video of me explaining it to someone, then you'll get the same thing.
01:41:16 - Dev Agrawal
Or watch the stream again. I just watched the stream at some point but I've also like used a bunch of other tools that do like similar like yeah, the more frameworks you
01:41:26 - Anthony Campolo
learn, the faster you'll, you'll get. You'll be able to learn them.
01:41:30 - Dev Agrawal
So no tags. Let's create one JavaScript in brackets fud. Okay, so no posts in here, but if I go to posts, do I see it in there? No posts. Let's. Yeah, I mean yeah, Redwood and I don't see anything for tags in here. Yeah.
01:41:59 - Anthony Campolo
Okay, now, now I know, hold on, hold on. There's an entire docs page for this. I was like pretty sure this is come up for people talk about this before. Now, now I know here, here you go.
01:42:10 - Dev Agrawal
Relations. All right. Many too many relations.
01:42:14 - Anthony Campolo
This will explain how to do it.
01:42:17 - Dev Agrawal
CRUD requires an id. Currently requires. Okay, that makes sense. So if I go to schema, do I have an id?
01:42:27 - Anthony Campolo
Great. I have tag point in Redwood's favor. The times you do hit things that may be a little complicated or edge. Casey, we have lots of well written docs that are very thorough.
01:42:39 - Dev Agrawal
Wait, the tags. This has an id. This has an id. Okay. Made to many creating table without a single field mark with an ID attribute. Oh it uses id. But this is for many to many. So like tags products on tags and so this like a product can have many tags and here a project can only have one tag. So this page doesn't fully apply. Yeah, this is specifically for many to many relations.
01:43:18 - Anthony Campolo
Okay, let me see. So we want to find something with the scaffold command is what you're trying to figure out how to do basically scaffold. Here we go. This is a community post which may or may not actually solve it but it's really, really old.
01:43:37 - Dev Agrawal
Generate a new. Okay.
01:43:39 - Anthony Campolo
Oh, I'm sorry, yeah, don't read that one, read this other one. We have fairly like any open source. No, see this is what I was about to say. Like any open source project, there's all this like legacy stuff and discussions and things, but we made sure to put this all on the forums from the beginning with good SEO, so you could always Google and find these things in ten seconds.
01:44:05 - Dev Agrawal
Got it. Prisma. Okay, this is also very old. No, there is saying we had support
01:44:12 - Anthony Campolo
for back then though we should have supported for it.
01:44:17 - Dev Agrawal
Scaffold probably can send scaffold posts, but when you run dev and try to create a no post, you'll get an error. I don't get an error looking at the service file that we generated. Here's what the main looks like first.
01:44:29 - Anthony Campolo
Something I should point out is that I think a lot of this is going to be from the perspective that you started with both of them written, both schemas written with the relations in there, and then run the scaffold command. Whereas you did the scaffold command twice, which I would not. That's like if you don't know they're going to be there in the second one, how would you know in the first to be able to account for that in this? So I think the way we did this fundamentally should not work for anyone because it's absurd to think it would.
01:44:53 - Dev Agrawal
Yeah, I don't expect to re. Scaffold. Yeah, I don't expect the first one to change, but I run Scaffold after changing this. So like the post model, I'm not expecting that to change, but I added the model and then I ran Scaffold and this has the relation in it. I ran it for this. That's fine, it's not a big deal right now. But all I'm saying is that there would probably be requirements to update to customize this, maybe add custom actions, maybe only show some set of data.
01:45:27 - Anthony Campolo
What's a custom action?
01:45:29 - Dev Agrawal
Maybe let's say this is to dos. So instead of show, edit, delete, you would want a complete to do button. So just like something like that,
01:45:40 - Anthony Campolo
we can't account for every single thing anyone could ever want to do an app.
01:45:44 - Dev Agrawal
Yeah. No, all I'm saying is that yes,
01:45:46 - Anthony Campolo
people eventually have to find things to customize if they want to turn this into an actual admin dashboard. Does everything that an admin dashboard can do that is built as an admin dashboard. Yeah. So it's like a question what do you want to do with it and why?
01:45:59 - Dev Agrawal
No, yeah. What I'm wondering is that do most people like customize this, this generated UI or do they like create their own from.
01:46:07 - Anthony Campolo
I'm not sure. I don't know how much people running redwood in production use scaffold at all. You know, I think part of it is that we, it's, we want this thing to be something where you could like build fast also and stably. So in that sense like being able to have something like that that just like, you know, works is really useful, especially if you're like we're building with no money and stuff like that. So you know, that's kind of one of the things that's really aiming for. But the, it can be customized at a certain point. But like we can't anticipate all the ways that could kind of happen. So at a certain point we have to say we're going to give you up to this point and after that you have to figure out things yourself. So like we want to give you as much capability as possible, but like at a certain point, you know, you, the space of things you can do is infinite.
01:46:56 - Dev Agrawal
Yeah. And I'm definitely like, I wasn't asking if like they customize it at all. I'm sure like they do. It was mostly like do they like, is it more helpful in general to customize or to just create from scratch? I guess that really depends on the use case. That cannot be answered in general.
01:47:16 - Anthony Campolo
Yeah, I think the scaffolds are good for doing basic crud functionality with your backend. Like that's, that's what it's for, that's what it's always going to be for and like that's good I think. And that's kind of like, that's like the point. So that's why once you get into a large scale production app, scaffolds don't become as necessary because your data models hopefully should be fairly stable. And if you have to like rewrite your whole backend and rewrite your whole scaffolds, like that can be a whole huge thing. But for the most part like you're using the scaffolds when you're prototyping, when you're getting set up, when you're learning how the thing works. Yeah, and it's useful in that step for sure.
01:47:53 - Dev Agrawal
Cool. So should we add some API endpoints then?
01:48:00 - Anthony Campolo
Do you have time for what? What do you mean add an API? Well, what will be the API endpoint for? Like we have a GraphQL server. So like what do you want to do?
01:48:09 - Dev Agrawal
I don't know. So do the API endpoints go into GraphQL as like custom mutations queue?
01:48:16 - Anthony Campolo
So right now your Whole back end is a single serverless function shoved into a GraphQL handler. There are no other API routes.
01:48:23 - Dev Agrawal
Right.
01:48:24 - Anthony Campolo
You can create a custom one. If you want to do a bespoke thing you can't do through your GraphQL schema, I would recommend, I guess, not doing that unless you absolutely have to though.
01:48:32 - Dev Agrawal
So does everything just happen on the front end directly on the GraphQL schema? Like if I want any custom backend logic, where does that go? Like, okay, so you can write, you
01:48:42 - Anthony Campolo
can write Prisma logic. You have a Prisma. You have Prisma queries.
01:48:47 - Dev Agrawal
Okay, let's, let's come up with something. We have a post here. Let's come. Let's do an. Like, when you create a new post, it has to be approved before it's shown here. So maybe in the article cell. I want to make sure that this only fetches the approved post posts. Let me first add a third data model, Prisma and let's say approved there default is false. And I'm just going to run the migration again, post approval and that's going to take a while, but in the meantime. So now that I have this, Where do I add the query to only get the approved posts in here somewhere? I don't know. GraphQL.
01:49:42 - Anthony Campolo
So you could do it. It depends. You say you want, like you can do it on the front or the back end. You could filter it in the Prisma query, or you could filter it in the GraphQL query. I mean I would usually use show me both ways. So let's do it on the client because that's the way I'll know how to do it. So add it to. So in your articles query, make sure you got query for that also as well.
01:50:05 - Dev Agrawal
Where do I add it exactly?
01:50:06 - Anthony Campolo
I don't know in the query. So where it says ID title body created at after created at. Add another line.
01:50:13 - Dev Agrawal
Oh, approved in here. Okay, yeah, that's it.
01:50:19 - Anthony Campolo
And then you'll have to like write some if. Then logic. Say if it's approved, show it. If it's not, don't. Something like that.
01:50:26 - Dev Agrawal
Oh, so you mean in here like in success? I mean. Yeah, in the success. Okay, so I do a filter in here, right?
01:50:35 - Anthony Campolo
Yeah, yeah.
01:50:36 - Dev Agrawal
Okay, but I want to do it on the back end. Like I don't want to do it
01:50:40 - Anthony Campolo
in a Prisma query. Okay, so you're doing the Prisma query.
01:50:43 - Dev Agrawal
All right, so where do I find this Prisma query?
01:50:46 - Anthony Campolo
So API src
01:50:52 - Dev Agrawal
Services Services posts post ts. There we go. Okay, so in this One here.
01:51:01 - Anthony Campolo
Yeah. So this would be when you filter within the posts. Yeah, exactly.
01:51:08 - Dev Agrawal
Approved. Cool. So default is false, which means right now we should see none. But now if I go to slash posts, I'm still going to see.
01:51:25 - Anthony Campolo
Actually I want. When I was in the bathroom. You're talking about the deployment. So I want to mention is that there's a very important caveat with what I'm showing you in this tutorial, which is that there's a step we skipped, which is the authentication step. So we skipped the part where we would hide the dashboard so people can't delete your posts online. So that's obviously not correct. And that's because I do this as an abridged versus addioff. Takes forever. In hindsight, probably would have made a lot of sense to add clerk to this. So maybe we could do that.
01:51:54 - Dev Agrawal
Yeah, I mean, we don't necessarily have to right now.
01:52:00 - Anthony Campolo
It would be fun though. I'd actually like to get a sense of what would happen if you try and use our clerk integration right now, obviously. Because if anything breaks, you would be the person who would be a good person to relay that.
01:52:11 - Dev Agrawal
Cool. Yeah. Right now I'm trying to figure out cannot query approved on type post.
01:52:18 - Anthony Campolo
That's because you. The types are different now or you might need to update your schema.
01:52:25 - Dev Agrawal
How do I do that?
01:52:27 - Anthony Campolo
So go look at your schema and API src.
01:52:33 - Dev Agrawal
API src GraphQL.
01:52:37 - Anthony Campolo
No, scroll up. Yep, yep. And then GraphQL. Yeah, exactly. Yeah. And SDL, your post STL.
01:52:44 - Dev Agrawal
So this didn't get automatically added in here.
01:52:49 - Anthony Campolo
So this gets created when you run the scaffold command. So this is why I'm saying you would want to. If you're going to.
01:52:56 - Dev Agrawal
It.
01:52:57 - Anthony Campolo
It's. This is why. This is why the scaffolds kind of get in the way at a certain point, because if you keep changing stuff, we don't have another scaffold command to look at everything and then create redo it for you. Like, that's not a thing.
01:53:08 - Dev Agrawal
So can I like throw away and regenerate the GraphQL types? Is there like command to just generate the GraphQL types based on Prisma?
01:53:19 - Anthony Campolo
There's, I think there's a generate SDL command. So that's the one you're probably going to want to use.
01:53:24 - Dev Agrawal
Yeah, let's try that out. Np not npx. Yarn redwood. Generate sdl. Can I just do this and then
01:53:39 - Anthony Campolo
the name of the model. Yeah, I get the name of the model after.
01:53:41 - Dev Agrawal
Okay. Oh, there we go. So SDL post.
01:53:51 - Anthony Campolo
So just delete it and then run that command and see what happens.
01:53:53 - Dev Agrawal
Okay.
01:53:54 - Anthony Campolo
Yeah.
01:53:55 - Dev Agrawal
Which one does. This one.
01:53:57 - Anthony Campolo
And that probably be a thing that we could add is that I could check to see if you already have one, ask you, hey, you want to wipe it and redo it? That'd probably be a nice little change.
01:54:06 - Dev Agrawal
So it wrote that file but not the other one. That's fine.
01:54:09 - Anthony Campolo
We'll delete all of them.
01:54:10 - Dev Agrawal
I'll delete all of them.
01:54:11 - Anthony Campolo
Delete all the. Yeah.
01:54:14 - Dev Agrawal
Post scenario.
01:54:18 - Anthony Campolo
Everything. Yeah, exactly.
01:54:22 - Dev Agrawal
What is SDL again?
01:54:25 - Anthony Campolo
Schema Definition language.
01:54:26 - Dev Agrawal
Schema Definition language.
01:54:29 - Anthony Campolo
Yeah, it allows you basically type your thing without having to use a ridiculous thing like typescript.
01:54:34 - Dev Agrawal
That's fair. And now I can go in here and I can say where published is true or not published approved is true. And I guess in here is where I would be using Clerk or like whatever AUTH library to figure out this should be true or not.
01:54:54 - Anthony Campolo
No. So we have a whole RBAC implication. Like all sorts of. Like a lot of the AUTH stuff is kind of built in terms of seeing, deciding when things can be seen and why. Those are things that are built into the framework.
01:55:08 - Dev Agrawal
Okay. I think we definitely might need a whole another stream to do like Redwood
01:55:18 - Anthony Campolo
and Yeah, we should. We should schedule a second stream where we go through the Clerk integration and look at things like RBAC and like all that kind of stuff. Because that's. I don't know a whole bunch about. Because I, you know, don't have a lot of production apps with users, so. But it's obviously super, super consequential something. We do that again, no one else does say, well, the EPISTAC has auth. Do they have our back though? I bet they don't.
01:55:45 - Dev Agrawal
Nice.
01:55:45 - Anthony Campolo
Like they have a. They have a package installed. You're correct.
01:55:52 - Dev Agrawal
Cool. So yeah, I also need to generate these components again. So I'm just going to.
01:55:59 - Anthony Campolo
Yeah. So this kind of. Why those. Like I don't. This is. I'm not sure this is necessarily something you'd want to write yourself because we have role based access control. So if you wanted something to be approved or not, you want something to be able to approve it and so on. The ability to see it and not see it. You'd use the RBAC implementation. You wouldn't write that yourself.
01:56:18 - Dev Agrawal
What's up? Yeah, I don't feel like going through these and changing them and I don't quite feel like.
01:56:26 - Anthony Campolo
Yeah, it's all fine. I think this is a good place to kind of stop and Like, I want to hear your take on redwood, you know, like, what are your thoughts? Do you feel like. Okay, first question. Do you feel like Your lack of GraphQL knowledge held you back from using this framework?
01:56:40 - Dev Agrawal
Not yet, for sure. Cool. My lack of redwood generators, I guess. Yeah, no, I'll just say no to that for now.
01:56:50 - Anthony Campolo
Yeah. And technically you don't need to use any of the generators. We could have written all this code from scratch. What the generators do, they, they ensure that the right files are in the right places and have the right conventions generally. This is what I say about maybe letting you just write business logic, because all your files, you already know where they need to go and how they connect to each other is already predetermined. And, and you have a tool that makes sure that is done correctly every single time. Then you just end up in a situation where you're like, okay, I need to do this. I need to go to this place to write the code to do it.
01:57:21 - Dev Agrawal
Yeah, the generators definitely help there a lot. I wish more frameworks use generators. I understand why they don't.
01:57:27 - Anthony Campolo
Well, they can't because people won't accept having a project structure. People won't be able to write their projects however they want. So you can't have a CLI generate stuff that does things reliably unless going somewhere reliably does something.
01:57:39 - Dev Agrawal
File system routing. That's some structure, I guess, right?
01:57:44 - Anthony Campolo
Just a little bit though. Like, that's only for the file. Like, what about components? Like, what about things that don't have to do with routing? You know.
01:57:51 - Dev Agrawal
Sorry, my headphone disconnected for a second. What? Can you say that again?
01:57:55 - Anthony Campolo
Well, saying that applies specifically to routing. So that ensures that when you. You go to a certain page, you want that page to be there. That's going to work, but it doesn't account for everything else that could that has to do with product structure. Like where do your components go and how are they important? How do your layouts respond to the content that is nested within the layouts? How is the front end relate to the back end? Where is like all those things?
01:58:17 - Dev Agrawal
Yeah. Are the layouts used by the routing library or are they just here? Go ahead.
01:58:24 - Anthony Campolo
So the layouts allow you to have something that will route changes. So if you have. So if you want a nav bar or something like that, you put in the layouts and then that is that you just have you import. Import a layout and then wrap the page with the layout stuff in the top and bottom. So it's the same way layouts work in most REACT frameworks.
01:58:45 - Dev Agrawal
Okay. So yeah, I definitely very much enjoy all the auto generated and the fact that it comes like fully pre built with routing with Prisma, GraphQL, Storybook and everything. Big fan of testing. Now a lot of these are just personal preferences, which is like I don't like necessarily having to separate my server code from my client code. I'm a fan of. I'm kind of a fan of colocation. So again, it's just a personal preference. This is why I.
01:59:18 - Anthony Campolo
Why?
01:59:20 - Dev Agrawal
Because code that changes together goes together in my head. So a lot of times the code
01:59:26 - Anthony Campolo
is not going to change together though. You don't change the back end and front code at the same time. You change the front end code once you want to do something on the front end, but the back end code does not need to be changed in tandem with the front code. Unless you're trying to both prototype the front end while also prototyping your data model, in which case exactly like it's. But okay, so that is exactly what
01:59:46 - Dev Agrawal
I'm trying to do.
01:59:48 - Anthony Campolo
Okay, then like split screen between two. Like you. So what do you. What would you want to be able to add? So you want to be able to add your Prisma query at the same time as. So you wouldn't change the Prisma you. Because you can change the graphical query at the same time. You can change all this stuff. So I don't know, it's just like what do you want to be in the same place? Why do you not just have a single file then for your entire project?
02:00:09 - Dev Agrawal
I have a single file for the individual, not necessarily a single file. I do have to separate them because that's how tools work, unfortunately. I would love.
02:00:18 - Anthony Campolo
So where do you choose to separate them and why and how and what are the implications of those separations?
02:00:22 - Dev Agrawal
So I choose to separate them wherever the tool kind of dictates me. I would prefer to not dictate.
02:00:28 - Anthony Campolo
Or the tool doesn't dictate anything. What if the tool does not dictate anything and you can just choose if that.
02:00:34 - Dev Agrawal
So if that doesn't happen then I am a big fan of vertical slices. I was talking about that on Ryan's stream as well. This is like one of the big reasons why am I why I'm excited about rscs? Because it means I can fetch my data, I can show my UI and I can have actions. Like literally all three things that I need can be in the same. Not just in the same file but like literally in the same component that I Can export and use.
02:00:59 - Anthony Campolo
That's what a cell is. That's literally what a cell is.
02:01:02 - Dev Agrawal
A cell. Are you talking about, like, that's what a cell is?
02:01:07 - Anthony Campolo
Yeah, yeah, yeah.
02:01:09 - Dev Agrawal
It's the states and then it's the endpoint. But like, this is direct. Like this is directly talking to my. Like it's directly doing crud on my Prisma database. Right.
02:01:21 - Anthony Campolo
It doesn't have to.
02:01:22 - Dev Agrawal
There's no server code running here.
02:01:25 - Anthony Campolo
Well, it's a query that gets sent to the server.
02:01:28 - Dev Agrawal
Yeah. And the query executes on the server. Like, I cannot write code in here that runs on the server.
02:01:36 - Anthony Campolo
Right. So you would. So when you're. So what you're talking about where you're writing vertical slices, then. So basically the only difference is if you took what's in your services. So go to your posts. Post near services.
02:01:47 - Dev Agrawal
My in the API or in the API?
02:01:50 - Anthony Campolo
Yes, API.
02:01:51 - Dev Agrawal
Yeah. If I can go in here. Services, post.
02:01:55 - Anthony Campolo
Yeah. And then services. Yeah, posts. Yes, go post. So you want to be able to copy paste this whole thing and put in your cell.
02:02:04 - Dev Agrawal
Copy paste this whole thing. Put it in my cell and then get rid of like, more than half of it.
02:02:10 - Anthony Campolo
What if you then crazy idea. You have both open split screen at the same time in your editor. How about that? That's a nice solution, right? It doesn't require three years rewriting a framework to make it happen.
02:02:25 - Dev Agrawal
Maybe. But like, I still have like, the. The. The point is not that I can copy paste all of that in here. The point is that I don't need this.
02:02:34 - Anthony Campolo
No, I'm saying having two things is the same as having one giant thing and having to scroll up and down. Like, what's the difference? You can only have like so much stuff on your screen at one time. Like, it's so inconsequential.
02:02:46 - Dev Agrawal
That's fair. Like, I'm just not able to come up with, like, good arguments in favor of.
02:02:51 - Anthony Campolo
Because you don't want to split screen two things. Because you prefer to scroll up than look to the right.
02:02:56 - Dev Agrawal
I split screen quite often. It's more like.
02:02:59 - Anthony Campolo
So that's the same thing. You split screen when you can't see it all in one thing and you do that in a single file anyway.
02:03:06 - Dev Agrawal
That's fair. Yeah.
02:03:07 - Anthony Campolo
And the fact that they're separate means that you won't accidentally change something on the server without thinking about it. Because that's the thing is by allowing people to do that without thinking about one or the other, that's how you add bugs that mess up your server. If you always have your server code one place and you're writing something on the server, you'll always know you're writing something on the server so that you ensure that you don't do something that you shouldn't do on the server or if you do something on the client that shouldn't be done on the server. There's. There's lots of things that only are supposed to be done in one place.
02:03:35 - Dev Agrawal
Yeah. And those boundaries are great to have in most scenarios for sure. Again, like I said, it comes down to personal preference.
02:03:43 - Anthony Campolo
It seems like it's a preference for a reason that has so many downstream consequences.
02:03:46 - Dev Agrawal
No, it's the reason that I cannot explain. That's it. Like it's a reason that I'm having trouble explaining.
02:03:52 - Anthony Campolo
Yeah, you can't justify. That's why I feel confident that I'm the one who has made I feel more secure in my position. That you can't justify and that's fine. Like people can do things for no reason. I'm fine with that. I'm just saying you have to admit that I do this because I have no good reason.
02:04:07 - Dev Agrawal
No, I'm not saying I don't have good reason. I'm saying that it'll take a well prepared YouTube video for me to figure out how to explain that reason. That's what I'm saying.
02:04:17 - Anthony Campolo
Okay, well I would say at this point then I would consider that no good reason now. Welcome seeing the video. That's fine.
02:04:23 - Dev Agrawal
Yeah, that's completely fine. But this still has a lot of exciting stuff and I'll be playing around with it for sure and definitely do another stream on this.
02:04:36 - Anthony Campolo
Yeah, thank you very much to see how the clerk stuff works.
02:04:41 - Dev Agrawal
Yeah, thank you very much. I'll most likely just like end immediately and maybe I might go live again like in a, in a couple or in a few hours or so. Or I might just go live tomorrow. I'm def. If I don't go live again later, I'm definitely going live tomorrow. And that's my cat trying to say hello. Hi. Yeah, thanks for having me.
02:05:02 - Anthony Campolo
I super. I always super enjoy showing rover to people because I learn a lot just by people asking me like, you know, how do I do this thing? That's like, you know, well, why do I do it like okay, that's fair. How to do, you know. So I always super yaki guys. I used to do these all the time and don't as much anymore. But yeah, I don't know. I wish more people would at least try redwood. Everyone gets the pitch for Redwood then decides they don't like it before they even use it, which I think is unfortunate.
02:05:27 - Dev Agrawal
That's fair. Yeah. Cool. Now I'm. If I end up deciding that I don't like it, it'll be after I've used it.
02:05:36 - Anthony Campolo
It's hard to. Well, you might decide that it's not suitable for the types of thing you're currently building and that's fine. You know, it's, you know, it's only good for certain things anyway. It might not be the type of thing you're building, but most people assume it's not going to be good for the type of thing they're building for reasons that don't, I think, necessarily hold together.
02:05:52 - Dev Agrawal
Honestly, it's probably a great thing to, for me to use for my projects. It's just that my personal preferences are getting in the way.
02:06:00 - Anthony Campolo
Yeah. And someone's asking what's not suitable. I would say Redwood's not suitable for someone that doesn't have a database. You know, if you're building something that could just be static content, then don't use Redwood. I would say if you don't need like a whole client side library, maybe you're building an API and you then you know, you could use Redwood just as an API and you know, that's fine but kind of weird. And yeah say if you're building anything that's not a full stack app with the database.
02:06:29 - Dev Agrawal
Actually this reminded me of my, of another question that I was going to ask. What's you're talking about the history of Redwood. There was also a part in there about the startup fund. I want to hear more about that if whatever you know about. Yeah. The startup fund and whatever. Like, like when I look at like go to Redwood Docs and see like whatever stories it seems like like obviously beyond Redwood being a framework or React framework, it's also a thing that helps start up. Yeah.
02:07:03 - Anthony Campolo
So something I like to say is people ask me, you know, who, who can or like who created Redwood or who, you know, maintains Redwood or something like that. I say it's the passion project of an eccentric billionaire.
02:07:14 - Dev Agrawal
I remember that.
02:07:15 - Anthony Campolo
Literally what it is. Yeah. And so Tom is independently wealthy and he chooses to give small investments in companies that build with Redwood. So both incentivizes companies to use Redwood. So yes, stack of cash pretty much guaranteed and it guarantees that Redwood will have users of their framework and we'll be building real things with it. Not like toys toys but actual production apps. And yeah, so it's been, it's Been really great. And there's this, you know, landing page site for it that's really nice and lists a bunch of the companies that are doing it. You'll see Everfund, which is my co host on the FSJAM podcast, Christopher Burns. And so, yeah, and he also specifically invests in climate focused companies as well. And he also funds actual developers on the team. So there's like whole bunch of ways in which Tom is supporting not only with his time and ideas, but with his actual putting his money where his mouth is. And so like these are again more good reasons to use the framework that no other framework is. Like, hey, use our framework, we'll give you 50,000. You're giving me $50,000? Like where else can that, can you do that?
02:08:28 - Anthony Campolo
Nowhere,
02:08:31 - Dev Agrawal
honestly. Again, this is one of the bigger reasons why I'm like, why am I not using redwood for my projects, specifically the one that I want money.
02:08:41 - Anthony Campolo
Because GraphQL is too complicated.
02:08:44 - Dev Agrawal
Yeah, I don't know if that was the reason.
02:08:46 - Anthony Campolo
That's the reason you gave me when I was saying something about redwood. You're like, yeah, but the GraphQL abstraction. Yeah, but then use this. Shut up Dev.
02:08:53 - Dev Agrawal
Yeah, but then you proved me wrong.
02:08:55 - Anthony Campolo
So
02:08:58 - Dev Agrawal
you immediately told.
02:08:58 - Anthony Campolo
This is why we're friends. Because you're open minded and you're actually able to be convinced that there's things you don't know about the world.
02:09:07 - Dev Agrawal
I mean, yeah, I wouldn't say it's a great. Are there people who think they know everything about the world?
02:09:14 - Anthony Campolo
Most people think they know everything about the world.
02:09:16 - Dev Agrawal
Really.
02:09:16 - Anthony Campolo
Very rare. I meet people who think there's things they don't know. Very rare.
02:09:20 - Dev Agrawal
There's more things that I don't know. Thank you. Things that I do know.
02:09:24 - Anthony Campolo
Well, that's the thing is once you realize how many things there are to know, you realize it's impossible for you to ever.
02:09:29 - Dev Agrawal
Yeah.
02:09:30 - Anthony Campolo
Have there be more things you know than don't know very much.
02:09:33 - Dev Agrawal
Like it's simply impossible to just read through Wikipedia and learn everything. Like, and that's still just a subset.
02:09:40 - Anthony Campolo
I Wikipedia. Choose your own adventure for like hours. Just like guys rabbit holes. I'll read like the history of the French Revolution and stuff and it's like crisscross through all these different biographies and people and it's just like history is so vast.
02:09:56 - Dev Agrawal
That's why your hot takes don't get voted on Twitter. That's fine.
02:09:59 - Anthony Campolo
Why? What's he saying? Why? Oh, because you. Oh, because you don't think. Because you're oh, you have an old mind. Don't insist you're always right all the time.
02:10:06 - Dev Agrawal
That's fine.
02:10:07 - Anthony Campolo
Well, people like, I'm not gonna declarative confident statements, you know? Makes sense.
02:10:11 - Dev Agrawal
Yeah. Like swell Kit is bleeding edge. I mean, you won't find me saying things like also.
02:10:20 - Anthony Campolo
Like, I do say it's not a value judgment. Something's not good or bad based on whether it's bleeding edge.
02:10:26 - Dev Agrawal
Yeah.
02:10:28 - Anthony Campolo
Like it just means it's new. Like, okay, is it good or bad? I don't care if it's new.
02:10:32 - Dev Agrawal
Like, also, I do sometimes get viral. Like my. My tweet about SQL being the worst
02:10:42 - Anthony Campolo
database was your tweet of solid remix smacking solid went viral. That was telling. My tweet meme.
02:10:51 - Dev Agrawal
Yeah. And the one that you posted, the one Redwood and what was it? Bedrock. I need to make sure I don't bring. Bring that one up again because the creator of Bedrock is an investor in clerk. So should I should try to say good things about it. Bedrock is cool, but Redwood is also cool.
02:11:14 - Anthony Campolo
Yeah, Redwood is cool. Glad you think so.
02:11:19 - Dev Agrawal
Cool. That's all I have for now. Thank you very much, Anthony. And we'll do this soon. We should do this more often and I'll figure out streamyard.
02:11:29 - Anthony Campolo
Hey, no, it's fine. I don't do anything.
02:11:33 - Dev Agrawal
Yeah, I have access to streamyard. I asked Jen for Streamyard like a month ago. She sent me an invite, but then I never ended up using it because my. The Elixir Phoenix stream that I decided to do got canceled. Or I canceled it because I wasn't feeling like it. I accept that. I invite that. Like 10 minutes before the stream, I'm like, yeah, I'm gonna use streamyard for the stream. And then I just autopilot it into obs and started the stream. Full autopilot.
02:12:06 - Anthony Campolo
Just fear. Yeah, it's like, I know once you get into a routine, it's very easy to do. Yeah. Actually, I think my yearly substitution, like just renewed. So you can always hop on mine if you ever need to.
02:12:15 - Dev Agrawal
Yeah, we'll do. Thanks.
02:12:17 - Anthony Campolo
For sure.
02:12:18 - Dev Agrawal
All right. Thank you very much. See you soon.
02:12:21 - Anthony Campolo
We will catch you next time.
02:12:23 - Dev Agrawal
Catch you next time. That was cool. So I'll came right out. Out right after view. So not really new. Unless you consider View new. Yeah, I don't consider either of them new. I think he was talking mostly about Sveltekit and Solid Start. Like be. Specifically the full stack frameworks. Let me start this. Yeah, swell Kit came out swelt. It swelled Kit Sveltekit came out a while ago. It went stable like five, six months ago. When did Swell Kit go stable? Sometime last year, before Christmas. What else? Solid Start is still in beta, but it's very stable. Really the only reason it's still in beta is because like they got, they focused on the Astro migration more than like making everything stable. So that was a big reason. It's definitely going to be very stable. December 14th.
02:13:32 - Anthony Campolo
Yeah.
02:13:33 - Dev Agrawal
So six, seven months ago. Eight, seven, eight, seven. About eight months ago. Whatever. Is the Astro Migration installer Start done yet? Great question. It's available as like a Beta Alpha something. It's available as some tag on the NPM if you want to experiment with it. But it's done as in like, yeah, there's like a relatively stable version sitting there but like need to do a lot of. There needs to be more testing to see like exactly how stable it is and if all the features are there and whatever bugs that might be, might be caused are there. And the Astro migration, like got rid of like half of the code in Solid Start. Maybe more than half, but like, yeah, it definitely helped a lot. I'm involved as in like I'm in a discord channel with the people working on Solid Start, so I get like some regular updates and I'm, I'm going to make more content on Solid Start. I, I say that all the time. I literally like need to get my together and start making videos. I don't know. Devil has been stressful. Who would have expected, right, a brand new job to be stressful?
02:14:55 - Dev Agrawal
And what was I thinking? What's stressful about it? I mean mostly just the fact that I'm new and like takes a lot of learning to figure out what to do and how to do and when to do. And also I'm in a startup so there's. Yeah. Any first impressions on a dev. Seems cool to be Astro to see Astro being used for a meta framework. Yeah, I mean if you go back to like Theo seven, eight months ago, he called it that this is how Astro is being. Astro is going to be used. It's going to be. It's going to replace Wheat. And that's exactly what Ryan did, replaced Wheat with Astro. It's. They're using a lot of like the internals and build process of Astro so they don't have to maintain it themselves and things like plugging in with cloud providers with different, with different deployment strategies. Those are things that now Astro takes care of instead of the solid team having to worry about it. Make sure not to Be not to be afraid to ask a lot of questions. Will other people do it though? Or just solid? Theo isn't right until everyone does.
02:16:20 - Dev Agrawal
It depends. Swell Kit is really stable where they are. If anything, I see Swell Kit moving the Turbo pack than I do moving to Wheat or moving to Astro. So not sure about that. Next is not going to do that. They're going to stick to Turbo Pack. Nuxt is I believe like the community is pretty proud of Nitro and everything that they have. So they're probably not going to do it. And I guess this building a meta framework is hard, so we might not see a lot of like random people building meta frameworks on top of Astro. But that might become a. That might become a trend. Depends on if building a framework on top of Astro gets any easier at any certain point. My argument is most people will still keep building on Vite and I think that's still the case. But based on all those frameworks you just mentioned. Next, making Turbo Pack instead of just using Wheat was the worst decision Vercel could have made. Not really in a position to say anything about that. Really have no idea. I mean, I'm sure they considered it. Most people will still keep building on wheat probably.
02:17:42 - Dev Agrawal
I mean Astro is built on top of wheat. So do you count stuff being built on top of Astro as being built on top of wheat? I think like if you're building something like solid start building on top of Astro is going to be easier than building on top of Wheat again because they, because they still, they still do a lot of stuff on top of Vite that you don't want to do if you're building a framework. Now is. Is building a framework like that possible without direct, without a direct line to Astro Core? That's, that's really the main question I think here is that Vitess intended to be used as something you build on top of. Like you build frameworks on top of it. Astro is not intended to be used like that. So there's. There isn't documentation on how to use it like that. Really what you need is a very good understanding of how Astro works and a direct line to the core team or the, or the people who work directly on Astro so that you can do it. Vita is already fast. I don't see an advantage with Turbo Pack other than Versil just wanting more IP fair.
02:19:01 - Dev Agrawal
I mean, yeah, the benchmarks was not, were not great but I think like Turbo Pack is still fast. It might be faster than Vite at some point and like really the the thing about Turbo Pack is not just that it's fast, but it's. It has a much higher ceiling because. Because of its caching mechanism. Like, the point of TurboPack is not just that it's fast and we want more ip. It's that this is a new way to bundle apps. By caching literally everything that they can and only rerunning things when needed. Like, they're basically extending their philosophy about caching that they employ in, like, Next JS and putting that in the. Putting that in the bundling space. I think there's a higher ceiling with Turbo Pack because it can make. It can connect with, like, Turbo Repo. It can do, like, remote build caches and things like that. And there's a lot of tricks that can be done with something like turbopack. Next. There's way more invested into Rust and webpack. I don't see Vite happening. Exactly. Next is very much invested into Rust each. Even, like, Turbo Repos is being rewritten with Rust at this point.
02:20:24 - Dev Agrawal
So they really want the Rust toolchain to happen. You're still using Vite. If you use Astro with the question, why didn't you just use Vite? And I think. And I think most would just use Vite. Yeah, that's fine. Most would just use Vite. I agree with that. Because that's. Because Vite has documentation. In that sense, doing it on top of Astronomy, not so much. Ryan and Tanner can do it because they have. They understand Astro and they have direct lines. But it'll be hard for, like, anyone, like, it'll. It'll be hard for some random person to build a framework on top of Astro. RSC support in Vite is not looking too smooth, as expected. All right, that's really it. I'm gonna end and maybe go live again in a few hours or maybe just tomorrow. Stay tuned to my Twitter and Jacob space. Yeah, that's happening in, like, an hour, I guess. So let's see who we can raid. Who do you guys want? Me. Who should we raid? Oh, teachers live. Let's do Teach slash raid. Teach underscore. DV RAID has been created. There we go. Let's go. Say hi to Teach. You're thinking much more complicated than it is.
02:21:51 - Dev Agrawal
They just use request response. No deep integration. You mean the Astro solid start stuff? It's more than just a request response. It's bundling things and outputting them as serverless functions that can be deployed to five different cloud providers. That's one of the many things that Astro does out of the box that if you're not using Astro, if you're building on top of Vite, you have to do it yourself. Like, Vite doesn't know what deployments to Vercel look like or what deployments to Netlify look like. You still have to create those adapters, but you don't with Astro, because Astro has those adapters. So your abstraction layer is Astro instead of Vite, which is a much higher abstraction layer for, like, full stack apps. Cool. So see you guys soon. Bye.