Setup

Learn how to set up your Nuxt Starter Kit application.

Install dependencies

pnpm install

Setup environment variables

Define your environment variables in the .env file. You can use the .env.example file as a reference. The starter kit uses @t3-oss/env-nuxt to typecheck the environment variables.

Required environment variables:

  • NUXT_PRIVATE_DATABASE_URL - PostgreSQL connection string
  • BETTER_AUTH_SECRET - Secret for better-auth session encryption
  • BETTER_AUTH_URL - Your app URL (e.g., http://localhost:9009 for local dev)

Optional but recommended:

  • NUXT_PRIVATE_POLAR_ACCESS_TOKEN - For payment integration
  • NUXT_PRIVATE_POLAR_ORGANIZATION_ID - Your Polar organization ID
  • OAuth credentials for social login (Google, GitHub)

Create database schema

Generate and apply database migrations:

pnpm db:generate  # Generate migrations from schema
pnpm db:migrate   # Apply migrations to database

Start the development server

Start the development server for the web app:

pnpm dev:web

You can now access your app at http://localhost:9009.

Polar

Nuxt Starter Kit uses Polar to accept payments, see Payments for more information.

This starter kit is designed to support subscriptions (free & Pro) and lifetime deals. You should configure three products in Polar:

  • Pro Plan (yearly subscription)
  • Pro Plan (monthly subscription)
  • Lifetime Deal (one-time payment)
Any other product constellation needs adjustments in the packages/layer-payment layer and other parts of the codebase.