News for hackers. Stuff that matters.
Re:My Journey Away from the JAMstack by JSavageOne on Monday July 31, 2023 @03:40PM (#36947720)
> 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.

Re:My Journey Away from the JAMstack by iamcasen on Monday July 31, 2023 @07:00PM (#36950030)
NX 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.

Re:My Journey Away from the JAMstack by JSavageOne on Monday July 31, 2023 @11:56PM (#36952094)
Ok 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.

Re:My Journey Away from the JAMstack by iamcasen on Wednesday August 02, 2023 @05:23PM (#36977715)
Thanks! 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.