What does HackerNews think of create-t3-app?
Quickest way to start a new web app with full stack typesafety
Mostly that solves setting up Auth and Prisma SQL ORM to your DB, but Next.js App directory with the Prisma setup (2 files / 50 LOC) done is even smoother.
https://github.com/t3-oss/create-t3-app
I hadn't touched much webdev for a few years, the ecosystem / build tooling has gotten a LOT better. It's back to being fun and painless to spin up a new webapp.
It's Next.js, Typescript, TailwindCSS, Prisma, NextAuth, tRPC.
> I know about Node.JS, Angular, React, Express
You already know just JS. Stick with JS framework, not these Rails suggestions. Next.js is by far the biggest JS framework (ChatGPT page? half the recent YC co's? Next.js), the rest are the niceties around it to get to a full solution.
> A central definition of data schemas. I don't want to define my schema or validation twice, once in the frontend and once in the backend.
T3 stack uses Prisma, a JS/TS "ORM". Your data schema will live in a .prisma file.
> Automatic generation of REST endpoints. I hate boilerplate code and don't want to reimplement Get/GetOne/Add/Update/Delete and Websocket for each data model. Even better would be a GraphQL interface.
Includes tRPC setup. Give the automated tRPC endpoints a whirl. It's not auto-gen get/delete/etc. (like Django/Rails models) on the server, but the endpoint you create on server very quickly will auto-gen the func call available on the frontend.
> Authorization and Authentication
Includes NextAuth.js setup
A DB is as simple as pressing a button on Planetscale or Railway, copying the secret strings to your .env file, and 'npx prisma db push'.
Looks like blitz is tRPC + next auth?
- GQL: the only case where I'd use GQL is where he would likely want to too: building native mobile apps. Otherwise, I'd use tRPC and have fullstack type safety. This is included in my 5 minute estimate because I'd use create t3 app, which has this configured out of the box https://trpc.io/ https://github.com/t3-oss/create-t3-app
- monitoring/observability: not quite sure what you mean, but it's only a few clicks in vercel to have a logdrain or metric drain and configure alerts and dashboards in your tool of choice. And if I wanted to roll the whole thing myself... that's what he did. Rolled it all custom by hand. The difference is I have the option of not reinventing the wheel.
At the end of the day I can get into composing a docker image that is configured just like his prod servers if I need that access, and there's likely already a docker image pre-done that has 99% of what I need, including metrics/monitoring. At which point I could launch my service on any number of hosts that allow direct pushing of built docker images, if my build process goes there.
To each their own, but I think my solution requires far less time to setup and maintain, but costs more, as I said. Manually engineering each system yourself might be fun to you, but it's not to me.
If you're going to write a modern web frontend like Next and Tailwind (which I agree is the right call) then I think continuing to use Typescript for your backend makes sense for sheer development velocity. Like https://github.com/t3-oss/create-t3-app
I'd advise against Heroku compared to hosts like Vercel, Railway, Planetscale, etc.
Another start-up I've been playing with is Railway, who offers 5-10$ of free usage per month, certainly enough to play with react/nextjs app and a postgres db to your hobbyists hearts content (as long as you turn if off when you're done).
If I were to host a bootcamp on starting a web app from scratch I'd do something like stand-up a T3 App https://github.com/t3-oss/create-t3-app on Vercel Hobby https://www.vercel.com . Not sure I'd even consider Heroku for teaching anymore.
If you are using Typescript on backend and frontend (react/reactnative ok, native ios/android app no) then checkout tRPC. https://trpc.io/ tRPC is basically: you just call your backend functions on your frontend, and TRPC handles the API that makes it work. It shares types and when you define a type for your backend, and call that function, you get the type on your frontend.
Incredible for small apps/teams, but has it's limitations (especially before the most recent version) and probably not the solution for a big honkin app.
I've been playing with create-t3-app and it's pretty nice, great way to launch a basic typescript/trpc/nextjs/prisma app. https://github.com/t3-oss/create-t3-app
I use GraphQL at work and it's fine, it's just a lot of code and codegen and work for a small team, we'd be faster on tRPC but tRPC didn't even exist when this codebase chose graphQL lol