Documentation

Set up with AI

Copy a prompt for Cursor or Claude Code to install Gatherly.

What this is

Generate a detailed prompt for Cursor, Claude Code, or another coding agent. It includes your framework, public key, and links to the matching Gatherly docs so the agent can install the widget — and optionally wire verified user authentication.

Configure your prompt

Pick your framework and whether you need verified user identity. Copy the prompt into Cursor, Claude Code, or another coding agent so it can install Gatherly for you.

User authentication

Copy into your AI

Paste this into Cursor, Claude Code, Copilot Chat, or similar.

You are implementing Gatherly (user feedback / bugs / ideas / chat widget) in this codebase.

## Target stack
- Framework: Vanilla JavaScript / Static HTML (platform id: html)
- Project: (using placeholder public key — replace with the real key from the dashboard if needed)
- Embed script URL: https://YOUR_DOMAIN/embed.js
- Public key (data-key): pk_live_…

## Documentation (follow these — do not invent Gatherly APIs)
- Overview: https://www.gatherly.sh/docs?platform=html
- Install for Vanilla JavaScript / Static HTML: https://www.gatherly.sh/docs/install?platform=html
- JavaScript API (open / close / invalidate): https://www.gatherly.sh/docs/javascript-api
- Dashboard embed snippet: https://www.gatherly.sh/dashboard/project/embed

## Goal
Set up Gatherly end-to-end so the floating launcher appears on the product and submissions reach the Gatherly inbox.

## Step 1 — Install the widget
1. Read https://www.gatherly.sh/docs/install?platform=html and implement the Vanilla JavaScript / Static HTML install pattern for this repo.
2. Use exactly:
   - src="https://YOUR_DOMAIN/embed.js"
   - data-key="pk_live_…"
3. Load the script once globally (root layout / index / primary template) — not on every client navigation.
4. Confirm the launcher appears after a refresh.

## User authentication
Do NOT implement identity JWTs, data-auth-token, or GATHERLY_SECRET_KEY.
Leave the widget usable anonymously (visitors may type an email in the panel if prompted).
Skip Chats / auth-required audience unless the product owner enables those later.

## Constraints
- Prefer the linked Gatherly docs for this platform; do not invent endpoints or claim shapes.
- Public key is safe in the client; secret key is server-only.
- Do not remove existing app auth; integrate Gatherly identity after the app's session exists.
- Keep changes minimal and idiomatic for Vanilla JavaScript / Static HTML.
- When done, summarize files touched and how to verify (launcher visible; optional: send a test message).