Quickstart

Five minutes. Four steps.

1. Create a project

Sign in at galacha.me, click New Project, pick a platform. Grab the project key from the project detail page, a long hex string like de762ec3ec20aa17b167ec806a386c94****************. That's what the SDK authenticates with.

2. Install

React / Next.js

npm install @galacha/react

Hooks, Provider, <PrivateBlock>. Works in App Router + Pages Router + Vite + CRA.

Plain HTML, Vite, Vue, Svelte (CDN script)

<script src="https://sdk.galacha.me/sdk/latest/galacha.umd.js"></script>

One line, no build step. If you need the bundle vendored (strict CSP, air-gapped network), email kelvin@galacha.me.

React Native (Expo)

npx expo install @galacha/react-native

Then rebuild the dev client . a JS reload won't pick up the native module:

npx expo run:android
# or
npx expo run:ios

3. Initialize

React / Next.js

import { GalachaProvider } from "@galacha/react";
 
export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <GalachaProvider projectKey={process.env.NEXT_PUBLIC_GALACHA_PROJECT_KEY!}>
      {children}
    </GalachaProvider>
  );
}

That's it. GalachaProvider is a client component by default, safe to drop into app/layout.tsx (Next.js App Router), _app.tsx (Pages Router), or main.tsx (Vite / CRA).

Plain HTML

<script>
  Galacha.init({ projectKey: "your_project_key" });
</script>

Vue, Svelte, other frameworks

See the Web page for framework-specific snippets.

React Native

// app/_layout.tsx  (Expo Router)
import { useEffect } from "react";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import Galacha, { TouchCaptureView } from "@galacha/react-native";
 
export default function RootLayout() {
  useEffect(() => {
    Galacha.init({
      projectKey: process.env.EXPO_PUBLIC_GALACHA_PROJECT_KEY!,
    });
  }, []);
 
  return (
    <GestureHandlerRootView style={{ flex: 1 }}>
      <TouchCaptureView buffer={Galacha.getBuffer()!}>
        {/* rest of your providers + navigation */}
      </TouchCaptureView>
    </GestureHandlerRootView>
  );
}

<TouchCaptureView> is required for touch trails. Without it, you'll still get screen frames . but taps and swipes won't render in the replay.

4. Watch the replay

Open your app, click around, scroll, trigger an error. Go to the dashboard → your project → Sessions. The session appears within a few seconds. Click it to scrub through the replay.


Next steps