Brief project description: What is this Next.js project all about?
This is a Next.js project bootstrapped with create-next-app
. This project also uses Prisma for database interactions and is Dockerized for easy deployment and scalability.
- Node.js
- Docker
- Prisma CLI
Add your environment variables in a .env
file. Example:
DATABASE_URL="your_database_url_here"
NEXT_PUBLIC_API_URL="your_api_url_here"
-
Install dependencies
pnpm install
-
Docker Setup
docker-compose up -d
-
Prisma Setup
cd apps/web npx prisma generate npx prisma db push
Install stripe cli
Login to stripe (required stripe account)
stripe login
Forward event to a local webhook endpoint.
stripe listen --forward-to localhost:3000/api/stripe/webhook
Trigger events to test your webhooks integration.
stripe trigger payment_intent.succeeded
Finally, setup your key in .env
file.
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
To start the development server, run:
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 to view it in the browser.
pnpm email
Visit http://localhost:8025/ to view the mailpit.