Lovable, Bolt.new, Replit & v0: add EU AI Act Art. 50 notices & HMAC receipts in 60 seconds
Ship a Lovable, Bolt.new, v0 or Replit app with an AI chat? Scan it, copy one builder prompt, and get a visible Art. 50(1) notice in 24 EU languages plus keyed HMAC call receipts, with secrets kept server-side.
Make your app Art. 50 ready
spurvik@1.0.18 · badge.jsAdd Spurvik (open-source MIT EU AI Act SDK, spurvik@1.0.18) to this app:
1. Frontend (React): install spurvik@1.0.18 and render <AIDisclosureLabel notice="interaction" attribution={true} /> from "spurvik/react" directly above the chat messages so it is visible before the first message without clicking (Free: shows the small "Art. 50 · Spurvik" link).
2. Edge Function (supabase/functions/*/deno.json): map "spurvik" to "npm:spurvik@1.0.18" and "spurvik/" to "npm:/spurvik@1.0.18/". Keep all model calls inside the Edge Function, never in src/.
3. Secrets (Supabase Edge Function secrets ONLY, never VITE_): read SPURVIK_API_KEY, SPURVIK_SIGNING_SECRET, SPURVIK_CONTENT_HASH_SECRET, SPURVIK_BASE_URL and SPURVIK_RISK_TIER ("minimal" | "limited_art50" | "high_annex3"; never default riskTier). Throw a clear Missing variable error if any is unset, without logging secret values or user prompts.
4. Wrap the AI model with spurvikMiddleware({ apiKey, signingSecret, contentHash: { mode: "keyed", secret: contentHashSecret }, baseUrl, riskTier, article50Disclosure: true, registerProcessHooks: false, telemetry: { flushTimeoutMs: 3000 } }) from "spurvik/ai" (or withSpurvik from "spurvik" for direct OpenAI/Anthropic/Gemini SDK calls). Flush inside EdgeRuntime.waitUntil when available, and return only receipt.eventId to the browser.
Live badge.js preview
Free €0 · Pro €19/mo (€190/yr) · Team €79/mo (€790/yr) · Done-For-You €199 once, 1 year of Pro included · excl. VAT · B2B (solo founders & agencies welcome).
Option 1: 1-line HTML script tag (any site, 0 npm packages)
If your chat widget lives in Webflow, Shopify, WordPress, or a static HTML shell, paste one script tag before </body>. It renders inside an isolated Shadow DOM in all 24 official EU languages (auto-detecting <html lang> or data-locale), sets 0 cookies, and makes 0 network telemetry requests:
<script src="https://spurvik.com/badge.js" data-system="Support Assistant" data-locale="en" data-theme="dark" defer></script>Place <div data-spurvik-badge></div> above your chat input for inline placement, or omit it to float a compact pill in the bottom-right corner.
The badge shows a small “Art. 50 · Spurvik” link after the notice. On Pro (€19/mo), add data-attribution="false" to the script tag for a white-label badge with no Spurvik link.
Option 2: Copy-paste prompt for Lovable + Supabase
Lovable apps run Vite + React in the browser and Deno inside Supabase Edge Functions. Never put SPURVIK_API_KEY or SPURVIK_SIGNING_SECRET in VITE_ variables. Paste this exact prompt into Lovable so the notice renders in React while model calls and HMAC keys stay locked inside the Supabase Edge Function:
Add Spurvik (open-source MIT EU AI Act SDK, spurvik@1.0.18) to this app:
1. Frontend (React): install spurvik@1.0.18 and render <AIDisclosureLabel notice="interaction" /> from "spurvik/react" directly above the chat messages so it is visible before the first message without clicking.
2. Edge Function (supabase/functions/*/deno.json): map "spurvik" to "npm:spurvik@1.0.18" and "spurvik/" to "npm:/spurvik@1.0.18/". Keep all model calls inside the Edge Function — never in src/.
3. Secrets (Supabase Edge Function secrets ONLY, never VITE_): read SPURVIK_API_KEY, SPURVIK_SIGNING_SECRET, SPURVIK_CONTENT_HASH_SECRET, SPURVIK_BASE_URL, and SPURVIK_RISK_TIER ("minimal" | "limited_art50" | "high_annex3" — never default riskTier). Throw a clear Missing variable error if any is unset without logging secret values or user prompts.
4. Wrap the AI model with spurvikMiddleware({ apiKey, signingSecret, contentHash: { mode: "keyed", secret: contentHashSecret }, baseUrl, riskTier, article50Disclosure: true, registerProcessHooks: false, telemetry: { flushTimeoutMs: 3000 } }) from "spurvik/ai" (or withSpurvik from "spurvik" for direct OpenAI/Anthropic/Gemini SDK calls). Flush inside EdgeRuntime.waitUntil when available, and return only receipt.eventId to the browser.Option 3: Copy-paste prompt for v0, Bolt.new & Replit
For Next.js App Router (v0 / Bolt.new) or Node.js servers (Replit Agent), paste this prompt to wrap your server route and keep secrets out of NEXT_PUBLIC_:
Install spurvik@1.0.18 from npm (MIT) and wire EU AI Act transparency & HMAC logging:
1. Client UI: import { AIDisclosureLabel } from "spurvik/react" and render <AIDisclosureLabel notice="interaction" /> above the AI assistant output.
2. Server Route (app/api/chat/route.ts or Express server — never NEXT_PUBLIC_): validate SPURVIK_API_KEY, SPURVIK_SIGNING_SECRET, SPURVIK_CONTENT_HASH_SECRET, SPURVIK_BASE_URL, and SPURVIK_RISK_TIER ("minimal" | "limited_art50" | "high_annex3" — throw if unset, never default riskTier), then wrap the model with spurvikMiddleware from "spurvik/ai" (for Vercel AI SDK streamText/generateText) or withSpurvik from "spurvik" (for OpenAI/Anthropic/Gemini) using contentHash: { mode: "keyed", secret: contentHashSecret } and article50Disclosure: true.
3. Never log raw user prompts or personal data to console.log.| Control | Free (€0 — MIT SDK + Free Console tier) | Spurvik Pro (€19/mo · €190/yr, excl. VAT · B2B) |
|---|---|---|
| Visible Art. 50(1) AI notice (24 EU languages) | Included locally (spurvik/react + badge.js, no account) | Included + hosted disclosure telemetry |
| Keyed HMAC-SHA256 receipts (0 bytes prompt text) | In-process (no account) + 10k hosted events/mo (30d, free workspace) | 250,000 events/mo · 90-day Frankfurt (fra1) vault |
| Human approval gate (Slack, Teams, Linear, Email) | Signed webhook helpers in spurvik/channels | Hosted review queue + kill switch |
| Client / DPO handover package | Manual JSON receipts | 1-click DPO Engineering Summary (.md) (Annex IV draft on Team · €79/mo) |
| AI notice badge link | Small “Art. 50 · Spurvik” link after the notice | White-label badge: hide the link with data-attribution="false" |
Important scope boundaries
- Visible interaction notice ≠ Article 50(2) marking:
<AIDisclosureLabel />andbadge.jsshow a human-readable AI interaction notice (supporting Art. 50(1)). Spurvik's HMAC provenance receipt verifies call metadata with your secret, but does not watermark or embed C2PA/machine-readable output marking under Article 50(2) (whose transition window for pre-August 2026 generative systems runs to 2 December 2026 under Art. 111(4)). - Your own risk classification: pass your own
SPURVIK_RISK_TIER(minimal,limited_art50, orhigh_annex3) after checking with counsel. Article 12 record-keeping and Article 14 human oversight apply to high-risk AI systems.
Test your app URL or paste a route file right now
Open the live sandbox with no login to preview the badge on your domain, paste your package.json or route handler into the 100% local in-browser code checker, or spin up a Frankfurt workspace for client handoff:
Free €0 (10k events/mo, badge with “Art. 50 · Spurvik” link) · Pro €19/mo or €190/yr (2 months free, white-label badge) · Done-For-You €199 once · Team €79/mo · excl. VAT · B2B (solo founders & agencies welcome).
FAQ
Can I put SPURVIK_API_KEY or SPURVIK_SIGNING_SECRET in Lovable VITE_ or Next.js NEXT_PUBLIC_ variables?
No. Never expose SPURVIK_API_KEY, SPURVIK_SIGNING_SECRET, or SPURVIK_CONTENT_HASH_SECRET in browser bundles (VITE_ or NEXT_PUBLIC_). Keep them strictly inside Supabase Edge Function secrets, Replit Secrets, or server-only Next.js Route Handlers. On the frontend, only render <AIDisclosureLabel /> from spurvik/react or the zero-cookie https://spurvik.com/badge.js script.
Does badge.js set cookies, send telemetry, or satisfy Article 50(2) machine-readable marking?
badge.js sets zero cookies, makes zero telemetry requests, and isolates its styles in Shadow DOM across all 24 official EU languages. It displays a visible human interaction notice supporting Article 50(1) only; it does not watermark or cryptographically mark generated media or text under Article 50(2).
When do agencies and SaaS founders upgrade from the free MIT SDK to Spurvik Pro (€19/mo)?
The MIT SDK (spurvik 1.0.18) and badge.js cost €0 with no account required. Teams and agencies connect console.spurvik.com and upgrade to Pro (€19/mo or €190/yr, excl. VAT, B2B only) when handing off a live app to a European client or DPO who needs 90-day Frankfurt (fra1) HMAC log retention, a hosted human approval queue, a white-label badge, and downloadable DPO Engineering Summary (.md). Team (€79/mo or €790/yr) adds 2,000,000 events/mo, 12-month retention, webhook export, and Annex IV technical documentation drafts.
Does Spurvik work in Deno-based Supabase Edge Functions used by Lovable?
Yes. Map spurvik to npm:spurvik@1.0.18 and spurvik/ to npm:/spurvik@1.0.18/ in the Edge Function's deno.json, pass registerProcessHooks: false, and flush with a 3-second cap inside EdgeRuntime.waitUntil when available.
Sources
- SDK on npm: https://www.npmjs.com/package/spurvik (1.0.18; MIT)
- Drop-in badge script: https://spurvik.com/docs#badge (
badge.js1.0.6, Shadow DOM, 24 EU languages) - Article 50 dates & checklist: https://spurvik.com/art50-deadline-checklist