My Stack of Choice for 2024

After over a year of working with Next.js across various projects with different requirements, I've found myself consistently returning to a set of technologies that have proven to be highly effective. These tools not only complement each other well but also streamline development, making them my go-to stack for 2024.

So, What is the T3 Stack?

The "T3 Stack" is a web development stack created by Theo, focused on simplicity, modularity, and full-stack type safety. It consists of:
The stack is modular, and you can change or discard certain technologies depending on your use cases. For a React app with a backend and an auth system, this is the way to go.
The best way to get started is with the CLI:
create-t3-app
. It’s a simple CLI made to scaffold a starter project using the T3 stack.

Why T3?

I think many people end up with something similar to T3 is the Axioms of T3:
Both the second and third principles are crucial for me when choosing a stack.

What About Alternatives?

Why choose this tech over others? Well, generally speaking, it depends on what you need and what you believe in. Here’s my take:
Yes, “Type Safety Isn't Optional.” If you’re using GraphQL, you might think it also provides type safety because of the agreed schema between the frontend and backend. This works well for a separated frontend and backend (which has an unavoidable version management issue), but not for a full-stack monorepo. GraphQL requires a code-generating process, which leads to longer type-checking times, less IDE support, and a larger client bundle size. Additionally, it introduces non-trivial terminology that requires learning before you can use it correctly.
tRPC, on the other hand, relies on a key assumption: Your server is written in TypeScript and co-located with the client code. tRPC has you define a server-side router for your procedures, then export the type of that router, which TypeScript automatically infers. You can then import that type to use on the client side. Since types are automatically removed when TypeScript code is compiled, there’s no extra code added to the client bundle and no extra types to slow down the type checker—just pure type safety.

Conclusion

The T3 stack perfectly aligns with my development philosophy: keeping things simple, modular, and type-safe. It’s