Live: https://answerly-liard.vercel.app · Demo login: demo@answerly.app / Demo123! · Widget demo: https://answerly-liard.vercel.app/demo
Train an AI support agent on your docs and embed it on any website with one script tag. Grounded answers, real citations, polite refusals for anything off-topic.
- Knowledge ingestion: upload PDF/TXT/MD files, paste text, or fetch a URL; content is transcribed to markdown (Gemini handles PDFs natively), chunked along headings, and embedded with
gemini-embedding-001into Supabase pgvector - Grounded answers with citations: cosine similarity search (
match_chunksSQL function, HNSW index) feeds only retrieved context to the model; every answer cites its sources, and zero-match queries short-circuit to the fallback message without an LLM call - Embeddable widget:
<script src=".../embed.js" data-bot-id="...">drops a branded chat bubble on any site;/demois a fake customer site running it live - Dashboard: per-bot knowledge manager with live indexing status, test chat, conversation transcripts (answered/fallback pills + citations), 30-day analytics (conversations chart, answer-rate donut, latency)
- Widget hardening: unguessable bot ids, per-visitor (15/min) and per-bot (120/h) rate limits, optional origin allowlist, message length caps, SSRF-guarded URL fetching
Next.js 14 (App Router) · TypeScript · Tailwind · Supabase (Postgres + pgvector + Storage) · Gemini 2.5 Flash + gemini-embedding-001 · NextAuth v5 · Recharts
- Embeddings are requested at 768 dimensions and L2-normalized in code (output at this dimensionality is not pre-normalized) so cosine distance is correct
- Chunks carry a
sourceTitle > headingprefix, which is what makes citations accurate - Ingestion runs synchronously in the API route (sized to fit Vercel's 60s hobby limit); the dashboard polls source status, no queue infrastructure
npm install
cp .env.example .env.local # fill in Supabase + Gemini keys
node scripts/run-sql.mjs # creates schema incl. pgvector (needs SUPABASE_DB_PASSWORD)
node scripts/seed-demo.mjs # seeds the CloudCanvas demo bot with real embeddings
npm run dev| Var | Purpose |
|---|---|
NEXT_PUBLIC_SUPABASE_URL / NEXT_PUBLIC_SUPABASE_ANON_KEY |
Supabase project + publishable key |
SUPABASE_SECRET_KEY |
server-only key for private Storage |
GOOGLE_GEMINI_API_KEY |
generation + embeddings |
AUTH_SECRET / NEXTAUTH_SECRET |
NextAuth |
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET |
optional Google OAuth |