schema.prisma file with a starter data model already in place. Supabase is the recommended hosted PostgreSQL provider, though any PostgreSQL-compatible database works.
What Gets Scaffolded
When you include the database option, Slik Dev adds the following to your project:prisma/schema.prisma— A Prisma schema file with adatasourceblock pointing toDATABASE_URLand a starterUsermodel.lib/prisma.ts— A singleton Prisma Client instance safe to use in Next.js Server Components and API routes.DATABASE_URL— A placeholder in your.envfile ready for your connection string.- Prisma dependencies —
prismaand@prisma/clientadded topackage.json.
Enabling Database at Scaffold Time
1
Run the scaffolding command
2
Select your stack and theme
Choose Next.js as your stack and Bento as your theme (or whichever options become available for your version).
3
Opt in to the database when prompted
4
Complete the install
Post-Scaffold Database Setup
1
Create a PostgreSQL database
The recommended option is Supabase — it provides a free hosted PostgreSQL instance with a connection string you can copy immediately.Any other PostgreSQL provider (Railway, Neon, PlanetScale-compatible, self-hosted) also works — just use its connection string.
- Sign in at supabase.com and create a new project.
- Go to Project Settings → Database.
- Copy the Connection string under the URI tab. It looks like:
2
Set DATABASE_URL in your .env file
Open
.env in your project root and replace the placeholder:3
Push your schema to the database
Run You should see output confirming each model was synchronized:
prisma db push to apply your schema to the connected database without generating a migration file. This is the recommended flow for early development:4
Start your dev server
http://localhost:3000 with a live database connection.Working with Prisma
The basic Prisma development loop is: edit your schema, push to the database, and use the generated client.1. Edit your schema
Openprisma/schema.prisma and define your models:
2. Push changes to the database
3. Use the Prisma Client in your app
Your generated project includes a singleton client atlib/prisma.ts. Import it directly in any Server Component or API route:
Always use the singleton from
lib/prisma.ts rather than instantiating new PrismaClient() directly. Next.js hot-reload can create too many concurrent database connections if the client is re-instantiated on every module evaluation.Recommended: Supabase
Supabase is the recommended hosted PostgreSQL option for Slik Dev projects because it:- Provides a free tier suitable for development and small production workloads
- Gives you a PostgreSQL connection string compatible with Prisma out of the box
- Includes a table editor and SQL runner in its dashboard for inspecting your data
- Supports Row Level Security (RLS) if you later want database-level access control