Cloudflare Worker entry point — request router.
Routes:
GET /api/health
POST /api/analyze
*
Everything else lives in dedicated layers:
handlers/
adapters/
domain/
errors/
Keep this file thin — adding logic here is a smell.
Cloudflare Worker entry point — request router.
Routes:
GET /api/health— liveness probePOST /api/analyze— analyze pipeline (see handleAnalyze)*— fall through to Static Assets (serves the built SPA)Everything else lives in dedicated layers:
handlers/adapters/domain/errors/Keep this file thin — adding logic here is a smell.