Claude Templates / A-tier · High leverage

Admin & Ops

The Support Inbox Playbook

In-app ticketing and a shared inbox — no third-party helpdesk.

SUPPORT-INBOX-PLAYBOOK.md · 9 sections · 4,911 words · 41 KB · markdown

A full support desk inside your own admin console. Inbound email webhook to ticket threading with global ticket numbers, a conversation spine that also carries internal notes and personal mailboxes, threaded outbound replies, unread tracking, realtime toasts, full-text search, and answer suggestions from resolved tickets.

What's inside

When to use it

Weeks 3-4, after email infrastructure and the admin shell.

Straight from the file

The system is one conversation spine reused by three parent types. Support tickets are the primary one; the same mailboxes + conversation_messages + conversation_events + conversation_attachments tables also back leads (sales pipeline) and mail_threads (free-form personal team email). This playbook documents the support-ticket path end to end and notes where the spine is shared, so you can ship tickets alone and add leads/personal-mail later without re-architecting.

Table of contents

  1. 0. Architecture in one breath
  2. 1. Database schema (the canonical DDL)
  3. 2. Email helper libraries (src/lib/email/)
  4. 3. Inbound webhook — POST /api/email/inbound (runtime='nodejs')
  5. 4. Operator-facing API + UI
  6. 5. Env vars + external setup
  7. 6. Adaptation checklist (per new app)
  8. 7. Build order (slices — pause after each per planning rules)
  9. 8. Hard-won rules (bake these in — they are non-obvious)

How to run it

Drop SUPPORT-INBOX-PLAYBOOK.md into your repo, then tell Claude Code: “Read SUPPORT-INBOX-PLAYBOOK.md and implement it in this codebase.” It's written for an agent to execute end to end. Search the file for angle-bracket placeholders and swap in your own project names, domains, and keys before the first run.

↓ Download the playbook

More admin & ops playbooks

← All 28 Claude templates