Skip to content

karczewskiPiotr/workshop

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Prerequisites

  • Docker ^26.1.1
  • Node ^21.7.1
  • pnpm ^8.15.5

Environment variables

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 emails
  • EMAIL_DOMAIN - verified domain to use with Resend (can be Resend's test one in development)

Use .env.development for dev and .env for production.

Getting Started

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:seed

and 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.

Build

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.

Learn More

To learn more about Next.js, take a look at the following resources:

Learn more about Drizzle ORM from the docs.

Learn more about Resend from the docs.

About

Car garage management app.

Resources

Stars

Watchers

Forks

Languages