Protect HTTP and WebSocket API routes with scrypt password login and signed persistent sessions. Restrict forwarded identity and HTTPS detection to configured proxies, and serve optional web assets with SPA fallback.
Add @fastify/static for Fastify-compatible static file handling and esbuild to bundle TypeScript core source while retaining native dependencies externally.
Shared notebook model (types.ts), HTTP/WebSocket protocol (protocol.ts) and
core function signatures (stubs) so core, server and web can be built in
parallel. Minimal Fastify server with a health route and test.