How mickasmt/next-saas-stripe-starter works
Main System Components
a) Frontend Layer:
• Marketing Pages (/(marketing) routes)
• Authentication Pages (/(auth) routes)
• Protected Dashboard (/(protected) routes)
• Documentation Pages (/(docs) routes)
• Blog System
b) Backend Layer:
• API Routes (/app/api)
• Authentication System (Auth.js)
• Database Layer (Prisma + Neon PostgreSQL)
• Email System (Resend + React Email)
• Payment System (Stripe Integration)
Key Architectural Elements
a) Next.js App Router Structure:
• Route grouping ((auth), (marketing), (protected), (docs))
• API routes organization
• Server and client components
b) Data Flow:
• Authentication flow with Auth.js
• API endpoints interaction
• Stripe webhook handling
• Email service integration
Integration Points
Clear connections between:
• Frontend components and API routes
• Authentication system and protected routes
• Stripe integration with billing features
• Database interactions through Prisma
• Email service integration points
Specific Implementation Details
a) Core Features:
• User authentication & authorization
• Subscription management
• Blog and documentation system
• Dashboard functionality
b) External Services:
• Neon PostgreSQL
• Stripe Payment Processing
• Resend Email Service
• Vercel Deployment
• Client Layer |
• (Pages & Components) |
• ↕
• API Layer |
• (Routes & Endpoints) |
• ↕
• Service Layer |
• (Auth, Email, Payment) |
• ↕
• Database Layer |
• (Prisma & Neon) |