Reputation: 7018
I am planning to nextjs app on frontend and nestjs for backend inside NX monorepo using pnpm workspace.
I am confused how should I design the complete folder structure.
pnpm-workspace.yaml
and have both nextjs and nestjs app inside app
folder?Can anyone with some experience on the above tech stack can share your thoughts/inputs here
Upvotes: 1
Views: 2132
Reputation: 1
It can be implemented in any of the three methods. It depends upon your use case.
It gives you flexibility in terms of dependencies. You can use different versions of dependencies based on the project. Using this an exmaple folder structure could be
It resolves all the dependencies and scripts automatically.
I personally go with package based repo when I know that in future i would want to add a new application to the monorepo with a different version of a dependency. Example : nextjs 12 and nextjs 13 app in the same repo.
I go with integrated repo when i have to get started quickly and not worry about dependencies. This is particularly useful for small projects
Upvotes: 0