u/Developer-Bot

▲ 10 r/react+1 crossposts

Confused about Next.js SSR, route.ts, service folders, and server architecture Need clarity

I’m learning Next.js App Router and trying to understand some architecture decisions.

A few things confuse me:

  • What exactly counts as server-side rendering in Next.js? If page.tsx is async and fetches data, is that already SSR?
  • What is route.ts really for? Is it only for API endpoints?
  • Why do people say we shouldn’t call our own route.ts from a server page?
  • Why do many projects use a services/ folder for SSR instead of fetching directly in pages?
  • Is a service layer mandatory, or just a clean architecture pattern?
reddit.com
u/Developer-Bot — 1 day ago