Installation

Set up the Rapidstack Nuxt 4 boilerplate in minutes

Get your development environment up and running with this step-by-step installation guide.

Prerequisites

Before you begin, make sure you have the following installed:

  • Node.js - Version 20.x or higher (Download)
  • PNPM - Version 9.x or higher (Install guide)
  • PostgreSQL - Local or remote database connection string (Download)
  • Git - For version control (Download)
This boilerplate uses PNPM as the package manager, and we recommend you use PNPM. However, feel free to use npm or yarn, if preferred.

Download the boilerplate

After purchasing your license, download the boilerplate:

  1. Visit the download page - Go to the download page of Rapidstack
  2. Enter your license key - Use the license key you received after purchase
  3. Download the zip file - The boilerplate will download as a zip file
  4. Extract and navigate - Extract the zip file and navigate to the directory
unzip rapidstack-nuxt4.zip
cd rapidstack-nuxt4
Your license key is sent to your email after purchase. Can't find it? Check your spam folder or contact support.

Install dependencies

Install all project dependencies using PNPM:

pnpm install

This will install all required packages including Nuxt 4, Prisma, Stripe, authentication libraries, and more.

Set up environment variables

Create a .env file in the root directory. You can start by copying the example file:

cp .env.example .env

Then, edit .env with your configuration. At minimum, you'll need the Database connection string and Site configuration.

.env
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/myapp"

# Site configuration
NUXT_PUBLIC_SITE_URL="http://localhost:3000"
NUXT_PUBLIC_SITE_NAME="Your App Name"
NUXT_PUBLIC_SITE_DOMAIN="localhost"

# Email (Resend)
RESEND_API_KEY="re_..."

# Stripe payments
STRIPE_SECRET_KEY="sk_test_..."
NUXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
Payment mode (auth or authless) is configured in app/config/payments.config.ts, not in environment variables.
Don't commit your .env file to version control. It contains sensitive credentials.
See the full list of environment variables and their descriptions in the configuration guide.

Set up the database

Create your database

You'll need a PostgreSQL database. You can either:

  • Use a local PostgreSQL instance - Create a database locally.
  • Use a hosted database - Services like Supabase, Neon, or Railway.

If using a local database, create it:

createdb myapp
Make sure your DATABASE_URL in the .env file matches your database:
  • For local databases: postgresql://username:password@localhost:5432/database_name
  • For hosted services: Use the connection string provided by Supabase, Neon, Railway, etc.
Example for local database:
DATABASE_URL="postgresql://postgres:yourpassword@localhost:5432/myapp"

Run migrations

Run Prisma migrations to set up your database schema:

pnpm prisma migrate dev

This creates all necessary tables including users, sessions, payments, subscriptions, and more.

You can inspect your database schema in prisma/schema.prisma.

(Optional) Seed the database

If you want to add test data, you can create a seed script:

pnpm prisma db seed

Start the development server

Now you're ready to start the development server:

pnpm dev

The application will be available at http://localhost:3000.

That's it! Your Nuxt application is now running. Open your browser and you should see the landing page.

Verify the installation

To make sure everything is working correctly:

  1. Visit the homepage - You should see the landing page
  2. Check dark mode - Toggle the theme switcher in the header
  3. Try registration - Create a test account at /auth/register
  4. Check the database - Verify the user was created in your database

Next steps

Now that your installation is complete:

Quick start guide

Get your first feature running with our quickstart tutorial.

Configure your app

Learn about all available configuration options.

Set up authentication

Understand how authentication works in this boilerplate.

Troubleshooting

Port 3000 is already in use

If port 3000 is already in use, you can change it:

PORT=3001 pnpm dev

Database connection errors

Make sure your DATABASE_URL is correct and PostgreSQL is running:

# Check if PostgreSQL is running
pg_isready

# Or with psql
psql -h localhost -U your_username -d your_database

Prisma errors

If you're having Prisma-related issues, try:

# Generate Prisma client
pnpm prisma generate

# Reset the database (⚠️ deletes all data)
pnpm prisma migrate reset

Module not found errors

If you see module import errors after installation:

# Clear Nuxt cache
rm -rf .nuxt

# Reinstall dependencies
rm -rf node_modules pnpm-lock.yaml
pnpm install
Still having issues? Check out the troubleshooting section or reach out for support.