A production-ready Next.js starter template with authentication, database, payments, and beautiful UI components. Build your SaaS faster with batteries included.
- β‘ Next.js 15 - App Router, Server Components, and Turbopack
- π Better Auth - Modern authentication with magic links, OAuth, and sessions
- ποΈ Drizzle ORM + PostgreSQL - Type-safe database with migrations
- π³ Stripe Integration - Subscriptions and payment handling ready
- π¨ shadcn/ui - Beautiful, accessible components built with Radix UI
- π§ Resend - Transactional emails with React Email templates
- π Motion - Smooth animations and transitions
- π Dark Mode - Built-in theme support
- π± Responsive - Mobile-first design
- π Type-Safe - Full TypeScript coverage
- Framework: Next.js 15
- Language: TypeScript
- Database: PostgreSQL with Drizzle ORM
- Authentication: Better Auth
- Payments: Stripe
- Styling: Tailwind CSS 4
- UI Components: shadcn/ui + Radix UI
- Email: Resend + React Email
- Animations: Motion (Framer Motion)
git clone <your-repo-url>
cd next-easy
npm installCreate a .env file:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
# Better Auth
BETTER_AUTH_SECRET="your-secret-key-here"
BETTER_AUTH_URL="http://localhost:3000"
# Stripe
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_PUBLISHABLE_KEY="pk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
# Email
RESEND_API_KEY="re_..."
EMAIL_FROM="Your App <noreply@yourdomain.com>"# Push schema to database
npm run db:push
# Or generate and run migrations
npm run db:generate
npm run db:migrate
# Open Drizzle Studio to view your data
npm run db:studionpm run devOpen http://localhost:3000 to see your app.
next-easy/
βββ src/
β βββ app/ # Next.js app router
β β βββ components/ # Landing page components
β β βββ dashboard/ # Dashboard pages
β β βββ api/ # API routes
β β βββ page.tsx # Home page
β βββ components/
β β βββ ui/ # shadcn/ui components
β β βββ email/ # Email templates
β βββ db/
β β βββ schema.ts # Drizzle schema
β β βββ migrate.ts # Migration runner
β βββ lib/
β β βββ db.ts # Database client
β β βββ auth.ts # Auth configuration
β β βββ auth-client.ts # Client-side auth
β β βββ email.ts # Email utilities
β β βββ utils.ts # Helper functions
β βββ hooks/ # Custom React hooks
βββ drizzle/ # Generated migrations
βββ drizzle.config.ts # Drizzle configuration
βββ DATABASE.md # Database documentation
- Database Setup - Drizzle ORM setup and usage
- Email System - Email configuration with Resend
# Development
npm run dev # Start dev server with Turbopack
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
# Database
npm run db:generate # Generate migration files
npm run db:migrate # Run migrations
npm run db:push # Push schema (dev only)
npm run db:studio # Open Drizzle Studio- Magic link (passwordless) authentication
- Secure session management
- Type-safe queries with Drizzle ORM
- PostgreSQL with full schema
- Automatic migrations
- User, session, and subscription tables
- Visual database browser (Drizzle Studio)
- Stripe integration ready
- Subscription management tables
- Payment history tracking
- Webhook endpoint structure
- Pre-built landing page
- Dashboard layout with sidebar
- Responsive navigation
- Animated components
- Form components
- Card layouts
- Buttons, inputs, and more
- Magic link emails
- React-based templates
- Resend integration
- Easy to customize
- Push your code to GitHub
- Import project to Vercel
- Add environment variables
- Deploy!
Recommended PostgreSQL providers:
- Neon - Serverless Postgres
- Supabase - Open-source Firebase alternative
- Railway - Simple deployment platform
- Vercel Postgres - Integrated with Vercel
Update the logo and branding in:
src/app/components/logo.tsxsrc/app/layout.tsx(metadata)- Email templates
- Tailwind config:
tailwind.config.js - Global styles:
src/app/globals.css - Theme colors: Update CSS variables
Edit components in src/app/components/:
hero-section.tsx- Hero with CTAfeatures-1.tsx- Feature showcasepricing.tsx- Pricing tierscall-to-action.tsx- Final CTAfooter.tsx- Footer with links
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this template for your projects!
Built with β€οΈ using Next.js and modern web technologies.