A Saas starter kit with Auth, Payments, Database, and Demo pre-configured
pmz131/Saas-Template-Kit
pmz131
Opinionated Next.js 16 starter for SaaS apps with authentication, billing, and database wiring already done. Stack powers auth flows, Stripe handles subscriptions (Managed Payments preview enabled), and Neon hosts the Postgres database. The todo list and "Pro" upsell are only placeholders to demonstrate user-scoped data—swap them for your product surface while keeping the pre-built plumbing.
DATABASE_URL)cp .env.example .env.local
DATABASE_URL from NeonNEXT_PUBLIC_STACK_PROJECT_ID, NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY, STACK_SECRET_SERVER_KEYSTRIPE_SECRET_KEY, NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY, STRIPE_PRO_MONTHLY_PRICE_IDNEXT_PUBLIC_APP_URL=http://localhost:3000STRIPE_WEBHOOK_SECRET from stripe listen --forward-to localhost:3000/api/webhooks/stripenpm install
DATABASE_URL)npm run drizzle:migrate
npm run dev
/account (Stripe test card: 4242 4242 4242 4242).npm run dev — Start development servernpm run build — Production buildnpm run stripe:listen — Forward Stripe webhooks locallynpm run drizzle:generate — Generate new migrationsnpm run drizzle:migrate — Apply pending migrationsnpm run lint — Run ESLintnpm run format — Format code with Prettierapp/add-todo.tsx, app/todo-list.tsx, and app/actions.tsx; swap these for your product surface.app/schema/schema.ts; adjust tables/columns and rerun npm run drizzle:migrate.app/stack.tsx and app/stripe-actions.ts in place to preserve auth + billing wiring..env.local (Neon DATABASE_URL, Stack keys, Stripe secret + publishable keys, STRIPE_PRO_MONTHLY_PRICE_ID, STRIPE_WEBHOOK_SECRET, and NEXT_PUBLIC_APP_URL) before launching or deploying.DATABASE_URL=... # Neon connection string
NEXT_PUBLIC_STACK_PROJECT_ID=... # Stack project ID
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=... # Stack publishable key
STACK_SECRET_SERVER_KEY=... # Stack secret key
STRIPE_SECRET_KEY=sk_live_or_test... # Stripe secret key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_or_test...
STRIPE_PRO_MONTHLY_PRICE_ID=price_... # Your Pro plan price ID
STRIPE_WEBHOOK_SECRET=whsec_... # From Stripe webhook endpoint
NEXT_PUBLIC_APP_URL=https://your-domain.com
/api/webhooks/stripe listening to:
checkout.session.completedcustomer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedinvoice.payment_succeededinvoice.payment_failedNotes:
stripe listen in production; Stripe calls the deployed endpoint.lib/stripe.ts; ensure your Stripe account and products are eligible before using it in production.After purchase, you'll receive an invitation to access this private GitHub repository.
$50.00
One-time payment • USD