Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Next.js 14 starter template with Lemon Squeezy billing, GitHub OAuth, Drizzle ORM, and Neon Postgres.

A full-stack Next.js TypeScript template focused on functionality over UI, featuring Zustand, TanStack Query, and ESLint 9 support.
The Next.js Billing App with Lemon Squeezy is a Boilerplate template that provides a ready-made auth and billing foundation for subscription SaaS products, built on Next.js 14 with TypeScript, Drizzle ORM, and Tailwind CSS.
The template is a demo application that combines Lemon Squeezy subscription billing, GitHub OAuth authentication, and a Drizzle-managed Neon Postgres database in a single Next.js 14 codebase. It takes environment variables for API keys, store IDs, and database URLs as input, and produces a working SaaS starter with a customer portal alternative, webhook handling, and login flow. The app is built on the Next.js App Router, which supports enhanced layouts, component colocation, and component-level data fetching.
subscription_created and subscription_updated events, plus a server action that demonstrates creating webhooks via the Lemon Squeezy SDK..env file with a documented example.pnpm db:studio to open Drizzle Studio and inspect or edit subscription records in your Neon Postgres database.subscription_payment_success to list invoices or send receipts.Clone the repository, install dependencies with pnpm install, and copy .env.example to .env. Fill in the environment variables for Lemon Squeezy, Neon Postgres, GitHub OAuth, and auth secrets. Run pnpm db:push to set up the Drizzle schema, then start the development server with pnpm dev. For webhooks, set up a webhook in Lemon Squeezy pointing to /api/webhook, or use the included setup webhook button.
Yes. The template pairs Drizzle ORM with Neon serverless Postgres, which keeps the app compatible with Vercel Edge Functions and serverless deployments.
The demo processes subscription_created and subscription_updated. You can extend it to handle other events like subscription_payment_success to support invoices and payment history.
While running on localhost, your app cannot receive webhooks from Lemon Squeezy. Use a tunnel service such as ngrok or LocalCan to create a web-accessible URL and set it as the WEBHOOK_URL environment variable.
Yes. You must create a Lemon Squeezy account and store, and use Test mode during development. The README explains how to generate an API key and store ID, and how to set up a webhook signing secret.
