Quickstart

Up and running in 5 minutes

This guide uses Next.js — the fastest path. See Node.js or React Native for other SDKs.

1. Install

bash
npm install @veriq/next

2. Add VeriqClient to your root layout

Import VeriqClient and add it inside your <body>:

tsx
// app/layout.tsx
import { VeriqClient } from '@veriq/next';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html>
      <body>
        <VeriqClient
          dsn={process.env.NEXT_PUBLIC_VERIQ_DSN!}
          release={process.env.NEXT_PUBLIC_APP_VERSION}
          environment={process.env.NEXT_PUBLIC_ENV}
        />
        {children}
      </body>
    </html>
  );
}

3. Set your DSN

Find your DSN in Project Settings → API Keys. Add it to .env.local:

bash
NEXT_PUBLIC_VERIQ_DSN=pk_...
NEXT_PUBLIC_APP_VERSION=1.0.0
NEXT_PUBLIC_ENV=production

4. Trigger a test error

Add a temporary button to any page to verify the integration:

tsx
import { captureException } from '@veriq/next';

// Inside any client component:
<button onClick={() => captureException(new Error('test error'))}>
  Test veriq
</button>

After clicking, the error appears in your veriq dashboard within seconds. Remove the button when done.


Other frameworks