SDK capability map
Every reopt Data SDK capability exercised by this storefront, with the exact source that demonstrates it.
@reopt-ai/data-sdk-client@?npm@reopt-ai/data-sdk-server@?npm@reopt-ai/data-sdk-devtool@?npm@reopt-ai/data-contract@?npm
| Area | API | What it demonstrates | Source |
|---|---|---|---|
| browser | <ReoptProvider config bootstrap> | The server resolves the write key, flags, and bootstrap before crossing the client boundary | app/layout.tsx · components/reopt/analytics-provider.tsx |
| browser | <ReoptPageView /> / pageView() | Automatic page views, with a switch to exercise manual pageView() calls | components/reopt/analytics-provider.tsx · components/reopt/manual-page-view.tsx |
| browser | <ReoptWebVitals /> | Forwards the Core Web Vitals reported by Next.js as $web_vitals | components/reopt/analytics-provider.tsx · components/reopt/web-vitals-table.tsx |
| browser | normalizePath | Folds /products/aster-65 into /products/:slug and preserves the slug as a property | lib/reopt/normalize-path.ts |
| browser | init({ properties }) / register() | Global properties from the first event, plus a page_id registered on product pages | components/reopt/analytics-provider.tsx · components/reopt/manual-page-view.tsx |
| browser | track() | Property-rich product.viewed · cart.* · checkout.* funnel events | components/reopt/product-view-event.tsx · components/reopt/checkout-view-event.tsx · components/shop/add-to-cart.tsx · components/shop/cart-lines.tsx |
| browser | identify() / reset() | Links a profile on sign-in and starts a new device on sign-out | components/shop/account-panel.tsx |
| browser | getDeviceId() | Passes the browser device id explicitly with a server-bound form | components/shop/checkout-form.tsx |
| browser | capture.exceptions / captureException() | Captures unhandled errors and manually reported exceptions | components/reopt/instrumentation-lab.tsx |
| browser | captureException(error, { level, fingerprint }) | Reports a handled failure at its own severity and with its own grouping | components/reopt/error-lab.tsx |
| browser | capture.exceptionSteps / addExceptionStep() | Carries the last steps before a failure as $exception_steps | components/reopt/error-lab.tsx |
| browser | consent.persist:false / setConsent() | Lets an external consent banner own persistence and synchronize the SDK | components/reopt/consent-banner.tsx · app/api/consent/route.ts |
| browser | config.fetch / config.observe | Records sanitized lifecycle and shows profile and signed-session state in the diagnostic status bar | lib/reopt/devtools.ts · components/reopt/diagnostic-analytics-provider.tsx · components/reopt/devtools-drawer.tsx |
| browser | flush() / pauseTracking() / resumeTracking() | Exercises explicit queue flush, pause, and resume controls | components/reopt/instrumentation-lab.tsx |
| server | createReopt({ writeKey, credentials, getProfileId }) | Creates request-scoped clients from one memoized factory per tenant | lib/reopt/server.ts |
| server | getBootstrap() | Gives the server and browser the same visitor identity on the first render | app/layout.tsx |
| server | getReopt().track() | Records completed orders through both a Server Action and a Route Handler | app/actions.ts · app/api/orders/route.ts |
| server | createOnRequestError() | Captures server failures as $exception events with Next.js routing context | instrumentation.ts · app/api/boom/route.ts |
| proxy | reoptProxy({ writeKey: resolver, proxy: true }) | Seeds and removes device cookies and rewrites the first-party /ingest endpoint | proxy.ts |
| node | createReoptNode() + identity.deviceId | Forwards an outbox batch whose rows may belong to different visitors | scripts/forward.ts · lib/shop/outbox.ts |
| test | window.__reoptDevtools | Lets Playwright assert real SDK payloads without intercepting ingest traffic | e2e/*.spec.ts |
| test | ingest requestId → Query API requestId | Tags one lab event with a run id and proves browser → ingest → materialization → query | e2e/roundtrip.spec.ts · lib/reopt/scenarios.ts |