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:localServices will be available at:
| Service | URL |
|---|---|
| Dashboard | http://127.0.0.1:5175 |
| Collector | http://127.0.0.1:3100/health |
| Demo | http://127.0.0.1:5174 |
Create an App
- Open the Dashboard (http://127.0.0.1:5175)
- Register and sign in
- Click "Create App" and select the app type (H5 / Mini Program)
- Copy the generated
appKey
Integrate H5 SDK
bash
npm install @healthguard/sdk-webjs
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
- Trigger a JavaScript error in the Demo or your own app
- Return to the Dashboard and open the Issue list
- You should see the error aggregated into an Issue