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.5 Replies
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.
yeah I don't want to use Next.js, sorry what did you mean with
this
setup?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.
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
Thank you very much. @Gabriel @MadaShindeInai