โ† Back to Utilities
๐Ÿ”FREEIntermediate

CLERK + PRISMA USER SYNC

Clerk webhooks โ†’ Prisma upsert. Drop-in Next.js route handler.

Single TypeScript file. Verifies the Clerk Svix signature, parses the webhook payload with proper TypeScript types, and runs Prisma upsert (create/update) or deleteMany (delete) โ€” idempotent because upsert handles Clerk's at-least-once delivery. Includes the reference Prisma User model in a JSDoc setup block, plus the skip-on-no-email edge case so Clerk doesn't retry forever for users without an email yet.

FREE

NO PURCHASE REQUIRED

Instant download after checkout.
Inject via CLI.

Tech Stack

Next.js 14+
TypeScript
@prisma/client
svix

WHAT'S INCLUDED

โ–ธSvix signature verification
โ–ธIdempotent upsert on create + update
โ–ธReference Prisma User model included
โ–ธSkip-on-no-email edge case handled

TAGS

clerkprismaauthnext.jstypescriptwebhooks

NEED SOMETHING DIFFERENT?

Get a custom utility built to your exact specs.

Request Custom Build โ†’