Nexty - Next.js SaaS Boilerplate

website·Indexed 34 days ago

https://nexty.dev/docs

A production-ready SaaS boilerplate built on Next.js 16 and React 19. The tech stack includes Tailwind CSS, Shadcn/ui, Zustand, Better Auth, Drizzle ORM, and Supabase, with integrated support for Stripe, Creem, PayPal, AI, and CMS functionality.

Tokens
67.9K
Snippets
246
Records
525
Agent score
67%

What's inside Nexty

  1. Overview of the Coupon Console

    The Coupon Console (introduced in v4.0.0) is located at /dashboard/admin/coupons. It is designed exclusively for plans using provider: 'stripe'. The system does not store coupon data locally; it reads and writes directly to Stripe to ensure the provider remains the single source of truth for redemptions, expiry, and status.
  2. Overview of the Nexty SaaS template

    Nexty is a full-stack SaaS template designed to accelerate the development of commercial websites, content platforms, tool suites, and AI-powered subscription services. It provides a ready-to-deploy foundation that handles common infrastructure tasks such as authentication, payment processing, internationalization, and AI integration, allowing developers to focus on business logic rather than boilerplate setup.
  3. Overview of Better Auth for SaaS

    Better Auth is a framework-agnostic, universal authentication and authorization framework for TypeScript. It follows the principle that auth should live within the developer's own codebase, writing to database tables owned by the user. It provides core email/password and social sign-in, with extended functionality provided via plugins.
  4. Overview of Pino and Sentry Integration

    NEXTY.DEV uses a dual-system approach for observability: Pino handles high-performance structured JSON logging to stdout (or files on VPS), while Sentry manages error aggregation, alerting, and stack traces. The integration maps specific log levels to Sentry actions: warn adds a breadcrumb, while error and fatal trigger exception reports.
  5. Overview of the Payment Flow sequence

    The payment process follows a five-step sequence to ensure credits and subscriptions are granted reliably. The system uses a 'belt and braces' approach where both the success page return and the provider webhook trigger the same idempotent fulfillment logic; whichever arrives first completes the transaction, and the second becomes a no-op.

    1. Pricing Page: User clicks a checkout button (components/pricing/CheckoutButton.tsx).
    2. Unified Entry: Request is processed by actions/billing/checkout.ts where guards are validated and the provider is dispatched.
    3. Provider Checkout: User pays via Stripe, Creem, or PayPal.
    4. Success Page: User returns to /payment/success, triggering a fulfillment attempt.
    5. Webhook: Provider sends a webhook to app/api/{provider}/webhook, triggering a fulfillment attempt.
  6. Overview of NEXTY.DEV CMS Module

    The NEXTY.DEV CMS is a comprehensive content management system refactored with TipTap. It provides a unified architecture for creating multiple content modules (e.g., blog, glossary) with support for both local MDX files and server-side CMS data. Key features include:

    • Reading Statistics: Supports all (every load) or unique (once per hour per IP) modes.
    • Content Protection: Built-in visibility controls (Public, logged_in, subscribers) with automatic access restriction prompts.
    • Multi-language Support: Supports different languages using the same slug design.
    • Media Management: Supports local uploads, external links, and Cloudflare R2 integration.
    • SEO & UX: Automatic Table of Contents (TOC) generation, related article recommendations based on tags, and dynamic OG image generation.
  7. Overview of NEXTY.DEV Authentication Features

    NEXTY.DEV uses Better-auth to provide a comprehensive authentication system. Key features include:

    • Login Methods: Support for Google, GitHub, Email Magic Links, and Google One Tap.
    • Security: Cloudflare Turnstile verification to prevent bot attacks.
    • User Management: Built-in user/admin roles, AuthGuard route protection, and the ability for administrators to block risky users.
    • Tracking & UX: Records user sources via URL parameters and tracks the last login method locally for faster subsequent logins.
    • Onboarding: Automatic welcome emails sent to new registrations.
  8. Overview of NEXTY.DEV SaaS Boilerplate

    NEXTY.DEV is a full-stack Next.js SaaS boilerplate designed for building content sites, tool sites, or AI-integrated paid websites. The current version (v3.0.0+) is built using Better-auth and Drizzle ORM. Previous versions (v1 and v2) relied on Supabase for authentication and database management.
  9. Overview of NEXTY.DEV SaaS Boilerplate

    NEXTY.DEV is a full-stack Next.js SaaS kit designed for solo developers and small teams. It provides a complete set of product features (AI, CMS, pricing management) rather than just developer tooling. It supports deployment to Vercel, Cloudflare Workers, Dokploy, and Coolify.
  10. Overview of Nexty.dev SaaS Template

    Nexty.dev is a flexible, multi-purpose full-stack SaaS template built on Next.js and Supabase. It provides a foundation for launching SaaS products with built-in support for multi-language (English, Chinese, Japanese), SEO-friendly page structures, and integrations for analytics (Google Analytics, Plausible) and advertising (Google Ads).
  11. Integrate the NEXTY.DEV payment system for the first time

    To set up the payment system, follow these steps:

    1. Review the Payment System Overview to understand the architecture.
    2. Create products in your chosen provider's dashboard (Stripe or PayPal).
    3. Configure your pricing by editing config/pricing.ts or by running the bootstrap command.
    4. Set up webhook endpoints and the CRON_SECRET for scheduled tasks.
    5. Perform a test payment with a test card and verify the flow.
    pnpm stripe:bootstrap --write
  12. Nexty.dev Tech Stack Overview

    Nexty.dev is built on a modern, scalable stack designed for production SaaS applications. The core technologies include:

    • Frontend: Next.js 16 (App Router), Tailwind CSS, Shadcn/ui, and Zustand for state management.
    • Auth & Database: Better Auth for type-safe authentication, Drizzle ORM for queries, and support for Supabase, Neon, or self-hosted PostgreSQL. Upstash Redis is used for edge caching and rate limiting.
    • AI Integration: Vercel AI SDK with support for OpenRouter (GPT-4, Claude, Gemini), Replicate, and fal.ai.
    • Payments: Integrated support for Stripe, Creem, and PayPal, covering subscriptions, one-time payments, and usage-based billing.
    • Infrastructure: Resend for emails, Cloudflare R2 for file storage/CDN, and deployment options for Vercel or Cloudflare Workers.