This is a Next.js project bootstrapped with create-next-app
.
npm install
cp .env.example .env.local
Set Clerk environment keys:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
and CLERK_SECRET_KEY
unsplash-js key:
NEXT_PUBLIC_UNSPLASH_ACCESS_KEY
stripe keys:
STRIPE_API_KEY
STRIPE_WEBHOOK_SECRET
prisma database url:
DATABASE_URL
For testing the webhook locally with the Stripe CLI you can find the endpoint's secret by running stripe listen
. Otherwise, find your endpoint's secret in your webhook settings in the Developer Dashboard
brew install stripe/stripe-cli/stripe
stripe listen --forward-to localhost:3000/api/webhook
npx prisma generate
If you are need to sync the local schemas with the server you can run npx prisma db push
.
Use npx prisma migrate reset
to start over.
npm run dev
Open http://localhost:3000 with your browser to see the result.
Prisma provides a local view of the data, by running npx prisma studio
you can see how the data is allocated in the database.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.