Visual authoring of DOM patches, published as LaunchDarkly variations, applied via a tiny injector.
- Build the injector:
pnpm -w --filter @webexp/injector build
-
Open
examples/plain-html/index.html
and replace placeholders forclientSideId
andflagKey
. -
Serve the file locally and load it in a browser.
import { init } from '@webexp/injector';
init({
clientSideId: process.env.NEXT_PUBLIC_LD_CLIENT_SIDE_ID!,
flagKey: 'your-webexp-flag',
spaMode: true,
debug: true,
context: { kind: 'user', key: 'anon', anonymous: true }
});
apps/editor
: Next.js App Router UI for selecting elements, authoring operations, previewing in an iframe, and publishing to LaunchDarkly.- Protect with basic auth by setting
EDITOR_BASIC_AUTH="user:pass"
. - Server‑side publish route:
/api/flags/{projectKey}/{envKey}/{flagKey}/publish
(CSRF protected; same-origin or double-submit token).
- Operations:
docs/operations.md
- Metrics:
docs/metrics.md
- Troubleshooting:
docs/troubleshooting.md
pnpm install
pnpm -w build
pnpm -w dev
- See
.github/workflows/ci.yml
for build/test/size-limit. - e2e placeholder in
.github/workflows/e2e.yml
.