DevStacked
Guides & tutorials

Practical guides for
Next.js, Supabase & Stripe

Implementation-driven guides based on real project experience — architecture decisions, integration walkthroughs, and the mistakes worth avoiding.

30 guides

muimaterial-uinextjs17 min read

MUI v9 Theme Setup in Next.js 16: Full 2026 Guide

Learn the correct MUI v9 theme setup in Next.js 16 App Router — cache provider, custom theme, dark mode, and Google Fonts, step by step.

Next.jsMulti-TenantSaaS29 min read

Multi-Tenant Architecture in Next.js 16 (2026)

Learn to build multi-tenant SaaS apps in Next.js 16 — subdomain routing with proxy.ts, tenant data isolation, Postgres RLS, and Vercel wildcard domains.

Next.jsCache ComponentsPPR23 min read

Next.js Cache Components Migration Guide (2026)

Migrate to Next.js Cache Components — enable cacheComponents, replace revalidate/fetchCache with use cache and cacheLife, and fix Suspense errors.

StripeRefundsDisputes21 min read

Stripe Refunds & Disputes in Next.js 16 (2026)

Learn to handle Stripe refunds and disputes in Next.js 16 - Server Actions, webhook events, evidence submission, and idempotent code you can trust today.

Next.jsMDXnext-mdx-remote-client18 min read

next-mdx-remote-client Guide for Next.js 16 (2026)

Learn how to build an MDX blog in Next.js 16 App Router using next-mdx-remote-client — the maintained alternative to the archived next-mdx-remote package.

Next.jsReactServer Components17 min read

Server vs Client Components in Next.js 16 (2026 Guide)

Learn when to use Server Components vs Client Components in Next.js 16 App Router, with real code examples, common mistakes, and a clear decision framework.

Feature FlagsNext.jsSaaS23 min read

Feature Flags in SaaS: A Beginner's Guide with Next.js 16 (2026)

Learn what feature flags are and how to add them to a SaaS app with Next.js 16 — a Supabase-backed setup, the Vercel Flags SDK, percentage rollouts, and best practices.

ZodYupTypeScript14 min read

Zod vs Yup in 2026: Which Validation Library Should You Use?

Zod vs Yup compared for 2026 — TypeScript inference, bundle size, React Hook Form integration, async validation, and real Next.js code examples.

Next.jsGoogle Tag ManagerGoogle Analytics21 min read

Google Tag Manager & GA4 Setup for Next.js 16 (2026 Guide)

Learn how to set up Google Tag Manager and GA4 in Next.js 16 App Router — GTM container, GA4 property, custom events, and Consent Mode, step by step.

SupabaseFirebaseAuthentication16 min read

Supabase Auth vs Firebase Auth in 2026

Supabase Auth vs Firebase Auth compared for 2026 — setup, pricing, Next.js App Router integration, security, and which one fits your project.

Next.jsAuthenticationRBAC17 min read

Role-Based Access Control (RBAC) in Next.js 16 (2026)

Learn how to implement role-based authorization (RBAC) in Next.js 16 App Router with TypeScript, Auth.js v5, Proxy, Server Actions, Route Handlers, and permissions.

Next.jsSEOGoogle Search Console16 min read

