Start here. This is the direct spoken answer to practice first.
Overview
App Router applications have multiple executable entry points, so no layout or Proxy check can secure them all by itself.
I centralize session verification and authorization in a server-only data-access layer and call it close to every protected read or write. Server Components verify before returning sensitive data, Server Actions authorize each mutation, and Route Handlers authorize each request. Proxy can perform a quick cookie-based redirect for user experience, but it is not the final security boundary.