Infrastructure
Welcome to the SaasLaunchpad! This project is designed to help you quickly build a SaaS application using Next.js. It includes features such as authentication, Stripe payment integration, and a user dashboard.
Note: This is an expanded version of the Next.js SaaS Starter, offering a richer feature set beyond the original template.
Live Demo: https://saaslaunchpad.vercel.app/
/
)/pricing
) integrated with Stripe CheckoutClone the repository and install dependencies:
git clone https://github.com/Excelorithm/SaaSLaunchpad
cd SaaSLaunchpad
pnpm install
Set up your environment variables by running the setup script:
pnpm app:setup
Run database migrations and seed the database with initial data:
pnpm db:migrate
pnpm db:seed
Setup Firebase Push Notifications
pnpm push:setup
Start the development server:
pnpm dev
Visit http://localhost:3000 to view the application.
To handle Stripe webhooks locally, use the Stripe CLI:
stripe listen --forward-to localhost:3000/api/stripe/webhook
Use the following test card details for Stripe payments:
4242 4242 4242 4242
https://yourdomain.com/api/stripe/webhook
).checkout.session.completed
, customer.subscription.updated
).In your Vercel project settings, add the necessary environment variables for production:
APP_NAME
: Your app name.APP_LOGO
: Your app logo.BASE_URL
: Your production domain.POSTGRES_URL
: Your production database URL.STRIPE_SECRET_KEY
: Your Stripe secret key for production.STRIPE_WEBHOOK_SECRET
: The webhook secret from your production Stripe webhook.NEXTAUTH_URL
: Same as "BASE_URL".NEXTAUTH_SECRET
: A random string for authentication. Generate one using openssl rand -base64 32
.NEXT_PUBLIC_LOGIN_URL
: Login page URL, typically "BASE_URL/auth/signin".GOOGLE_CLIENT_ID
: Client ID for Google OAuth.GOOGLE_CLIENT_SECRET
: Client secret for Google OAuth.EMAIL_SERVER_USER
: Username for your email server.EMAIL_SERVER_PASSWORD
: Password for your email server.EMAIL_SERVER_HOST
: Host address for your email server.EMAIL_SERVER_PORT
: Port number for your email server.EMAIL_FROM
: The email address that your app will use to send emails.NEXT_PUBLIC_PUSH_NOTIFICATIONS_CHANNEL
: Channel name for push notifications.NEXT_PUBLIC_FIREBASE_API_KEY
: Firebase API key.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN
: Firebase Auth domain.NEXT_PUBLIC_FIREBASE_PROJECT_ID
: Firebase project ID.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET
: Firebase storage bucket.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID
: Firebase messaging sender ID.NEXT_PUBLIC_FIREBASE_APP_ID
: Firebase app ID.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID
: Firebase measurement ID.NEXT_PUBLIC_FIREBASE_VAPID
: Firebase VAPID key for push notifications.FIREBASE_ADMIN_PROJECT_ID
: Firebase Admin project ID.FIREBASE_ADMIN_PRIVATE_KEY
: Firebase Admin private key.FIREBASE_ADMIN_CLIENT_EMAIL
: Firebase Admin client email.NEXT_PUBLIC_ONESIGNAL_APP_ID
: OneSignal app ID for push notifications.ONESIGNAL_REST_API_KEY
: OneSignal REST API key for server-side push notifications.