@fingerprint79/sdk-snippets
v0.0.1
Published
Idiomatic init-snippet generators for the Fingerprint Platform SDK across React, Next.js, Vue, Angular, Svelte, Preact, vanilla and SPA — plus the «Copy prompt» markdown builder. Shared between the admin dashboard and the MCP server.
Maintainers
Readme
@fingerprint79/sdk-snippets
Idiomatic init-snippet generators for the Fingerprint Platform SDK (fingerprint-platform-sdk) across the eight frontend frameworks we support:
- React · Next.js · Vue.js · Angular · Svelte · Preact · Vanilla JS · JavaScript SPA
Plus the «Copy prompt» markdown builder that drops a self-contained integration brief into Cursor / Claude / Copilot Chat.
The functions are pure (no React, no DOM, no fs) — the same module powers both the admin dashboard's Install Fingerprint wizard and the fingerprint-platform-mcp AI-assistant tool.
Install
npm install @fingerprint79/sdk-snippets
# or
pnpm add @fingerprint79/sdk-snippetsUsage
import { initSnippet, buildAiPrompt, FRAMEWORKS } from '@fingerprint79/sdk-snippets';
// 1) Per-framework init code (npm or CDN flavour)
const code = initSnippet({
framework: 'react',
source: 'npm',
apiKey: 'wxyz...',
collectorUrl: 'https://yoursite.com/fpjs',
});
// 2) Self-contained markdown brief for an AI assistant
const md = buildAiPrompt({
framework: 'react',
source: 'npm',
apiKey: 'wxyz...',
collectorUrl: 'https://yoursite.com/fpjs',
docsUrl: 'https://docs.yoursite.com',
});
// 3) Browse the supported-framework metadata
for (const fw of FRAMEWORKS) {
console.log(fw.id, fw.label);
}License
MIT
