Skip to content

About

Browser-only tools for the Crossly API: verify and sign webhook signatures, inspect tokens, validate automation recipes, build OAuth PKCE URLs. Nothing leaves your browser.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Crossly Playground

ci pages release license

https://crossly-dev.github.io/crossly-playground/

Small browser tools for building on the Crossly API. A static page with no backend: everything runs in your browser, and nothing you paste is sent anywhere, stored, or logged. The only request the page makes on its own is for Crossly's public recipe schema.

Tool What it does
Verify a webhook Paste the raw body, the Crossly-Signature header and your signing secret. You get the verdict and why: tampered or re-serialised body, wrong secret, uppercase hex, truncated digest, stale or future timestamp, malformed header. Same checks, same order and same reason codes as @crossly/sdk's verifyWebhook: HMAC-SHA256 over t.rawBody, constant-time compare, then the 300 s tolerance.
Sign a webhook Produce a Crossly-Signature for any body and secret, plus a curl command to fire it at your local receiver.
Inspect a token Identifies a credential by its shape (crossly_pat_live_…, crossly_pk_…, crossly_ek_…, an OAuth JWT, older crossly_oat_/crossly_ort_ formats, a webhook secret) and says where it may be used: seller or buyer API, live or sandbox, server only or safe in a web page. JWTs are decoded locally; the signature is not verified, and the inspector cannot tell whether a token is still valid.
Validate a recipe Checks an automation recipe or a { schemaVersion, recipes: [...] } bundle against automation-recipe-v1.json, with JSON Pointer paths and "did you mean" suggestions.
OAuth + PKCE Builds the authorization-code request for Crossly's authorization server, https://crossly.net/atlas: code_verifier, S256 code_challenge, state, the authorize URL with resource and openid, and the token exchange as curl.

How it stays honest

The page loads plain ES modules from js/, and the tests import those same files: there is no separate copy for CI.

  • test/webhook.test.mjs runs the shared webhook conformance vectors (test/webhook-vectors.json, 22 cases, 13 of which must be rejected) through js/webhook.js.
  • test/recipe.test.mjs generates a valid instance and a set of mutations for every trigger, condition and action in the schema and fails if the page's validator and Ajv (draft 2020-12) disagree on any of them, then does the same for every recipe in crossly-dev/crossly-recipes.
  • test/pkce.test.mjs checks the challenge against Node's own SHA-256 and the endpoints and scopes against the live discovery document.
  • test/page.test.mjs checks the page wiring, the Content-Security-Policy (no inline script, network limited to the page itself and crossly.net) and that the only fetch calls are for the schema.
  • e2e/smoke.mjs drives every tool in Chromium at phone and desktop width, light and dark, and runs axe accessibility checks.

CI also runs weekly, so a change to the live schema, discovery document or scopes shows up as a failing build.

Run it locally

Any static file server works; ES modules need http, not file://:

git clone https://github.com/crossly-dev/crossly-playground
cd crossly-playground
python3 -m http.server 8080      # then open http://localhost:8080
npm install && npm test          # unit tests; ONLINE=1 npm test adds the live drift checks

Every release also ships the built site as a zip with build provenance:

gh attestation verify crossly-playground-site-v0.1.0.zip -R crossly-dev/crossly-playground

Related

License

MIT

About

Browser-only tools for the Crossly API: verify and sign webhook signatures, inspect tokens, validate automation recipes, build OAuth PKCE URLs. Nothing leaves your browser.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages