Mock-matched Obsrvr marketing site served by a small Go HTTP server. The visual source of truth is ai-docs/site; production assets live in static/site, with React JSX sources in src/site bundled by esbuild.
nix develop
npm install
make runOpen http://localhost:8080.
Main routes:
//platform/pricing/apis/compliance/prism
npm run site:build # bundle src/site JSX into static/site/dist
make run # build JS bundles and run the Go server
make build # build JS bundles and compile the Go server
make visual-diff # screenshot-compare app routes against ai-docs/site mocksFor live reload with Air:
air -c .air.tomlmake visual-diff starts the Go app and a local static server for ai-docs/site, captures screenshots with Playwright/Chromium, and writes artifacts to:
tmp/visual-diff/
mock/
app/
diff/
Useful environment variables:
CHROMIUM_PATH=/run/current-system/sw/bin/chromium
MAX_DIFF_RATIO=0.01
PIXEL_THRESHOLD=0.1
VISUAL_DIFF_DIR=tmp/visual-diff
APP_URL=http://localhost:8080 # use an already-running app instead of spawning go runcmd/site: Go HTTP server, route map, static caching, lightweight htmx endpointssrc/site: React JSX sources copied from the mocks and updated for production routessrc/site/content: JSON content/config inspired by Ghostty's maintainable site structure; update nav, footer, and homepage copy here firststatic/site: production HTML/CSS/assets and generated JS bundlesscripts/build-site.mjs: esbuild bundler for page-specific JSscripts/visual-diff.mjs: Playwright screenshot diff toolai-docs/site: original mock/reference files