How to Guide
SaaS Validation/Coming Soon Boilerplate

SaaS Validation/Coming Soon Boilerplate

To Start

  • run npm install to install all the required dependecies.
  • run npm run dev to run nextjs application.

Update ENV Variables

  • Create .env.local file and copy all the parameters from .env.example
  • Update your values in .env.local file.

Payments

  • for LemonSqueezy, you can add the detailed to /pricingSet.js
  • for Stripe, you can add details to /pricingSet.js.
  • Stripe payments supports one time payment and subscriptions. You can add your option to checkoutType.
  • Make sure you add correct priceId for Stripe.

Payments Webhook Setup

For User Auth using NextAuth

NEXTAUTH_URL=YOUR_VALUE

GOOGLE_CLIENT_ID=YOUR_VALUE

GOOGLE_CLIENT_SECRET=YOUR_VALUE

NEXTAUTH_SECRET=YOUR_VALUE

For Database

DATABASE_URL=YOUR_VALUE

For Emails and Login with Magic Link

MAILGUN_API_KEY=YOUR_VALUE

EMAIL_SERVER_HOST=YOUR_VALUE

EMAIL_SERVER_PORT=YOUR_VALUE

EMAIL_SERVER_USER=YOUR_VALUE

EMAIL_SERVER_PASSWORD=YOUR_VALUE

EMAIL_FROM=YOUR_VALUE

For Stripe Integration

NEXT_PUBLIC_STRIPE_PUBLIC_KEY=YOUR_VALUE

NEXT_PUBLIC_STRIPE_WEBHOOK_SECRET=YOUR_VALUE

LemonSqueezy Integration

LEMONSQUEEZY_API_KEY=YOUR_VALUE

LEMON_SQUEEZY_STORE_ID=YOUR_VALUE

LEMONS_SQUEEZY_PRODUCT_ID=YOUR_VALUE

LEMONS_SQUEEZY_SIGNATURE_SECRET=YOUR_VALUE

Database related things

  • go to /prisma dir
  • schema.prisma file has all the table schema.
  • run npx prisma migrate dev --name init to run the migration and update into database.

NextAuth related things

  • got to /pages/api/auth/[...nextauth].js
  • modify next auth config based on your requirements.

Configs

  • You can change the config based on your requirements

Libs

  • Libs dir has all the library files for lemonsqueezy, emails, prisma, strip checkout

Analytics Components

  • googleAnalytics.js : For Google Analytics Integrations
  • hotjar.js : For HotJar Integrations
  • matomoTracker.js : For Matomo Integrations
  • plausibleAnalytics.js : For Plausible Analytics Integrations

Feedback Components

  • chatwootChat.js : For ChatWoot Chatbot Integrations.
  • crispChat.js : For Crisp Chatbot Integrations.
  • papercupsChat.js : For PaperCups Chatbot Integrations.

To add Analytics and Feedback components to your application, you can add them to your _document_.js file.

Note: Make sure to add your API Keys and Ids for these integrations in the above components.