
The Mentoring LoungeWhere certified mentors and builders connect.

RPC/Next.js monolith VS REST API/react single-page app
I'm building a retail management platform. Currently for my own business, but very soon for other niche businesses like mine.
I just completed layer two and did my Backend API audit. In the beginning, Claude decided not to build my application with API architecture discussed in layer two. So I wanted some actual engineers to chime in to make sure I haven't made a serious wrong turn in the beginning. So please let me know your thoughts and thanks in advance for your time. I asked Claude to describe our app versus what is talked about in the audit prompt, and Calude replied with this…
"YOUR APP: "A Next.js monolith using server actions." One program, frontend and backend in the same codebase, deployed as one thing. The calling style has a name too: RPC — remote procedure call, meaning you call a function by name.
The other: "A React single-page app against a REST API." Two programs, deployed separately, talking over web addresses. Calling style: REST.
The honest state of the debate: monolith-with-server-actions is the current mainstream default for an app like this, and it's what Next.js is built around. Ten years ago the split was fashionable; it's now understood as a cost you take on when you need it, not a sign of quality.
The one thing that would force the switch — worth knowing for your SaaS path: if you ever want a native phone app, or you want another system to talk to your app directly (a customer portal, a partner's software, QuickBooks pulling from you rather than you pushing to it), those can't call functions. They need real web addresses. That's when you build a REST layer — alongside what you have, not instead of it.
Comments
Start the Conversation
Welcome Mike, happy to have you here.
Claude is mostly pointing you in the right direction, but I’d make one important correction: RPC vs REST and monolith vs separate frontend/backend …more