This is a Next.js project bootstrapped with create-next-app
.
- Docker ^26.1.1
- Node ^21.7.1
- pnpm ^8.15.5
You will need to provide the following env variables:
DATABASE_URL
- url to connect with the db (standard postgres url for dev and neon url for production)RESEND_API_KEY
- API key for Resend in order to send emailsEMAIL_DOMAIN
- verified domain to use with Resend (can be Resend's test one in development)
Use .env.development
for dev and .env
for production.
Install dependencies:
pnpm install
Build docker image for the postgres container:
pnpm run docker:db:build
Build and run docker container from the image:
pnpm run docker:db:up
For subsequent starts of the container use:
pnpm run docker:db:start
Create db tables with drizzle:
pnpm run drizzle:push
You can optionally seed the db with:
pnpm run drizzle:seedand inspect the db with Drizzle Studio:
pnpm run drizzle:studio
Run the development server:
pnpm run dev
Open http://localhost:3000 with your browser to see the result.
This project automatically builds on commit. To build it locally configure env variables and run:
pnpm run build
You also need to push the db schema to neon with:
pnpm run drizzle:prod:push
For Resend to work in production you need to configure the domain and DNS records.
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.
Learn more about Drizzle ORM from the docs.
Learn more about Resend from the docs.