Skip to content
Braith.

Connect a Next.js app to Braith.

The shortest route is the setup prompt in your Braith account. Paste it into your coding tool with your Next.js repository open. It inspects the app and performs the integration for you to review.

Start with the setup prompt.

  1. Create your account and choose a plan. Pro is £59/month; Free is available without a card.
  2. Click Copy setup prompt in Your app.
  3. Paste it into your coding LLM with the app repository open. Review the capture, app context and code changes.
  4. Deploy, use your app and verify that Braith receives production events.

The prompt contains no credentials. Your coding tool requests a connection; approve its matching code in Braith.

Send evidence at meaningful boundaries.

Browser discovery captures supported actions, navigation and response summaries within sampling limits. It does not collect form contents, request bodies or full URLs. Add Node observations for server results the browser cannot establish. Configured outcome events can add stronger evidence, as in this example.

import { createServerClient } from "@braith/sdk";

const braith = createServerClient({
  projectKey: process.env.BRAITH_SERVER_KEY!,
  endpoint: "https://app.braith.dev/api/v1/events",
  release: process.env.APP_RELEASE!,
});

await braith.track("access_enabled", { tier: "pro" }, {
  anonymousId: subjectId,
  attemptId: paymentAttemptId,
});

This is the SDK call shape, not a complete integration. The event and allowed properties must exist in your published manifest, and the release must be bound to that version. The setup prompt configures these project-specific details.

Keep browser and server keys separate.

Only the scoped browser ingest key belongs in public code. Keep server and management credentials in server-side environment variables. A public browser key must never establish that money was collected or an entitlement was granted.

Use a stable pseudonymous subject and a shared attempt ID for the same task. Do not send emails, access tokens, card information, form contents or arbitrary request bodies as event properties.

Check production, not just installation.

After deployment, use your app and check that Braith receives production activity on the bound release. If you added core outcome checks, exercise those tasks too. A local SDK install or a copied prompt does not prove the deployed app is connected.

Telemetry should not block a customer action. Set bounded delivery timeouts and retries appropriate to your runtime; complete any required delivery work before a short-lived server invocation ends. Awaiting this example call alone does not implement your application’s failure policy.

Browser and Node integrations are supported. A native mobile SDK is not available.

Keep checking after the fix.

Braith reviews sampled customer activity for likely problems, including flows you have not defined. Core outcome checks add context where you need it.

Connect with Pro · £59/monthTry Free

Connect first. Pay only when you explicitly activate a paid plan.