A complete, production-ready Next.js SaaS boilerplate with authentication, payments, internationalization, and more.
- Authentication: Clerk integration with sign-up/sign-in
- Payments: Dual payment provider support (Stripe & Lemon Squeezy)
- Internationalization: Multi-language support with next-intl
- Database: MongoDB integration with Mongoose
- UI Components: Radix UI components with Tailwind CSS
- Email: Resend integration for transactional emails
- Analytics: PostHog integration (optional)
- CMS: Sanity integration for blog content (optional)
- Responsive Design: Mobile-first approach
- TypeScript: Full type safety
- Framework: Next.js 15
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Radix UI
- Database: MongoDB with Mongoose
- Authentication: Clerk
- Payments: Stripe & Lemon Squeezy
- Email: Resend
- Deployment: Vercel ready
git clone <your-repo-url>
cd FounderflowBoilerplatenpm installCopy the example environment file and update with your credentials:
cp .env.example .envFill in all required environment variables in .env. See the Environment Variables section below for details.
Ensure MongoDB is running and accessible via the MONGO_URI in your .env file.
npm run devOpen http://localhost:3000 in your browser.
MONGO_URI- MongoDB connection stringNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY- Clerk publishable keyCLERK_SECRET_KEY- Clerk secret keyCLERK_WEBHOOK_SIGNING_SECRET- Clerk webhook secret
Stripe:
STRIPE_SECRET_KEY- Stripe secret keyNEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY- Stripe publishable keySTRIPE_WEBHOOK_SECRET- Stripe webhook secret
Lemon Squeezy:
LEMON_SQUEEZY_API_KEY- Lemon Squeezy API keyLEMON_SQUEEZY_STORE_ID- Your store IDLEMON_SQUEEZY_WEBHOOK_SECRET- Webhook secret
RESEND_API_KEY- For transactional emailsNEXT_PUBLIC_POSTHOG_KEY- For analyticsSANITY_PROJECT_ID- For blog CMSSANITY_DATASET- Sanity dataset name
├── app/ # Next.js app directory
│ ├── [locale]/ # Internationalized routes
│ ├── api/ # API routes
│ └── globals.css # Global styles
├── components/ # Reusable components
│ ├── ui/ # Base UI components
│ ├── landing/ # Landing page components
│ └── platform/ # App dashboard components
├── lib/ # Utility functions
│ ├── config/ # Configuration files
│ └── utils/ # Helper functions
├── models/ # Database models
├── hooks/ # Custom React hooks
├── types/ # TypeScript type definitions
└── docs/ # Documentation
This boilerplate supports both Stripe and Lemon Squeezy:
- Users can choose their preferred payment method
- Unified checkout experience
- Automatic webhook processing
- Credit and subscription management
Configure pricing in lib/config/pricing.ts and set up webhooks as documented in the docs/ folder.
Built-in support for multiple languages using next-intl:
- Add translations in
locales/ - Configure supported locales in
lib/config/locales.ts - Automatic locale detection and routing
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
This project is optimized for Vercel deployment:
- Connect your repository to Vercel
- Add all environment variables in Vercel dashboard
- Deploy
Additional documentation is available in the docs/ folder:
- Payment provider setup guides
- Webhook configuration
- Deployment instructions
For issues and questions:
- Check the documentation in the
docs/folder - Review the code examples in
examples/ - Open an issue on GitHub
This project is licensed under the MIT License.