Database

Choose Your Boilerplate

If Using Prisma Boilerplate

The boilerplate comes with Postgres. To use a different database:

  1. Switch to MySQL:
// schema.prisma
datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
}
  1. Apply changes:
npx prisma generate
npx prisma db push

If Using Mongoose Boilerplate

The boilerplate comes with MongoDB setup. To use MongoDB Atlas:

  1. Visit MongoDB Atlas
  2. Create Project & Cluster
  3. Setup Access:
    • Database Access: Create user
    • Network Access: Allow IP
  4. Get connection string from: Database → Connect → Drivers
  5. Replace existing connection string in your config

Choose the guide based on your selected boilerplate. Each boilerplate is pre-configured - you only need to change the database provider (Prisma) or connection (MongoDB).