This repository contains end-to-end Reveal SDK samples across multiple client and server stacks.
- Provide runnable examples for common SDK scenarios.
- Serve as the source for documentation-embedded code samples.
- Provide a repeatable validation process before docs updates and releases.
From the repository root, start a static file server:
python -m http.server 8080Then open sample pages at either:
- http://localhost:8080//index.html
- http://localhost:8080//client/index.html
Use this workflow for sample changes that are embedded in docs pages (especially srcdoc iframe content).
- Start local static server from repo root.
- Open affected sample pages directly.
- Verify each sample renders successfully.
- Verify browser network requests do not use
localhost:5111(unless intentionally testing a local backend).
The official local method for docs-embed simulation is:
tools/srcdoc-harness.html
This repository uses the root README.md as the single source of truth for the harness workflow.
Open in browser:
http://localhost:8080/tools/srcdoc-harness.html
Use the harness controls:
- Select the sample path (or use a preset).
- Test with CSP mode
none(baseline should render). - Test with CSP mode
block(expected to fail, validates CSP sensitivity). - Test with CSP mode
allow(should render when CSP includes required hosts).
Recommended checks while running the harness:
- Open browser DevTools Console and Network tabs.
- In
nonemode, confirm dashboard renders without CSP errors. - In
blockmode, confirm CSP violations are visible (expected behavior). - In
allowmode, confirm module loads from jsdelivr and backend calls go tosamples.revealbi.io.
Expected CSP allow-list requirements for docs embedding:
script-srcincludeshttps://cdn.jsdelivr.netconnect-srcincludeshttps://samples.revealbi.io
After Stage A and Stage B pass:
- Run the Documentation repository locally.
- Validate the docs page that embeds the sample code.
- Confirm behavior matches Stage B (
allowmode success). - Confirm no iframe CSP violations in Console/Network.
A change is ready when all are true:
- Sample renders directly in Stage A.
- Sample renders in Stage B with CSP mode
allow. - Stage B with CSP mode
blockreproduces expected failures. - No accidental
about:///fetches. - No accidental calls to
localhost:5111in cloud-backed sample paths. - Docs integration page passes Stage C.
- Some samples intentionally use local backends for server-side walkthroughs.
- For docs-embedded cloud demos, prefer:
https://samples.revealbi.io/upmedia-backend/reveal-api/