Getting Started
Deskly is a Next.js app for embeddable, multi-tenant AI chat widgets: each account runs unlimited bots, each bot has its own public embed key, domain allowlist, and document-scoped knowledge base. Follow the steps below until you have a bot embedded and answering questions on a real page.
Quick Start
-
Clone and install
git clone https://github.com/boilerlykit/deskly.git cd deskly pnpm install -
Set up environment variables
- Copy
.env.local.exampleto.env.local - Follow the Configuration Guide to fill in Supabase, AI provider, and (optionally) Resend/CRM keys
- Copy
-
Set up the database
- Run the SQL schema from
src/db/schema.sqlin your Supabase SQL editor - Create a storage bucket named
uploadsin Supabase Storage
- Run the SQL schema from
-
Start the dev server
pnpm dev -
Run the built-in setup checklist (recommended)
- Visit
/dashboard/setupto validate your environment variables and database schema
- Visit
-
Create your first bot
- Sign in, open
/dashboard/bots, create a bot, and add at least one domain to its allowed-domains list (a bot with no allowed domains never renders — secure by default) - Upload a document so the bot has something to answer from
- Sign in, open
-
Embed it
<script src="https://your-deploy-url.com/widget.js" data-bot-key="pk_..." async></script>Drop this before
</body>on any page. It injects a sandboxed iframe bubble in the bottom-right corner — see Embeddable Widget for how the isolation and resize behavior work.
What ships
- Multi-tenant bots — a
botstable, not a single hard-coded assistant; see Architecture - Embeddable iframe widget — one script tag, CSS-isolated from the host page
- Per-bot RAG — uploads scoped to a bot, not the whole account; see RAG Pipeline
- Abuse protection — visitor, hourly, and daily rate limits plus a real owner credit check; see Abuse Protection
- Lead capture — email/phone extraction and owner email alerts; see Lead Capture
- Same foundation as the base template — Supabase Auth, Postgres RLS, Stripe credits, unchanged
Documentation
| Guide | Description |
|---|---|
| Configuration | Environment variables setup |
| Architecture | The multi-tenant bots layer |
| Embeddable Widget | Script tag, iframe, domain checks |
| RAG Pipeline | Per-bot document upload and retrieval |
| Abuse Protection | Rate limits and credit guardrails |
| Lead Capture | Extraction, storage, email alerts |
| API Reference | Widget and CRM endpoints |
| CRM Integrations | Jobber/Housecall Pro OAuth scaffold |
| Deployment | Production deployment guide |
| Troubleshooting | Common issues and solutions |
Next Steps
- Configure your environment variables
- Create a bot in
/dashboard/botsand upload a document - Embed the widget on a test page
- Deploy to production