Relied on the existing router to gate page and API routes behind session verification while leaving health checks open. Added an optional verifier hook so local development could run without external auth.
- What worked
- Middleware composition was straightforward and made it simple to apply different unauthenticated behavior for browser pages versus JSON APIs.