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
AreaAPIWhat it demonstratesSource
browser<ReoptProvider config bootstrap>The server resolves the write key, flags, and bootstrap before crossing the client boundaryapp/layout.tsx · components/reopt/analytics-provider.tsx
browser<ReoptPageView /> / pageView()Automatic page views, with a switch to exercise manual pageView() callscomponents/reopt/analytics-provider.tsx · components/reopt/manual-page-view.tsx
browser<ReoptWebVitals />Forwards the Core Web Vitals reported by Next.js as $web_vitalscomponents/reopt/analytics-provider.tsx · components/reopt/web-vitals-table.tsx
browsernormalizePathFolds /products/aster-65 into /products/:slug and preserves the slug as a propertylib/reopt/normalize-path.ts
browserinit({ properties }) / register()Global properties from the first event, plus a page_id registered on product pagescomponents/reopt/analytics-provider.tsx · components/reopt/manual-page-view.tsx
browsertrack()Property-rich product.viewed · cart.* · checkout.* funnel eventscomponents/reopt/product-view-event.tsx · components/reopt/checkout-view-event.tsx · components/shop/add-to-cart.tsx · components/shop/cart-lines.tsx
browseridentify() / reset()Links a profile on sign-in and starts a new device on sign-outcomponents/shop/account-panel.tsx
browsergetDeviceId()Passes the browser device id explicitly with a server-bound formcomponents/shop/checkout-form.tsx
browsercapture.exceptions / captureException()Captures unhandled errors and manually reported exceptionscomponents/reopt/instrumentation-lab.tsx
browsercaptureException(error, { level, fingerprint })Reports a handled failure at its own severity and with its own groupingcomponents/reopt/error-lab.tsx
browsercapture.exceptionSteps / addExceptionStep()Carries the last steps before a failure as $exception_stepscomponents/reopt/error-lab.tsx
browserconsent.persist:false / setConsent()Lets an external consent banner own persistence and synchronize the SDKcomponents/reopt/consent-banner.tsx · app/api/consent/route.ts
browserconfig.fetch / config.observeRecords sanitized lifecycle and shows profile and signed-session state in the diagnostic status barlib/reopt/devtools.ts · components/reopt/diagnostic-analytics-provider.tsx · components/reopt/devtools-drawer.tsx
browserflush() / pauseTracking() / resumeTracking()Exercises explicit queue flush, pause, and resume controlscomponents/reopt/instrumentation-lab.tsx
servercreateReopt({ writeKey, credentials, getProfileId })Creates request-scoped clients from one memoized factory per tenantlib/reopt/server.ts
servergetBootstrap()Gives the server and browser the same visitor identity on the first renderapp/layout.tsx
servergetReopt().track()Records completed orders through both a Server Action and a Route Handlerapp/actions.ts · app/api/orders/route.ts
servercreateOnRequestError()Captures server failures as $exception events with Next.js routing contextinstrumentation.ts · app/api/boom/route.ts
proxyreoptProxy({ writeKey: resolver, proxy: true })Seeds and removes device cookies and rewrites the first-party /ingest endpointproxy.ts
nodecreateReoptNode() + identity.deviceIdForwards an outbox batch whose rows may belong to different visitorsscripts/forward.ts · lib/shop/outbox.ts
testwindow.__reoptDevtoolsLets Playwright assert real SDK payloads without intercepting ingest traffice2e/*.spec.ts
testingest requestId → Query API requestIdTags one lab event with a run id and proves browser → ingest → materialization → querye2e/roundtrip.spec.ts · lib/reopt/scenarios.ts