# nextjs-sessionauth-template

> Next.js starter template featuring Lucia session auth and Stripe billing

An open-source full-stack boilerplate for Next.js focused on flexible session authentication using Lucia instead of NextAuth. It comes pre-configured with credential auth, email verification, password resets, Stripe subscription billing, Drizzle ORM, tRPC, and shadcn/ui.

Website: https://github.com/iamtouha/next-lucia-auth

## What it is for

- Bootstrap a SaaS application with credential auth and OAuth support
- Set up recurring subscription tiers using Stripe checkout and customer portals
- Build type-safe CRUD operations using tRPC and Drizzle ORM with PostgreSQL

## Features

- Credential and OAuth authentication using Lucia
- Email verification and password reset workflows via React Email
- Stripe integration for recurring customer subscriptions
- Drizzle ORM configured with PostgreSQL and migration scripts
- Type-safe APIs using tRPC integrated with Lucia session data
- Pre-styled UI components using Tailwind CSS and shadcn/ui
- End-to-end testing setup with Playwright

## Pricing

Open source

## Details

- Type: GitHub repo
- Category: [Development](https://xiry.app/topics/development.md)
- Topic: [Boilerplates & Starters](https://xiry.app/topics/development/boilerplates-starters.md)
- Open source: yes
- Platforms: Web, Self-hosted
- For: Next.js and TypeScript developers building full-stack SaaS projects
- Alternative to: NextAuth.js, create-t3-app, Supabase Auth
- Tags: nextjs, lucia auth, trpc, drizzle orm, stripe, boilerplate

## Why it was saved

- [@iamtouha, 12 February 2024](https://x.com/iamtouha/status/1756980901844754455): Ready-made full-stack SaaS scaffold: credential auth with password reset, email validation and oAuth via Lucia, plus posts CRUD, Free/Pro plans with Stripe checkout and a customer billing portal. Includes Drizzle, tRPC, Stripe, tailwindcss, shadcn-ui and react-email.

## Related

- [Starter.diy](https://xiry.app/resources/starter-diy-2164): Full-stack SaaS starter with Next.js 15, Convex, and Clerk Billing (GitHub repo, Open source)
- [AnotherWrapper](https://xiry.app/resources/anotherwrapper): Next.js AI boilerplate with pre-built apps, auth, and payments. (Web app, Paid)
- [Cult UI Pro — Polar Subscription](https://xiry.app/resources/cult-ui-pro-polar-subscription): Next.js SaaS starter template with Supabase and Polar subscription billing (Website, Open source)
- [ElevenLabs NextJS Starter](https://xiry.app/resources/elevenlabs-nextjs-starter): Open-source Next.js boilerplate showcasing ElevenLabs audio and voice features (GitHub repo, Open source)
- [Steven Tey's Starter Template Stack (Precedent)](https://xiry.app/resources/steven-tey-s-starter-template-stack-precedent): A full-stack Next.js tech stack for fast project prototyping and deployment. (List, Free)
- [Titan](https://xiry.app/resources/titan): Full-stack Next.js 15 starter with Better-Auth, Drizzle, and Tailwind v4 (GitHub repo, Open source)

Updated 10 October 2026. Page: https://xiry.app/resources/nextjs-sessionauth-template

Make your own library: Xiry takes your saved reels, tweets, Reddit bookmarks and Watch Later videos, makes them searchable and pulls the useful stuff out, like this library. It's invite-only for now; join the waitlist at https://xiry.app/#waitlist.
