Optimized for immediate deployment to Vercel.
Comes with:
- Prisma
- Tailwind
- PostCSS
- Basic UI components fropm shadcn-ui
- Typescript
Requirements: Have Postgres installed
- Rename
.env.exampleto.envand adjust your local database URL. - Edit
schema.prismato create a basic table. npm run migrateto create new migrations file.npm installwill also run Prisma migrations and create client which is meant for the production environment, it's fine if this fails locally.npm run devstarts your app in development mode, rebuilding assets on file changes.
- If locally Prisma is complaining that it needs a prisma:// URL then you need to run
npx prisma generateto ensure it's not using the accelerated client locally
- Run
vercelto link a new or existing Vercel project and create the .vercel directory. - Create new Prisma Accelerate project to get DATABASE_URL - link
- In Vercel project settings environment variables configure DATABASE_URL to full prisma schema from Prisma Accelerate.
- Also configure DIRECT_DATABASE_URL to direct postgresql URL for running migrations during deploy.
npm run deployto deploy to Vercel which will run migrations there via postinstall from package.json.