Skip to content

Getting Started

This guide helps you start HealthGuard locally and complete your first SDK integration within 5 minutes.

Prerequisites

Run from Source

bash
# Clone the repository
git clone https://github.com/Claud-Lu/healthguard.git
cd healthguard

# Install dependencies
yarn install

# Start all services (Collector + Dashboard + Demo)
yarn dev:local

Services will be available at:

ServiceURL
Dashboardhttp://127.0.0.1:5175
Collectorhttp://127.0.0.1:3100/health
Demohttp://127.0.0.1:5174

Create an App

  1. Open the Dashboard (http://127.0.0.1:5175)
  2. Register and sign in
  3. Click "Create App" and select the app type (H5 / Mini Program)
  4. Copy the generated appKey

Integrate H5 SDK

bash
npm install @healthguard/sdk-web
js
import { createHealthGuardClient } from '@healthguard/sdk-web';

const client = createHealthGuardClient({
  appKey: 'your-app-key',
  endpoint: 'http://127.0.0.1:3100/api/events/batch',
  autoCapture: true
});

Verify

  1. Trigger a JavaScript error in the Demo or your own app
  2. Return to the Dashboard and open the Issue list
  3. You should see the error aggregated into an Issue

Next Steps

Released under the MIT License.