Demo
General
Database

Overview

Learn how to interact with the database in the monorepo.

The database serves as the bakbone for storing data, handling queries and making sure users get what they need fast.

Prisma

The starter kit uses Prisma as its data access solution.

Database driver

The project uses PostgreSQL as the default database provider, offering seamless integration out of the box. However, switching to alternatives like MySQL, MariaDB, PlanetScale, Supabase or Neon is straightforward. Additionally, Turso and D1 can be used with minimal adjustments.

Using MongoDB is possible, though it may require a few hours to change the prisma schema to use Mongo ObjectId and change a few v4() uuid calls in the codebase.

For a comprehensive list of supported database drivers, visit Prisma's Databases.

Prisma Studio

Prisma's visual database editor allows you to view and edit your database records. You can open it with:

Terminal
pnpm --filter prisma-studio dev

Make sure packages/database/.env has a correct DATABASE_URL defined.