I've been building a few applications with Next.js and Node.js, and one thing I keep coming back to is:

How much backend logic should actually live inside Next.js?

At first, the answer seemed obvious.

Next.js gives you Server Components, Route Handlers, Server Actions, middleware, caching, and a lot of other backend-like capabilities. For a small application, keeping everything inside one Next.js project is incredibly convenient.

But as the application grows, the architecture becomes less obvious.