DB sync adapters are packages that translate incoming Titan webhook events into database writes. Instead of writing a webhook handler from scratch, you install the adapter for your platform, run its migration, deploy the handler, and register the URL with Titan. The adapter handles signature verification, deduplication, and mapping each event type to the right tables or collections. Every adapter provides the same three guarantees:Documentation Index
Fetch the complete documentation index at: https://docs.usetitan.app/llms.txt
Use this file to discover all available pages before exploring further.
- Webhook signature verification — requests with invalid HMAC-SHA256 signatures are rejected before any database write occurs.
- Idempotent event processing — events are deduplicated by event ID, so replayed deliveries do not create duplicate records.
- Event-to-database mapping — each event type (
message.received,session.status,contact.update, etc.) is mapped to the appropriate tables or collections for your platform.
Available adapters
| Adapter | Package | Database | Install |
|---|---|---|---|
| Supabase | @titan-api/supabase | PostgreSQL (Supabase) | npm install @titan-api/supabase |
| Convex | @titan-api/convex | Convex | npm install @titan-api/convex |
| Firebase | @titan-api/firebase | Cloud Firestore | npm install @titan-api/firebase |
| Laravel | titan/laravel | MySQL/PostgreSQL | composer require titan/laravel |
| Cloudflare | @titan-api/cloudflare | D1 (SQLite) | npm install @titan-api/cloudflare |
| Vercel | @titan-api/vercel | PostgreSQL (Vercel Postgres) | npm install @titan-api/vercel |
| AWS | @titan-api/aws | DynamoDB | npm install @titan-api/aws |
| Azure | @titan-api/azure | Cosmos DB | npm install @titan-api/azure |
| GCP | @titan-api/gcp | Cloud SQL (PostgreSQL) | npm install @titan-api/gcp |
| DigitalOcean | @titan-api/digitalocean | Managed PostgreSQL | npm install @titan-api/digitalocean |
| Netlify | @titan-api/netlify | Neon PostgreSQL | npm install @titan-api/netlify |
titan/laravel live in the titan-api/sdks monorepo under packages/.
How adapters work
When Titan delivers a webhook event to your endpoint, the adapter processes it in order:- Receives the raw HTTP request from Titan
- Verifies the HMAC-SHA256 signature on the
X-Webhook-Signatureheader - Checks whether the event ID has already been processed (deduplication)
- Maps the event payload to one or more database writes
- Returns a
200response to Titan
Setup pattern
All adapters follow the same five-step setup. See each adapter’s README for platform-specific details.Install the package
Install the adapter package for your platform using the command in the table above.
Run the migration or schema setup
Each adapter ships with a migration file or schema definition. Run it against your database to create the tables or collections the adapter writes to. SQL-based adapters provide a
.sql file; platform-native adapters (Convex, Firebase) provide a schema definition file.Deploy the webhook handler
Create a webhook endpoint using the handler exported by the adapter. The handler is a standard request handler for your platform — a Supabase Edge Function, a Vercel API route, a Cloudflare Worker, a Laravel route, and so on.
Register the webhook URL with Titan
Register your deployed endpoint with Titan so it knows where to deliver events:
What gets written to the database
Adapters map event types to database records. The exact schema depends on the platform, but all adapters cover the core event categories:| Event category | What gets written |
|---|---|
message.received, message.sent | Message records with sender, recipient, type, content, and timestamp |
session.status, session.connected | Session state and connection history |
contact.update | Contact info including display name and profile picture URL |
group.update, group.participant | Group metadata and participant lists |
chat.archive, chat.mute, chat.read | Chat state flags |
Titan does not store message content. Adapters write the event payload that Titan delivers — which is the message content your webhook receives at delivery time. If you need a full message archive, adapters are the recommended approach.