DINO
DINO3mo ago

How do I create a React/Node full-stack project with tRPC?

Hello, I would like to build a website using React and Node and tRPC. What I first assumed is I need to scaffold a react app using Vite in a folder called client, write my server code in a folder called server . Is this is a common project structure or not? If yes how do I install new npm packages? Should I install them in the parent package.json and ignore the client one or what? EDIT: I don't want to use a monorepo. I really appreciate any help, I have nowhere else to ask. Thanks.
No description
5 Replies
MadaShindeInai
MadaShindeInai3mo ago
You can use Create-T3-app to create already configured app. If NextJS if not framework of your choise, you can use this setup as example.
DINO
DINOOP3mo ago
yeah I don't want to use Next.js, sorry what did you mean with this setup?
MadaShindeInai
MadaShindeInai3mo ago
I meant https://create.t3.gg/ T3-app setup. Just decouple NextJs from there and replace it with Remix 🙂 I may be wrong, but Idea is that you need to have both FE and BE part in your app (in the same repo). You can achieve it with Fullstack framework or maybe React + SST framework.
Create T3 App
Create T3 App
The best way to start a full-stack, typesafe Next.js app.
Gabriel
Gabriel3mo ago
Vite is a client side framework. You need to run a separate instance where it will run your server You can use Hono (my recommendation) or express or something
DINO
DINOOP3mo ago
Thank you very much. @Gabriel @MadaShindeInai