#!/usr/bin/env bash # Local web preview for Recl∆Im. # # Builds the release web bundle (~16 s) and serves it on # http://127.0.0.1:8080 via python3's stdlib http.server so an # AG-member can poke the demo from a browser without the # Flutter dev tooling being installed on the reviewer's machine. # # Production path (NOT done by this script): # # 1. Copy build/web/ to a static host. Hetzner CX-Server + # Caddy with auto-HTTPS is the existing F∆I pattern (see # fai_chain release-host). # 2. Set the CSP, HSTS, and frame-ancestors headers Caddy # already templates per F∆I deployment. # 3. Add reclaim.flemming.ai DNS A-record to the F∆I IP. # # For local dev: this script is enough. set -euo pipefail cd "$(dirname "$0")" PORT="${PORT:-8080}" HOST="${HOST:-127.0.0.1}" echo "[1/2] flutter build web --release" flutter build web --release echo "[2/2] serving build/web/ on http://$HOST:$PORT" echo " Ctrl+C to stop." echo cd build/web exec python3 -m http.server "$PORT" --bind "$HOST"