freedatabasev0.1.2

Prisma ORM

Prisma 7 with the Postgres driver adapter, a singleton client, and a full CRUD example: route handlers, cached server actions and a starter UI.

$npx cnippet-stack init prisma

Want to understand the code? Read the step-by-step guide on next.cnippet.dev →

supports
Next.js
16
Router
app
ORM
none
environment variables
  • DATABASE_URL PostgreSQL connection string.
  • API_URL Base URL the server actions use to call this app's own /api/v1 routes.
manual steps
  • Provision a PostgreSQL databaserequired

    Provision a PostgreSQL database (Neon, Supabase, Railway or local Docker) and set DATABASE_URL in your .env file.

  • Run the first migrationrequired

    Run `prisma migrate dev --name init` to create the posts and tags tables.