@osmn-byhn/antibot
v1.0.1
Published
Production-ready browser-side fraud and bot detection SDK
Maintainers
Readme
@osmn-byhn/antibot
Production-ready, browser-only fraud and bot detection SDK for TypeScript and JavaScript.
Collect browser signals, compute a risk score, and send results to your backend — without blocking users in the browser. Works with React, Vue, Angular, Svelte, Next.js, Nuxt, and Vanilla JS. Zero runtime dependencies.
Install
npm install @osmn-byhn/antibot
# or
pnpm add @osmn-byhn/antibot
# or
yarn add @osmn-byhn/antibotQuick Start
import { createClient } from '@osmn-byhn/antibot';
const client = createClient({ autoStart: true });
client.on('risk:update', (risk) => {
console.log(risk.score, risk.classification);
});
const risk = await client.analyze();
console.log(risk);
// Clean up when done
client.destroy();Full Documentation
Start here if you want to learn everything from a single document:
Complete User Guide → GUIDE.md
The guide covers every method, event, config option, detector, plugin, transport setting, and framework example. You can learn the entire SDK from that file alone.
Additional reference docs:
| Document | Description | |----------|-------------| | GUIDE.md | Complete tutorial & API reference | | docs/api.md | Quick API summary | | docs/configuration.md | Config options | | docs/plugins.md | Plugin system | | docs/examples.md | Framework examples | | docs/best-practices.md | Production tips |
Package Exports
| Import path | Use case |
|-------------|----------|
| @osmn-byhn/antibot | Main SDK |
| @osmn-byhn/antibot/detectors/fingerprint | Fingerprint detectors only |
| @osmn-byhn/antibot/detectors/behavior | Behavior detectors only |
| @osmn-byhn/antibot/detectors/automation | Automation detectors only |
| @osmn-byhn/antibot/detectors/browser | Browser analysis detectors only |
| @osmn-byhn/antibot/transport | Optional network transport |
Build outputs both ESM (dist/index.js) and CommonJS (dist/index.cjs).
Requirements
- Browser environment (DOM +
crypto) - Node.js 18+ for development/build only
License
MIT License — Copyright (c) 2026 BotShield
