# Developer Platform

<div data-with-frame="true"><figure><img src="https://1101552469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTd3PVPFz34p4DBREd9lj%2Fuploads%2FFz5rpz0y2PEMysSOpW29%2FTrademark-Guardian-2.svg?alt=media&#x26;token=e9c8c140-f022-4278-b5aa-7e71977318ea" alt="" width="375"><figcaption></figcaption></figure></div>

<h4 align="center">Advanced fraud detection and risk assessment for modern applications</h4>

<p align="center">Detect bots, VPNs, browser tampering, and suspicious behaviour with enterprise-grade accuracy.</p>

<p align="center"></p>

{% columns %}
{% column width="50%" %}

### Stop fraud before it costs you

Built for teams who can't afford to get security wrong. Crystal-clear endpoints, proven examples, and rock-solid authentication get you from zero to protected in one commit.

**Deploy fast. Sleep better.**

<a href="https://app.gitbook.com/o/j0iZplCciv5tsyDcHsM9/s/aQpbYgAyZEBrDPFZtNaq/" class="button primary" data-icon="rocket-launch">Get started</a> <a href="https://app.gitbook.com/o/j0iZplCciv5tsyDcHsM9/s/WdkycQNlII5Zn99VIAkw/" class="button secondary" data-icon="terminal">Help Center</a>
{% endcolumn %}

{% column width="50%" %}
{% code title="Your Frontend" overflow="wrap" %}

```javascript
// frontend/guardian.ts
import { loadAgent } from '@guardianstack/guardian-js';

// 1) Initialize once at app startup
const guardian = await loadAgent({
  siteKey: 'site_XXXXXXXX',
});

// 2) Trigger an identification exactly where it matters (login, signup, checkout)
const res = await guardian.get();

// 3) Extract the requestId and send it to your backend for risk evaluation
const requestId = res?.requestId;

```

{% endcode %}

{% code title="Your Backend" overflow="wrap" %}

```javascript
// server/guardian.ts
import { createGuardianClient } from '@guardianstack/guardianjs-server';

// 1) Create the server client with your secret (server-only; never expose in the browser)
const guardian = createGuardianClient({ secret: 'sec_XXXXXXXX' });

// 2) Fetch the processed event by requestId (includes IP intel + detections)
const event = await guardian.getEvent(requestId);

// 3) Make a simple allow/deny decision based on detections
const risky = Boolean(
  event.botDetection?.detected ||
  event.tampering?.detected ||
  event.virtualization?.detected ||
  event.incognito?.detected ||
  event.privacySettings?.detected ||
  event.vpn?.detected
);

if (risky) { 
  /* High risk: deny or require step-up (CAPTCHA/OTP/KYC) */ 
} else { 
  /* Low risk: proceed */ 
}
```

{% endcode %}
{% endcolumn %}
{% endcolumns %}

<h3 align="center">Learn more about Guardian</h3>

<p align="center">Transform from integration to expertise with in-depth guides, advanced techniques, and the security patterns that keep the bad actors out and your users protected.</p>

<p align="center"> <a href="https://app.gitbook.com/o/j0iZplCciv5tsyDcHsM9/s/aQpbYgAyZEBrDPFZtNaq/" class="button primary" data-icon="book">Documentation</a></p>

<h2 align="center"></h2>

<h2 align="center"></h2>
