My React and Express projects use API, service, repository, and database layers. For a reusable Next.js boilerplate, should I keep that structure, start with server actions, or use API routes from the beginning?
I might want a mobile client later, but I don't want to maintain duplicate business logic or build layers I won't need.
JuniperStatic:
That also leaves room to share validation schemas where the inputs are the same, while keeping each entry point responsible for checking its own requests.