Next.js 15 · TypeScript · MySQL
Next.js App Router
apps/web in this monorepo — marketing, dashboard, console APIs, and identify rewrites to identify-api.
View guide →This repository is the reference implementation. Copy patterns for npm, script tag, cross-origin, and server-side Events enrichment.
Starters
Next.js 15 · TypeScript · MySQL
apps/web in this monorepo — marketing, dashboard, console APIs, and identify rewrites to identify-api.
View guide →Vite · React · port 3002
apps/test-site (Vite + React, port 3002) validates SDK tracking across a different origin from the main app.
View guide →HTML · originid.global.js
Single script tag with apiKey — slim production response; fetch Events on your backend. Add bootstrapToken: 'auto' for fraud/signup keys.
index.html
<script src="/originid.global.js"></script>
<div id="origin-id">Identifying…</div>
<script>
OriginID.init({
endpoint: "/api/identify",
apiKey: "YOUR_SECRET_KEY",
bootstrapToken: "auto", // fraud/signup: pair with conservative merge policy
})
.ready()
.then((r) => {
document.getElementById("origin-id").textContent = r.originId;
// Send r.eventId to your backend for Events GET
});
</script>API · POST /api/account-link
At registration, POST /api/account-link with email + originId to score duplicate-account risk.
View guide →Monorepo
Internal npm scopes are @visitoriq/*; the public SDK class is OriginID (returns a persistent originId).
tree
origin-id-js/
apps/web/ ← marketing, dashboard, console (port 3000)
apps/test-site/ ← cross-origin SDK test (port 3002)
services/identify-api/ ← Fastify performance tier (port 3001)
packages/client/ ← @visitoriq/client (DigitalFingerprint SDK)
packages/core/ ← matching, smart signals, billing
packages/server/ ← shared HTTP handlersLocal setup: docker compose up -d && pnpm install && pnpm db:migrate && pnpm dev. Open /demo on port 3000.
See README.md for prerequisites (Node 20+, pnpm 9+, Docker).