Documenting your adapter
Your README is what developers see on npm and GitHub before they install your adapter. Vercel-maintained adapters all use the structure below, so following it lets developers find install steps, credentials, and limitations where they expect them. Community adapters should meet the same bar.
The examples below describe a fictional Matrix adapter. YOUR_PUBLISHED_ADAPTER_PACKAGE is a placeholder, not a package to install. Replace it everywhere, including badges and imports, with the exact npm name of the adapter you own and have published. Verify the installation command and npm links before publishing your README.
README structure
Your README.md should include these sections in order:
Title and badges
Start with the package name as an H1, followed by npm badges and a one-line description.
Installation
Show the install command with chat as a co-dependency.
Quick start
Give a minimal working example that developers can copy. Call the factory function with explicit config so readers can see which credentials they need.
Environment variables
List every environment variable your adapter reads, with a description and example value.
Configuration reference
Document every field in your config interface, including defaults.
Platform setup
Walk through creating the bot account on the platform. Use numbered steps, link to the platform's developer portal, and call out where to find each credential.
Features
List what your adapter supports. Use a feature table if it helps. Call out any limitations.
License
Code-level documentation
Exported types
Export your config and thread ID interfaces so consumers can use them in their own type annotations. The TypeScript declarations that tsup generates are the main API reference for your adapter, so write interface field comments that are useful in editor hover docs.
TSDoc comments on exported interfaces and functions appear in IDE tooltips and generated .d.ts files. Keep them concise and factual.
What not to document
- Internal or private methods. They're implementation details.
- Types re-exported from
chator@chat-adapter/shared. Link to the upstream docs instead. - Obvious behavior.
postMessageposts a message and needs no further explanation.
Sample messages file
Include a sample-messages.md file in your package root with real webhook payloads from the platform. Contributors use these payloads to reproduce and debug parser edge cases.
Vercel-maintained adapters include a sample-messages.md file in their package roots. Use those as a format reference.
Checklist
Before publishing, verify your documentation covers:
Read more
Publishing your adapter
Package, version, and publish your community Chat SDK adapter to npm.
List a vendor-official adapter
Qualify for the vendor-official tier and add your adapter to the Chat SDK docs, @chat-adapter/catalog, create-chat-sdk, and eve.dev/integrations.
Overview
Overview of Chat SDK adapters, adapter tiers, and where to find platform, state, and catalog guides.
Building an adapter
Learn how to build your own Chat SDK adapter for any messaging platform.