This is a Next.js application (using the app/ router) with Prisma for database access.
- Next.js
- React
- Prisma (
prisma/) - @prisma/client
- Node.js (LTS recommended)
- A database (PostgreSQL/MySQL/SQLite/etc.) configured for Prisma
npm installCreate a .env file in the project root.
At minimum, Prisma needs a database URL:
# Example
DATABASE_URL="postgresql://USER:PASSWORD@HOST:5432/DB_NAME"If your database/provider differs, use the corresponding Prisma connection string.
Generate the Prisma client:
npx prisma generateIf you need to apply migrations:
npx prisma migrate devTo inspect the database schema locally:
npx prisma studionpm run devOpen: http://localhost:3000
npm run dev– start Next.js dev servernpm run build– build for productionnpm run start– run production servernpm run lint– run ESLint
app/– Next.js app routerprisma/schema.prisma– Prisma schemaprisma/migrations/– migration historyapp/components/– shared UI components
- Prisma reads configuration from
.env. - If you change the Prisma schema, re-run
npx prisma generateand apply migrations as needed.