Create a project, connect your repo, and see your first dashboard.

Your First Project

This guide walks you through creating a Codmir project, connecting a GitHub repository, adding the SDK to your app, capturing your first error, and viewing the dashboard.

1. Create a Project

Via the Web Dashboard

  1. Go to your Codmir dashboard
  2. Click New Project
  3. Enter a project name (e.g., "my-saas-app")
  4. Choose a template or start blank
  5. Click Create

Via the CLI

codmir project create --name "my-saas-app"

Via the API

import { CodmirClient } from '@codmir/sdk';

const client = new CodmirClient({
  apiKey: process.env.CODMIR_API_KEY,
});

const project = await client.createProject({
  name: 'my-saas-app',
  description: 'SaaS application with AI-powered features',
});

console.log(`Project created: ${project.id}`);

2. Connect Your GitHub Repository

  1. Go to Project Settings > Integrations > Git
  2. Click Connect GitHub
  3. Authorize Codmir to access your repositories
  4. Select the repository to link

Alternatively, use the CLI from your project directory:

cd ~/my-saas-app
codmir link --project <project-id>

Once connected, Codmir automatically syncs branches, commits, and pull requests with your tickets.

3. Add the SDK to Your App

Install the SDK:

npm install @codmir/sdk

Initialize it in your application entry point. Here is a Next.js example:

// app/layout.tsx or pages/_app.tsx
import * as Codmir from '@codmir/sdk/nextjs';

Codmir.init({
  dsn: process.env.NEXT_PUBLIC_CODMIR_DSN,
  traceAI: true,
});

Your DSN is available in Project Settings > General > DSN.

4. Capture Your First Error

Add a test error to verify the integration:

import { captureException, captureMessage } from '@codmir/sdk/nextjs';

// Option 1: Capture a test exception
try {
  throw new Error('Test error from Codmir setup');
} catch (error) {
  captureException(error);
}

// Option 2: Capture a test message
captureMessage('Codmir SDK initialized successfully', 'info');

Deploy or run your app locally. The error will appear in your dashboard within a few seconds.

5. View the Dashboard

Go to your project in the Codmir dashboard. You should see:

  • Issues -- your test error appears here with a full stack trace
  • Events -- a timeline of all captured events
  • Session Replay -- if replay is enabled, recorded sessions appear here

The dashboard also shows:

  • Error counts and trends over time
  • Affected users per error
  • Release tracking (which deploy introduced a bug)

What to Do Next

Now that your project is connected and capturing data, explore these guides: