Prisma
Prisma is an ORM for TypeScript, that allows you to define your database schema and models in a schema.prisma
file, and then generate a type-safe client that can be used to interact with your database from your backend.
Check out What is Prisma? to get a better understanding of what Next.js is and how it works.
The Prisma Schema
Every project that uses a tool from the Prisma ORM toolkit starts with a Prisma schema file. The Prisma schema allows developers to define their application models in an intuitive data modeling language. It also contains the connection to a database and defines a generator
:
Relational Databases
MongoDB
Main Features
- Prisma Client: Auto-generated and type-safe query builder for Node.js & TypeScript
- Prisma Migrate: Migration system
- Prisma Studio: GUI to view and edit data in your database.
Useful Resources
- Prisma Docs https://www.prisma.io/docs
- Prisma GitHub https://github.com/prisma/prisma
- Prisma Migrate Playground https://playground.prisma.io/guides
- NextAuth.js Prisma Adapter https://authjs.dev/reference/adapter/prisma