4 ms·
> One of our lead engineers setup an NX monorepo. We deploy an API to AWS and our front-end to vercel. I don't understand where the complexity is in your setup
by JSavageOne 3y ago
> One of our lead engineers setup an NX monorepo. We deploy an API to AWS and our front-end to vercel.
I don't understand where the complexity is in your setup that you're unhappy with.
- iamcasen 3y agoNX with a Nest.js backend, and Next.js front-end. These tools just aren't very nice to jam together into a fullstack app. I'm really not a fan of NX itself. Lots of people love it, but I think it's way too much for most use-cases. Furthermore, in our case, the front-end and backend are really coupled, so having these as separate systems is just a big headache. All of the web app's views are tied into specific backend functionality, and our API doesn't really stand on it's own without the front-end. Yes this is poor architecture. I'm just pointing out a case where JAMStack was a mistake. Rails (or similar) would have been a smarter choice.
- JSavageOne 3y agoOk I've never used Rails, but personally I've enjoyed my experience with a monorepo (pnpm workspaces) consisting of a Node.js API server and Next.js frontend server. You could try doing everything in Next.js, but I prefer keeping my backend separate. Love having everything in a monorepo though. If you want more coupling, perhaps you could try something like ts-rest to add API types to your frontend. Or if you're feeling more adventurous, GraphQL or tRPC, though I personally prefer to avoid being tied to overly experimental frameworks.
- iamcasen 3y agoThanks! Yes, pnpm workspaces and turborepo are both far superior to NX IMO. They hit that sweet spot of providing the nice aspects of a monorepo without all the nightmarish configurations and complexities. Next.js has saddened me since the move to SSR. I think remix is light-years ahead to be honest. I will give ts-rest a look-see.