-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next.js working setup example #583
Comments
@nanoander I assume NextJS doesn't use the official TypeScript compiler anymore, so it's not compatible. Also Next and Deepkit share very different architecture philosophies, NextJS uses globals and heavy conventions, while Deepkit dependency injection and SOLID code, so I'd recommend not to mix both as it will lead to unmaintainable spaghetti code. If you want to get a scaleable and fast backend with nice frontend/SSR, I recommend Deepkit+Angular 18 (zoneless). It's a dream team, but needs skill to handle it correctly. |
One datapoint: Our company uses Next.js for well maintained out-of-box features and productivity. We have been using gRPC-web with NextJS, but are interested in evaluating Deepkit RPC. |
IMO Deepkit should be as accessible as possible.
I can't agree with you here. It's just two different worlds – enterprise and non-enterprise, each has its own strengths and weaknesses. It has nothing to do with developer seniority and skill level. I believe these two worlds do collide though. NextJS (Nuxt, Remix, Astro, SvelteKit, etc.) are great for developer productivity and rapid development. All of these frameworks mentioned above are also being widely used by enterprise companies:
Now, let's try to differentiate what "integrating Deepkit with X" can actually mean. Deepkit consists of two main entities:
@nanoander Have you been trying to adopt the runtime types system ( Next.js uses SWC compiler instead of In case of the need of consuming Deepkit Framework RPC endpoints, we could also elaborate on code-generation approach which wouldn't require altering TS compiler. |
I'm using Deepkit as the server for Remix |
Haven’t read any of this but I was also able to easily get deepkit DI working in Remix loaders and actions |
I was able to get validations using deepkit/type working by customizing the NextJS Webpack configuration. I had to configure the default Babel loader to ignore .ts* files and instead use ts-loader for them, and add the same Deepkit Webpack plugin I'm using for my NestJS-based APIs. |
Hello,
I spent hours trying to get deepkit working on a Next.js app (latest version) without success.
Considering the huge popularity of Next.js, can you please provide an example app with the right setup?
Thank you very much.
The text was updated successfully, but these errors were encountered: