## Goal Get the database and backend running on the group VM, directly on the OS (no Docker), so the prototype can talk to it. ## Acceptance criteria - [ ] Confirm the VM hostname (assumed `it2810-13.idi.ntnu.no`) and update CLAUDE.md if different - [ ] `sudo apt install postgresql unzip`, role for the deploy user (`sudo -u postgres createuser --createdb $USER`), `createdb t13` - [ ] Node.js >= 22.18 installed (NodeSource or nvm) - [ ] Repo cloned, `npm ci`, `npm run import` runs on the VM (downloads data itself, no copying needed) - [ ] Import result matches the reference run: **17,698 recipes, 5,653 with photo** - [ ] Backend runs as a systemd service on port 3001, restarts on reboot/crash - [ ] Apache serves `data/images/` (e.g. `/project2/images/`) with long cache headers - [ ] All steps documented in README ("Deployment" section) so staff can restart everything ## Protect against dataset changes The import downloads both datasets from Kaggle at run time. If a dataset is changed or removed there, we can no longer rebuild the same database. Two safeguards: - [ ] **Keep a copy of the raw zips** (`data/raw/*.zip`, ~228 MB) outside Kaggle, e.g. on the VM in a backup folder outside the repo, or on the team's shared drive. Document where in the README. - [ ] **Import checks its own output**: record the SHA-256 of both zips and the expected counts (17,698 recipes / 5,653 photos) in `import.ts`. Fail with a clear message if a download's checksum differs or the counts don't match, so a changed dataset is noticed immediately instead of silently giving different data. ## Notes Depends on #12 (data import) being merged. How to start the backend must be documented on git or in a file on the VM (assignment requirement).