Use cases
Drizzle apps on Postgres
How a Drizzle and Postgres app connects to Clivly without moving its data, and which tables become contacts, companies and deals.
Most apps built with Drizzle already keep their customers in Postgres. A
participants, accounts or users table holds the people your business
works with, and the rest of your product reads and writes it. Clivly is built
for that situation: it reads your schema, maps the tables you choose, and
keeps the CRM current from the database you already run.
What changes in your app
Very little. You install the SDK, add a clivly.config.ts that names your
source tables, and start the app. Clivly never connects to your database
directly. The SDK runs inside your app, reads rows through the cursor you
declare, and sends only the fields you map.
Your tables stay as they are. Clivly writes its own records to its own tables, so a change in the CRM never rewrites a row your product owns.
Choose what the team sees
Each table you want in the CRM becomes an entity with one concept:
entities: {
participants: { concept: "contact", source: "participants",
fields: { name: "full_name", email: "email" } },
accounts: { concept: "company", source: "accounts",
fields: { name: "legal_name", domain: "website" } },
}
Field values are the real column names, such as full_name. Tables you do not
map stay out of the CRM, even though discovery lists every table in the schema.
What to check first
- Run
npx clivly statusafter setup. It confirms the key, the connection and that the sync cursor is saved. - Map one table, look at the contacts list, and only then add the next.
- Mark identifiers and billing fields read-only so the team cannot change them from the CRM. See Entities & mapping.
Related
- Sync & cursors explains how changes reach Clivly.
- Frameworks covers the setup for each stack.