Files
piik/docs/operations/website.md
T
AAA 322e5d91b2 feat(ui): add illustrated hints and playback gestures
## Problem and outcome / 问题与结果

App startup rejected short or non-ASCII site passwords, viewers lacked picture-click playback gestures, and text-mode hints hid the existing illustrations. This phase accepts site passwords verbatim, combines shared illustrations with localized captions in tooltips and stage overlays, and adds desktop single-click play/pause and double-click fullscreen through the existing playback owner. Pure-visual mode remains available.

App ZIP names are now stable per platform, allowing the website to use GitHub's native latest-download URLs. The App update link selects the ZIP matching its compiled OS and architecture from the checked release metadata, falling back to the release page if the package is unavailable. Verified Gitee links retain their explicit release version. The Windows packaging workflow also stops restoring a redundant Go toolchain cache that caused setup-go to fail.

## Release notes

### 中文

- 中英文操作提示和画面状态覆盖层加入动态漫画,说明更直观;纯视觉模式继续保留。
- 观众可单击画面暂停或继续播放,双击进入或退出全屏;触屏仍通过单击显示或隐藏播放栏。
- 修复设置短密码、中文密码时 App 或 Server 无法启动的问题。站点密码仍可留空。
- 官网各系统的 GitHub 下载按钮直接获取最新 ZIP 包,并保留 Gitee 备用下载线路。
- App 内的更新入口直接下载对应系统和架构的 ZIP 包。

### English

- Chinese and English tooltips and picture status overlays now pair concise explanations with animated illustrations. Pure-visual mode remains available.
- Viewers can click the picture to pause or resume and double-click to enter or exit fullscreen. Touch taps continue to show or hide playback controls.
- Fixed App and Server startup rejecting short or non-ASCII site passwords. Site passwords remain optional.
- Each platform's GitHub download button now fetches the latest ZIP package, with Gitee retained as an alternative download source.
- App update links download the ZIP matching the installed platform and architecture.

## Verification / 验证

- `npm run check`: 59 test files / 774 tests, TypeScript and production build passed.
- `npm run check:client-core`: Go tests, formatting, vet and supported local target builds passed for the included runtime changes. Native macOS packaging remains on its macOS runner.
- Desktop and 390px touch playback checks passed, including double-click without an intermediate pause and control/keyboard interaction.
- Illustrated tooltip checks passed in Chinese, English and pure-visual modes, light/dark themes, 260/360/390px layouts, keyboard, touch hold and reduced motion. User accepted the resulting UI.
- Real stage overlay components passed 46 checks across the three modes and 260/390/1280px layouts, including keyboard play activation, reduced motion, and no overlay over healthy playback with a quality limitation.
- Bounded release review confirmed JSON password authentication retains old bodyless Bearer compatibility and ZIP names match packaging, publisher, mirror and website consumers.
- After checking both providers' real API shapes, 27 focused update tests and type-checking passed; anonymous GitHub and Gitee metadata each selected all three actual platform ZIPs without downloading them.
- Documentation, repository hygiene and diff checks passed.

## Impact / 影响

Compatible feature release. Signaling, Native control, capture protocol and persistent room schema are unchanged. The new latest-download filenames must be published before the matching website deploys; the existing CI-to-Website sequence provides that order. Production service updates use the immutable Server artifact and bounded rollback. Broader physical macOS/Linux, network and endurance acceptance stays under the existing documented deferrals.
2026-09-13 01:04:13 +08:00

5.8 KiB

Public website

The website source is site/. It explains Piik; it does not run rooms, signaling or media. The public introduction guide owns its content and design boundary.

Public Destinations

Entry Destination
Website piik.tv
P2P-only demo on the separate US server demo.piik.tv
App downloads and release notes GitHub Releases
Download mirror for domestic access Gitee Releases
Documentation index Repository documentation

These public destinations are live. GitHub Pages serves piik.tv behind Cloudflare; both the GitHub origin and Cloudflare edge use HTTPS. Website DNS is proxied with strict origin TLS verification and origin cache headers respected. Demo DNS remains unproxied so its UDP listeners stay reachable.