Google Search Console Setup for Next.js (2026 Beginner's Guide)

Learn how to set up Google Search Console for a Next.js 16 App Router site — verification, sitemap.ts, robots.ts, and indexing best practices.

ResendNext.js 16Email29 min read

How to Send Newsletters & Bulk Emails with Resend in Next.js 16

Learn how to send bulk emails with Resend in Next.js 16 using Segments, Topics, Broadcasts, and the Batch API — without hitting rate limits or serverless timeouts.

Next.jsRoute HandlersApp Router16 min read

Route Handlers Explained in Next.js 16

Learn Route Handlers in Next.js 16 App Router — the route.ts file convention, HTTP methods, dynamic params, caching with Cache Components, and building a real API.

stripe next.js 16stripe webhooksstripe idempotency21 min read

Stripe Webhook Idempotency Guide for Next.js 16

Handle Stripe webhook idempotency and retries in Next.js 16 — signature verification, idempotency keys, and duplicate-event prevention.

Next.jsSEOMetadata15 min read

How to Add Metadata in Next.js 16 (2026 Guide)

Add SEO metadata in Next.js 16 App Router — static metadata, generateMetadata for dynamic pages, Open Graph, Twitter Cards, and common mistakes to avoid.

StripeUsage-Based BillingMetered Billing13 min read

Usage-Based Billing with Stripe (2026 Guide)

Learn how to build usage-based billing with Stripe Meters API in Next.js 16. Track API calls, tokens, or storage and bill customers for actual usage.

Next.jsAuth.jsNextAuth18 min read

How to Add NextAuth (Auth.js v5) in Next.js 16

Add NextAuth (Auth.js v5) to Next.js 16 step by step — providers, sessions, protected routes, proxy.ts, and experimental passkey (WebAuthn) sign-in.

Next.jsAWS S3File Upload27 min read

AWS S3 in Next.js 16: Upload & Display Files (2026 Guide)

Upload files to AWS S3 in Next.js 16 with server proxy, presigned URLs and multipart uploads, then display them with public URLs, presigned GET links and CloudFront.

Next.jsMDXMDXRemote16 min read

MDX Blog Setup with next-mdx-remote in Next.js 16

Learn how to set up next-mdx-remote in Next.js 16 App Router to render MDX blog posts from the file system, with remark-gfm, custom components, and syntax highlighting.

clerknextauthauth.js14 min read

Clerk vs Auth.js (NextAuth) vs Better Auth in 2026: Compared

Clerk vs Auth.js (NextAuth) v5 vs Better Auth for Next.js 16 in 2026. Setup time, pricing, passkeys, organizations, data ownership, and which one fits your project.

Next.jsSanityHeadless CMS15 min read

Integrate Sanity CMS with Next.js 16 App Router

Integrate Sanity CMS with the Next.js 16 App Router. A complete 2026 guide covering embedded Sanity Studio, GROQ queries, SanityLive, Portable Text, & async params.

Next.jsStripeSubscriptions17 min read

Stripe Subscriptions Guide for Next.js 16 (2026)

Stripe subscription billing tutorial for Next.js 16 — Checkout Sessions using Server Actions, webhooks, Customer Portal. Full working code, not just API docs.

Next.jsTypeScriptTailwind14 min read

SaaS Starter Architecture with Next.js 2026

Learn how to architect a production-ready SaaS app with Next.js, TypeScript, Tailwind & React Compiler. Folder structure, auth, billing & more.

stripe checkout vs payment elementstripe payment elementstripe checkout10 min read

Stripe Checkout vs Payment Element (2026): Which to Use?

Stripe Checkout vs Payment Element: the Checkout Sessions API's hosted, embedded and Elements modes compared, with Next.js code and Stripe's recommendation.

ResendNext.js 16Email13 min read

Resend Email Setup Beginner Guide for Next.js 16

Resend + Next.js 16 tutorial — contact forms, Server Actions, React Email, domain verification, Vercel deploy. Full working code, not just docs.

Next.jsSupabaseTypeScript15 min read

Build a Todo App with Next.js 16 & Supabase

Learn how to build a production-ready Todo App using Next.js 16, Supabase, TypeScript, Tailwind CSS, Server Actions, Authentication, and Row Level Security (RLS).

Next.jsClerkAuthentication9 min read

Add Clerk Authentication to Next.js 16 (2026)

Learn to implement Clerk in Next.js 16. Covers proxy.ts configuration, clerkMiddleware, auth.protect(), server actions, and protected routes.

stripe next.js 16stripe payment elementnext.js stripe tutorial14 min read

Stripe Payment Element Guide for Next.js 16 (2026)

Learn how to integrate Stripe Payment Element in Next.js 16 using Server Actions, Stripe Payment Intents, webhooks, and App Router.

next.jsstripetypeScript11 min read

Stripe Checkout Guide: Next.js 16 + Server Actions

Stripe Checkout tutorial for Next.js 16 App Router — Server Actions, webhook setup, TypeScript, and full working code, not just API reference docs.

Looking for something you can run instead of read?Browse the free tools