Skip to content

Minimal starter template for Next.js. Includes Payments (Stripe) and Auth (Google sign-in and BetterAuth)

Notifications You must be signed in to change notification settings

tomdekan/ultra-starter-nextjs

Repository files navigation

To run

  1. add a .env file with the variables listed in the guide above
  2. Install packages
pnpm install
  1. Run the dev server
pnpm dev

To add payments with Stripe

To activate payments:

  1. Create at least one product with a priceId on your Stripe dashboard.
  2. Add your Environment variables to .env.example. You can find your webhook signing key by running the stripe CLI with:
stripe listen
  1. Run your webhook listener to receive requests from the stripe checkout from a user
stripe listen --forward-to localhost:3000/api/webhook

To add Google sign in

Add a local postgres database for testing.

You can do this with docker (below) or manually.

# Pull and run PostgreSQL in one command
docker run --name my-postgres -e POSTGRES_PASSWORD=mypassword -p 5432:5432 -d postgres

# Connect to create your database
docker exec -it my-postgres psql -U postgres -c "CREATE DATABASE myapp;"
  • Update your env vars in your .env to match your local Postgres database.
npx @better-auth/cli@latest generate --y

Sign in with Google guide: https://tomdekan.com/articles/google-sign-in-nextjs

About

Minimal starter template for Next.js. Includes Payments (Stripe) and Auth (Google sign-in and BetterAuth)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published