### Clone and Install Project Dependencies Source: https://github.com/nextjs/saas-starter/blob/main/README.md Clones the Next.js SaaS Starter repository from GitHub and installs project dependencies using pnpm. This is the initial setup step for running the project locally. ```bash git clone https://github.com/nextjs/saas-starter cd saas-starter pnpm install ``` -------------------------------- ### Run Next.js Development Server Source: https://github.com/nextjs/saas-starter/blob/main/README.md Starts the Next.js development server. This command compiles and runs the application locally, typically accessible at http://localhost:3000. ```bash pnpm dev ``` -------------------------------- ### Setup Database and Seed Data Source: https://github.com/nextjs/saas-starter/blob/main/README.md Executes scripts to set up the local database, run database migrations, and seed the database with a default user and team. This prepares the database for local development. ```bash pnpm db:setup pnpm db:migrate pnpm db:seed ``` -------------------------------- ### Production Environment Variables Source: https://github.com/nextjs/saas-starter/blob/main/README.md Lists essential environment variables required for deploying the Next.js SaaS Starter to a production environment. These variables configure the application's connection to services like Stripe and the database. ```APIDOC Production Environment Variables: BASE_URL: Your production domain (e.g., https://yourdomain.com) STRIPE_SECRET_KEY: Your Stripe secret key for production STRIPE_WEBHOOK_SECRET: The webhook secret from your production Stripe webhook POSTGRES_URL: Your production database connection URL AUTH_SECRET: A random string for authentication (generate with 'openssl rand -base64 32') ``` -------------------------------- ### Forward Stripe Webhooks Locally Source: https://github.com/nextjs/saas-starter/blob/main/README.md Listens for Stripe webhooks and forwards them to a local development server. This is crucial for testing Stripe event handling, such as subscription changes, during local development. ```bash stripe listen --forward-to localhost:3000/api/stripe/webhook ``` -------------------------------- ### Log in to Stripe CLI Source: https://github.com/nextjs/saas-starter/blob/main/README.md Logs into your Stripe account using the Stripe CLI. This is required for local Stripe development, including forwarding webhooks to your local server. ```bash stripe login ``` -------------------------------- ### Test Stripe Payment Card Details Source: https://github.com/nextjs/saas-starter/blob/main/README.md Provides test card details for simulating Stripe payments. These details can be used in the Stripe Checkout flow to test successful transactions without using real credit card information. ```APIDOC Stripe Test Card Details: Card Number: 4242 4242 4242 4242 Expiration: Any future date CVC: Any 3-digit number ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.