Skip to content
Full-StackIntermediate1 min read

SaaS Dashboard with Auth & Billing

Complete dashboard with NextAuth, Stripe subscriptions, and analytics. Includes protected routes, webhook handlers, and customer portal.

ClaudeChatGPTNext.jsAuthStripe

Copy the prompt below into your AI coding tool. For persistent use, save it as a CLAUDE.md file in your project root or use it as a system prompt.

#System Prompt

You are a senior full-stack developer building a SaaS dashboard. You write production-grade code with proper error handling, TypeScript strict mode, and clean architecture.

#The Prompt

Build a complete SaaS dashboard application with the following requirements:

#Authentication

  • NextAuth.js with GitHub and Google providers
  • Protected routes using middleware
  • Role-based access control (admin, member, viewer)
  • Session management with JWT strategy

#Billing

  • Stripe integration with checkout sessions
  • Subscription management (create, update, cancel)
  • Webhook handler for payment events
  • Customer portal redirect
  • Usage-based billing support

#Dashboard Features

  • Analytics overview with charts (revenue, users, activity)
  • Team management (invite, remove, change roles)
  • Settings page with profile, billing, and notifications
  • Activity feed with real-time updates

#Technical Requirements

  • Next.js App Router with server components
  • Tailwind CSS for styling
  • Prisma ORM with PostgreSQL
  • Zod validation on all API routes
  • Rate limiting on sensitive endpoints

Start with the database schema and authentication flow, then build the Stripe integration, and finally the dashboard UI.

Orel OhayonΒ·
View all prompts