Replies: 3 comments
-
I Second that, I really like what addonis is trying to do, but even with solutions like inertia.js may not always be the best fit for every project. I believe Inertia.js renders a new SPA on every page call, which can break established patterns like global state management. Workarounds exist, but they can add complexity to the codebase. I can imagine workarounds but I feel a better approach is to have a clear separation frontend and backend, but with easy calls (similar to trpc) |
Beta Was this translation helpful? Give feedback.
-
I wrote a codegen that generates types for models, but still trying to figure out routes. |
Beta Was this translation helpful? Give feedback.
-
I think something like ts-rest would be a nice approach for Adonis |
Beta Was this translation helpful? Give feedback.
-
Hey all, really liking Adonis, but there's 1 big feature missing that I believe to be very critical, and that's generating TypeScript types/interfaces for all models, and the request/response shapes of all endpoints. Something like trps or graphql codegen.
I use Adonis as a backend JSON REST API, and Nuxt as our frontend application. Currently when we make requests from the frontend to the backend, it's entirely untyped, and we have to manually create a bunch of interfaces to fill in the gaps.
It would be amazing if Adonis could somehow automate this process. I know that generating types for requests/responses may be difficult, maybe impossible, but types for models should be relatively easy. We don't want to import the models on the frontend, so having interfaces to use instead would be great.
Cheers,
Miles
Beta Was this translation helpful? Give feedback.
All reactions