API route 진짜 필요할 때
Server Action 이 내부 mutation cover. Server Component 가 내부 data read cover. Route Handler 가 나머지 cover: webhook, third-party integration, public API — 외부에서 부를 수 있는 stable URL 노출하는 거.
모양
app/ 아래 어떤 folder 의 route.ts 가 HTTP method handler (GET, POST, PUT, DELETE 등) export. 각각 NextRequest 받고 NextResponse 반환.
Hard rule
route.ts 가진 folder 는 page.tsx 도 가질 수 없음. 다른 세계 (API vs UI) 서빙. Folder 별 하나만.