What problem does it solve? Deciding where new code belongs in a Next.js App Router project is error-prone: logic parked in route files escapes test coverage, misplaced "use client" directives bloat the client bundle, and environment variables leak into the browser. This Skill provides the procedure for placing pages, layouts, handlers, and configuration correctly inside a strict layered architecture. ## Core Features & Use Cases - Server/Client boundary placement: Rules for which file carries the "use client" directive, keeping pages as Server Components and pushing state and effects into the smallest client file. - Route Handler pattern: A three-step recipe where src/app/api/<name>/route.ts is a one-line re-export of a Web-standard handler factory wired in src/server/composition.ts, testable with a plain Request object. - Configuration discipline: All process.env reads centralized in src/server/env.ts, with guidance on optional versus required variables and the risks of NEXT_PUBLIC_ inlining. - Use Case: When adding a new JSON endpoint, follow the Skill to write the handler in src/server/handlers/, wire it in composition.ts, re-export it from route.ts, and bound the request body before any model call. ## Quick Start Ask the AI to add a new API endpoint or page to the Next.js App Router project following the building-app-routes conventions.