Made with Next.js 13, experimental server actions, Cloudinary for file hosting, Clerk for authentication, Webhooks for synchronizing database to Clerk's user objects, PlanetScale for a cloud database and Prisma for an ORM.
Once you have successfully cloned the repository to your computer, you should run npm install at the root of the project before continuing.
Required environment variables:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEYWEBHOOK_SECRET- Set up Clerk webhook in dashboard to get a secret.
Used for client side requests
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAMENEXT_PUBLIC_CLOUDINARY_API_KEY
Used for server side actions
CLOUDINARY_URL- Format: cloudinary://api_secret:public_api_key@cloud_name See more
Inside .env (Unless you want to manage which file Prisma uses manually)
DATABASE_URL
Before your database is able to be written to and read from, you have to run npx prisma generate to generate the Prisma client and npx prisma db push command to sync your Prisma schema to your database tables.
Once you have set up all the necessary environment variables you can run npm run dev
Remember to override Vercel's default Build Command on your project's settings
The command should be set to npx prisma generate && next build or the build process will fail.
Cloudinary: