Hello, everybody, and welcome to this talk where I'm going to show you how to set up your next project in just a few seconds. My name is Julius, and I'm a software engineering student from Sweden. I also work at PingLabs, where we build UploadThing, and I help maintain and contribute to some open source libraries that we're going to check out today.
Before we start off with our next project, let's check out the past and see how init tools worked before. This is CreateNextApp version 12, which was released in June 2022, I think. That was almost two years ago now. And it was very basic. It threw out the JavaScript project with just a home page and a Hello API endpoint. This is all you need to get started with Next.js, and it's the intention of CreateNextApp to just get you set up with just Next.js. But if you're building a full stack application, you're going to need more libraries. You're going to need a database, you're going to need authentication, you're going to need some way to style your application. There's a lot of parts that goes into making a full stack application. And if you're starting off of Next.app, you're left with integrating all of those parts yourself.
CreateT3App is a bit more batteries included version of CreateNextApp, where it still scaffolds a Next.js project for you, but it does it with a few libraries built on top of it. First off, we have TypeScript, because we think that you shouldn't use JavaScript to build full stack applications. TypeScript provides a lot of value where you can have static analysis and just be told where you're either just misspelling something or you're passing the wrong type of values to a function. We're also including Tailwind, TRPC, later also NextAuth and Prisma. So at that point, you have everything you needed to get started with your next full stack application. But I think that this still suffers from a major problem, and that it just throws out a single template.
CreateT3App from the beginning was still just a template from GitHub that the CLI was cloning down. And you weren't given the option to pick if you wanted to use TRPC, Tailwind, Prisma, NextAuth, any of these packages. And I think it's an issue on both ends here where if you're using CreateNextApp and not getting anything, you're left as a developer to integrate different packages together. And that can be cumbersome if you do this a lot. And it would be great if a tool can automate this process for you. But at the same time, if you include too many packages and too much boilerplate code, a developer might be either overwhelmed or they just get way more than they actually need. Maybe some project doesn't need NextAuth, or maybe some project doesn't need Tailwind, either because they don't need it entirely, or they want to try out a different package to solve that problem. And that's why we needed something a bit more modular than just a CLI that takes a template from GitHub and clones it down to your local machine. The solution was in the following versions of CreateT3App, where we have built a fully modular CLI that lets you bring exactly what you need and leave out the parts that you don't. Each technology in this CLI can be selected independently from one another. So as you can see right here, we can select each option or we can just skip that and move on to the next step.
Comments