#!/usr/bin/env bash set -euo pipefail echo "[setup] Ensuring /data/hipctf exists..." mkdir -p /data/hipctf/uploads echo "[setup] Installing root dependencies..." npm ci --no-audit --no-fund || npm install --no-audit --no-fund echo "[setup] Building Angular frontend..." npm --workspace frontend run build echo "[setup] Building NestJS backend..." npm --workspace backend run build echo "[setup] Done. Start with: npm start"