Skip to content

Devansh-365/nyasa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nyasa

See who is really in the browser — humans, scripted automation, headless runtimes, and LLM-style agents leave different traces. nyasa collects behavioral, fingerprint, and network signals in the page, runs client-side detection rules, and posts a structured payload to your endpoint so you can score or route the session.

Website — docs & demo npm TypeScript

browser-sdk · behavioral-signals · bot-detection · llm-agents · fraud-adjacent


The problem

Automation does not announce itself. Bots and agents often look like a normal browser session once traffic reaches your API. You lose timing and environment detail that only exists on the client. nyasa runs in the page: it attaches collectors across the document and your chosen container, evaluates detections locally, and uses sendBeacon to forward a payload you can score or route—without asking visitors for extra steps.


What you get

Area What
Identity, not intent Surfaces who or what is likely operating the session. Business and risk rules stay on your side.
Documented signals Behavioral, fingerprint, and network pillars described in the docs—so you know what each field implies.
Flows beyond a single form Attach to a wrapper element (checkout, login, onboarding, agent surface) or scale up; many collectors already run at document scope.
Two ways to load ESM for bundlers and an IIFE build for a script tag (Quickstart).
Try it live Docs, API reference, and an interactive demo at nyasa-beta.vercel.app.

Documentation

Start here → Quickstart · Docs home · Demo


Install

npm install @devanshhq/nyasa

Package: @devanshhq/nyasa ·


Minimal example

import { collect } from "@devanshhq/nyasa";

// Pass a form, a div around a wizard, a section, or document.body — see Quickstart.
const handle = collect("#your-flow-root", {
  endpoint: "https://your-api.example.com/ingest",
  sessionId: crypto.randomUUID(),
});

Monorepo

Path Role
apps/sdk/ Published @devanshhq/nyasanpm run builddist/ (ESM + IIFE + types)
apps/web/ Next.js — marketing site, /docs, /demo

Development

npm install
npm run web        # site + docs + demo
npm run build      # SDK only
npm run typecheck  # all workspaces

Releases

No releases published

Packages

 
 
 

Contributors