Using Prisma for Schema and Kysely for Queries in a Next.js App
dev.to·7h·
Discuss: DEV
Flag this post

When I first started using Prisma, I loved how easy it made database work - migrations, schema changes, Prisma Studio, all just worked.

But once I started deploying more apps on Vercel and serverless environments, I noticed something: Prisma Client felt a bit heavy.

Every time I deployed, my bundle size grew. And I didn’t really need the full ORM - I just wanted a way to manage my schema and write type-safe SQL queries.

That’s when I found a good balance: 👉 Use Prisma only for schema management, and Kysely for queries.

This setup has been super clean for me in my Next.js projects - and in this post, I’ll show you exactly how to do it.

Why Prisma + Kysely Combo

I like to think of it like this:

  • Prisma is my database architect. It manages the schema, m…

Similar Posts

Loading similar posts...