Server + Client Boundary
Scan flow boundary practice
This page itself is a Server Component. It reads runtime env values and passes only required props into client components.
1. What server can read now
SCANNER_MODE: real
SCANNER_API_URL: http://scanner-api:8000
GOOGLE_CALENDAR_BOOKING_URL: (unset at runtime in server process)
NEXT_PUBLIC_BOOKING_URL: https://cal.com/saurav-joshi-54vwfs/15min
Rendered at: 2026-06-24T20:11:49.216Z
2. Client-only behavior and hooks
This component is client-only because it uses hooks and browser events. The value below is what got baked into the browser bundle at build.
Inlined NEXT_PUBLIC_BOOKING_URL in browser bundle: https://cal.com/saurav-joshi-54vwfs/15min
3. Recommended scan split (hybrid)
Keep page-level env reads on the server and move hook-driven polling and interactivity into a client child.
Job ID prop: learning-job-123
Phase: queued
Elapsed: 0s
Learning progress0%
Server-provided booking URL
(unset at runtime in server process)