> ## Documentation Index
> Fetch the complete documentation index at: https://tinytalk.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CLAUDE

# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

Documentation site for Tiny Talk, an AI chatbot SaaS platform. Built with [Mintlify](https://mintlify.com) — push to `main` triggers automatic deployment via Mintlify's GitHub App.

## Commands

```bash theme={null}
npx mintlify@latest dev    # Local preview at http://localhost:3000
```

No build step, no tests. Mintlify handles deployment.

## Site Structure

```
docs.json                    # Mintlify config (nav, theme, colors, tabs)
index.mdx                   # Homepage
quickstart.mdx              # 5-step getting started guide
install.mdx                 # Widget embed (script + iframe) + platform guides
plans.mdx                   # Plan comparison table + limits explanation
faq.mdx                     # Common questions
changelog.mdx               # Release notes
features/
  ai-models.mdx             # 50+ model table, credits, BYOK
  knowledge-base.mdx        # Upload, crawl, Google Drive, Notion
  messenger.mdx             # Widget appearance, spaces, welcome messages
  help-desk.mdx             # Inbox, human handoff, notifications
  contacts-leads.mdx        # Lead forms, custom attributes
  analytics.mdx             # KPI, charts, plan gating
  localization.mdx          # 11 languages, RTL
integrations/
  overview.mdx              # Integration hub
  whatsapp.mdx              # WhatsApp Business setup
  slack.mdx                 # Slack OAuth
  zapier.mdx                # Zapier + Pabbly
  webhooks.mdx              # Webhook CRUD, event types
workspace/
  workspaces.mdx            # Create/manage workspaces
  roles-permissions.mdx     # RBAC matrix (Owner/Admin/Editor/Viewer)
api-reference/
  introduction.mdx          # Auth methods, base URL, error format
```

## Tiny Talk Ecosystem

Context for writing accurate documentation:

| Service | Purpose |
| - | - |
| **tiny-talk-backend** | Node.js REST API — auth, RBAC, billing (Stripe), bots, workspaces, real-time (Socket.io) |
| **tiny-talk-dashboard** | Vue 3 SaaS dashboard — the UI users interact with |
| **tiny-talk-sdk** | Browser chat widget (`@tinytalk/browser`) — script tag or ESM, Shadow DOM, lazy iframe |
| **tiny-talk-caddymate** | Custom domain support — Caddy reverse proxy + domain validator |
| **tiny-talk-wordpress-plugin** | WordPress plugin with rule-based agent resolution |
| **tiny-talk-zapier** | Zapier integration app |
| **tiny-talk-workflows** | Reusable GitHub Actions CI/CD |
| **tiny-talk-gitops** | Kubernetes deployments — Helm, ArgoCD, Terraform (Hetzner) |
| **postboy-backend** | Email dispatch and conversation service (SQS/SES) |
| **lobster** | Distributed web crawler (Puppeteer/Crawlee) for knowledge base |
| **reamer** | Document ingestion/vectorization — supports PDF, DOCX, XLSX, PPTX, CSV, MD, TXT |
| **ferry** | Analytics pipeline — SQS consumer indexing to ElasticSearch |
| **cooper** | Node.js REST API — AI agents, streaming endpoint |

## Key Product Facts

Reference these when writing or reviewing docs:

* **AI providers**: OpenAI, OpenRouter, Groq. OpenAI key is always required (embedding model).
* **Message counting**: Every message counts — visitor messages AND replies (AI or human agent).
* **Character limits**: Permanent storage (like a USB stick), not monthly. Freed when content is deleted.
* **Credits**: Reset monthly. Cost depends on AI model (1, 2, 10, or 20 credits per response).
* **SDK CDN URL**: `https://cdn.tinytalk.ai/latest/tiny-talk-sdk.min.umd.js`
* **SDK attributes**: `data-tiny-bot-id` (required), `data-tiny-options` (optional). No `id` needed. Use `defer`.
* **Roles**: Owner, Admin, Editor, Viewer — workspace-scoped RBAC.
* **File types**: PDF, Word, Excel, PowerPoint, CSV, Markdown, plain text.
* **Knowledge sources**: File upload, website crawl, Google Drive, Notion.
* **Supported languages**: English, Arabic, Dutch, French, German, Hungarian, Italian, Japanese, Portuguese, Romanian, Spanish.

## Writing Conventions

### Terminology and style

* Use "agent" (not "bot") in user-facing text — matches dashboard terminology
* Second-person voice ("you") for instructions and procedures
* Active voice, present tense for current states
* Define jargon on first use; keep sentences concise with necessary context
* Parallel structure in lists, headings, and procedures
* UI navigation paths use `→` not `>` (e.g., **Settings → Billing**, not **Settings > Billing**)

### Content organization

* Lead with the most important information (inverted pyramid)
* Progressive disclosure: basic concepts before advanced ones
* Prerequisites and context before instructions
* Break complex procedures into numbered steps; include expected outcomes for major steps
* Search for existing content before adding new pages — avoid duplication
* Keep quickstart minimal — link to feature pages for details
* Keep changelog entries concise — name the change, the headline value, and link to the feature page; don't restate every spec
* Prices, plan limits, and model lists may change — verify against `tiny-talk-backend/src/configs/plans.js` and `tiny-talk-backend/src/enums/ModelRegistry.js`

### Page structure

Every MDX page must begin with YAML frontmatter:

```yaml theme={null}
---
title: "Clear, specific, keyword-rich title"
description: "Concise description explaining page purpose and value"
---
```

Heading hierarchy starts at H2 (`##`) — the `title` in frontmatter renders as H1.

### Mintlify component selection

* `<Steps>` — procedures and sequential instructions
* `<Tabs>` — platform-specific content or alternative approaches
* `<CodeGroup>` — same concept in multiple programming languages
* `<Accordion>` / `<AccordionGroup>` — progressive disclosure of supplementary information
* `<Tip>`, `<Info>`, `<Warning>` — callouts for helpful context, notes, and cautions
* `<Card>` / `<CardGroup>` — feature overviews and navigation
* `<ParamField>` — API parameters; `<ResponseField>` — API responses
* `<Expandable>` — nested object properties or hierarchical information

### Code examples

* SDK embed snippets: `src` first, then `data-` attributes, then `defer`
* Language tags on all code blocks; include filename when relevant
* Complete, runnable examples — realistic data, not placeholder values
* Never include real API keys or secrets

### Accessibility

* Descriptive alt text on all images and diagrams
* Specific, actionable link text (not "click here")
* Relative paths for internal links


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.