{
  "checker": {
    "details": {
      "argv": [
        "/usr/bin/npm",
        "start"
      ],
      "bytes": 44026,
      "kind": "http",
      "scope": "product operation",
      "status": 200,
      "url": "http://localhost:3000/register/init",
      "working": true
    },
    "status": "PASS"
  },
  "deviations": [
    "`npm ci` under the guest's apt Node 18.19.1 failed: npm WARN EBADENGINE (brace-expansion@5 requires node 20||>=22, vite@7 requires node ^20.19||>=22.12) then `npm ERR! code E429 429 Too Many Requests - GET https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz`. Ran `npm i -g node@22`, then `npm ci --fetch-retries=5` succeeded.",
    "apt Node 18.19.1 does not satisfy the lockfile dependencies; Node 22 was needed.",
    "`npm run build` on the 1.8 GB guest was OOM-killed during 'Linting and checking validity of types' (kernel oom-kill of node). Added a 4 GB /swapfile and rebuilt with NODE_OPTIONS=--max-old-space-size=3072; build then succeeded.",
    "The README Production Installation (npm) describes no .env creation step beyond copying .env.example; .env.example uses POSTGRES_HOST=db and REDIS_URL=redis://redis:6379 (docker service names), so .env was written with localhost values.",
    "Symlinked /usr/local/bin/node to the Node 22 binary (node-linux-x64) so the checker's clean `/usr/bin/npm start` runs under Node 22; PATH is also set in probe env.",
    "npm start logs `HTMLElement is not defined` unhandledRejection from the profile page prerender (server log, non-fatal; the server still serves pages).",
    "Stopped the server after the check, so the checker can start it itself."
  ],
  "main_blocker": null,
  "observed": "see observed.json",
  "operation": "Started the production Next.js server with `npm start` and requested the README Initial Setup page GET http://localhost:3000/register/init, which returned HTTP 200. Also GET / returned 307 (redirect), as expected for an unauthenticated user.",
  "operation_scope": "Verifies the app builds, boots and serves its first-run registration page against local PostgreSQL 16 and Redis. Does not create the admin user (POST), exercise login, S3, Unsplash, SMTP or real-time collaboration.",
  "outcome": "working",
  "steps": [
    "apt-get install nodejs npm postgresql redis-server git (Ubuntu 24.04 apt, Node 18.19.1)",
    "redis-server --daemonize yes; service postgresql start; set postgres password; createdb daylog",
    "npm i -g node@22 (Node 22.23.3 via npm registry)",
    "npm ci (with Node 22; succeeded after retry settings)",
    "wrote .env from .env.example with localhost values for POSTGRES_HOST, DATABASE_URL, REDIS_URL",
    "npx prisma migrate deploy",
    "npx prisma generate",
    "fallocate 4G /swapfile; swapon; NODE_OPTIONS=--max-old-space-size=3072 npm run build (EXIT=0)",
    "npm start -> GET /register/init (200)"
  ],
  "stuck_step": null,
  "suggested_fix": "Document Node >=20.19 (or >=22.12) as a requirement in the npm install section (apt's Node 18 fails the lockfile); document the .env localhost values for non-docker installs; note that `npm run build` needs ~3 GB of RAM or swap (type-check OOM-kills on 2 GB guests); and investigate the HTMLElement prerender error on the profile route."
}