GitHub Pages can serve the complete website: it hosts static HTML, CSS and JavaScript. The demo also needs the Go service for room authority, WebSocket signaling and UDP STUN, so it runs on the separate US server rather than Pages.

Public Demo Configuration

The chosen demo allows entry without a site password and provides P2P sharing without SFU fallback. Use the self-hosting runbook with:

PIIK_ENV=production
LISTEN_HOST=127.0.0.1
PORT=8787
PUBLIC_BASE_URL=https://demo.piik.tv
ALLOWED_ORIGINS=https://demo.piik.tv
SITE_ACCESS_PASSWORD=
ROOM_DATABASE_PATH=/var/lib/piik/rooms.sqlite
MAX_VIEWERS_PER_ROOM=20
STUN_URLS=stun:demo.piik.tv:3478
NAT_PREDICTION_ENABLED=true
SFU_UDP_PORT=

Point demo.piik.tv directly at the US server so UDP reaches its STUN listeners; allow UDP 3478/3479/3480 and terminate HTTPS/WSS at Caddy. The demo uses the standard systemd service, with its release under /opt/piik/current and configuration at /etc/piik/piik.env. The service unit provides the SQLite state directory. Room ownership, invitations and private-room admission still apply. The configuration reference owns each setting and its bounds.

For updates, verify the release descriptor and manifest before placing a new release under /opt/piik/releases/. Stop Piik, back up its SQLite state, switch current to the verified release, and restart. Check local/public health, WebSocket room access and STUN. Keep the previous release and state backup until acceptance; restore both with Piik stopped if rollback is needed. The nginx-specific maintainer wrapper does not manage this Caddy installation.

Preview

With the repository's development dependencies installed:

npm run build:website
npm run preview:website

Open http://127.0.0.1:18890. Rebuild after editing source. The build bundles the film's real product components into an isolated demonstration frame; publishing build/site/ needs no Node runtime or backend. Vite preview supplies HTTP byte ranges for seeking the soundtrack. Keep asset links relative so both a custom domain and GitHub's /Piik/ project path work.

The Windows x64, macOS Apple silicon and Linux x64 ZIP cards use GitHub's native releases/latest/download/asset-name.zip links. Fixed App filenames follow versioning, so these primary links also work in local builds and follow new releases without a website rebuild. PIIK_WEBSITE_RELEASE_DATA points the build at temporary JSON containing the published GitHub release and same-tag Gitee attachment metadata. CI supplies this input; the builder validates source identity, uploaded ZIPs, sizes and platform URLs. A missing/incomplete GitHub release fails deployment, preserving the current site. Verified Gitee links show their specific version and refresh after publication. Without matching metadata, Gitee retains its labeled release-page link. The page makes no visitor API request or inferred version claim when metadata is absent.

Publish

  1. Verify the public copy and destinations above, publish the release artifacts and open the source repository as part of the approved public launch.
  2. In repository Settings > Pages, choose GitHub Actions as the source. Use the dedicated Pages workflow, not publication of the repository root or all of docs/, which includes developer research and operational reference.
  3. Set the approved piik.tv custom domain in Pages settings and configure its DNS using GitHub's current domain instructions. Actions publishing does not need a CNAME file in the source tree.
  4. Accepted main pushes run CI first; its completion triggers Website, which checks out current main and reads the latest published download metadata. Waiting for CI includes its package publication and mirror attempt, so the page picks up the resulting release. A CI failure leaves downloads pointing to the latest successful public release. Manual Website dispatch from main can refresh links after an operator publication or mirror retry. Only build/site/ is uploaded; website work does not package App/Server. Verify HTTPS, both languages, relative assets and per-platform download links.

Branch/PR pushes do not deploy. The workflow does not change DNS; the private production site and the US P2P-only demo remain separate deployments.

For rollback, dispatch the previously accepted site revision from a reviewed revert on main; runtime App/Server binaries and databases are unaffected.