You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not needed as of now, but in the future i want to do much more things with the project and recreate the core of github : file hosting and browsing, commit history, time travel on the project, PRs workflow with a way to plug-in an external CI provider, etc.
All of these features will need a formalized backend and extensive testing, i wanted to use a framework like adonis, but trpc might just be enough.
Plus :
using trpc instead of adonis can give us stronger type sharing between the back & frontend, not only will we be able to share zod schemas, we will also share type checking on inputs & outputs of procedures & mutations.
we will also be able to use drizzle, since i started the repo with this, i can continue to use that.
Testing will be easier
Downsides :
I will have to implement some things by myself while in adonis it has been thoroughly implemented and tested
Describe the work that needs to be done
We need to pass to a monorepo organized as such :
packages/
api/ : trpc server + fastity + exported zod schemas (in another file, to avoid importing the trpc client in the web app)
In the prospect of doing this, we might as well just use adonis for the backend, for sharing zod schemas we could take inspiration from this project : /~https://github.com/Christopher2K/weakassdev.
Plus we could use adonis built-in (and community modules) for this.
What is the reason to do this refactor ?.
This is not needed as of now, but in the future i want to do much more things with the project and recreate the core of github : file hosting and browsing, commit history, time travel on the project, PRs workflow with a way to plug-in an external CI provider, etc.
All of these features will need a formalized backend and extensive testing, i wanted to use a framework like adonis, but trpc might just be enough.
Plus :
drizzle
, since i started the repo with this, i can continue to use that.Downsides :
Describe the work that needs to be done
We need to pass to a monorepo organized as such :
packages/
api/
: trpc server + fastity + exported zod schemas (in another file, to avoid importing the trpc client in the web app)apps/
web/
: nextjs appAdditional context
For inspiration, we can see :
Both use an HTTP adapter for RSCs and server actions.
We will also have to see the fastify adapter to host the API :
Some packages for reference :
queue system (with REDIS) : /~https://github.com/OptimalBits/bull
rate limiting : /~https://github.com/fastify/fastify-rate-limit
Are you willing to make a PR for this ?
The text was updated successfully, but these errors were encountered: