Database Integration

TheDevSpace boilerplate is built with Prisma ORM, which allows you to connect and interact with different database with a single schema.

Create a new database

By default, our boilerplate is configured to connect to a Postgres database. It is open source, popular, and stable.

There are many places you can host a Postgres database, such as Supabase, DigitalOcean, or AWS.

If you plan to host your SaaS on Vercel, you can also create a Postgres database directly from there.

Vercel Database

Connect to the database

Regardless of the platform you choose, you should receive a database connection URL that looks like this:

env
postgres://default:XXXXXXXXX@ep-xxx-xxxx-xxx-xx-xxxx-xxx.us-east-1.aws.neon.tech/xxxxxdb?sslmode=require

Copy and paste it into the .env file as DATABASE_URL.

Run database migration

Lastly, apply the database migration by running the following command, and you're good to go.

bash
npx prisma migrate dev --name init