Back to blog

Next.js 15 App Router: What Changed and How to Migrate Your Project

Next.js 15 brings significant improvements to the App Router. Learn what's new and the safest path to upgrade your production applications.

May 27, 20265 min readElevenClicks Team

What's New in Next.js 15 App Router

Next.js 15, released in late 2025, represents a maturation of the App Router pattern that was introduced as experimental in version 13. If your team has been running the Pages Router or hesitating on the migration, version 15 makes the case stronger than ever. The improvements focus on performance, developer experience, and production stability.

The most significant addition is enhanced Server Component support with better error boundaries and streaming capabilities. The framework now handles partial pre-rendering more intelligently, allowing you to combine static and dynamic content with minimal configuration overhead. For North American teams managing multi-region deployments, this is particularly valuable.

Key Changes You Need to Know

Dynamic Route Handling

Dynamic routes in the App Router are now more explicit and powerful. The new generateStaticParams function has evolved to better handle large datasets. If you're generating hundreds or thousands of dynamic pages—common in e-commerce and SaaS platforms—Next.js 15 now provides built-in pagination and lazy generation strategies that reduce build times significantly.

Middleware and Request Interception

Middleware has been redesigned for clarity. The confusing middleware.ts file at the root level now supports more granular route matching. You can now define middleware behavior directly in route segments using a convention-based approach, eliminating the need for complex regex patterns that haunted many Next.js 14 projects.

API Routes Integration

API routes and Server Actions now coexist more harmoniously. Next.js 15 clarifies when to use Route Handlers (the App Router equivalent of API routes) versus Server Actions. For teams building REST APIs alongside React components, this distinction matters. Route Handlers maintain backwards compatibility while Server Actions are now the preferred method for mutations within your component tree.

Image and Font Optimization

The next/image component received performance refinements. Automatic AVIF conversion is now enabled by default on supported platforms. For Canadian businesses serving both English and French audiences, improved font subsetting means you can deliver localized typography without the bandwidth penalty.

Planning Your Migration Strategy

Migrating from Pages Router to App Router is not a weekend project, but it's manageable with proper planning. Here's a practical approach:

  1. Audit your codebase – Identify which routes are high-traffic (prioritize these first) and which pages have complex logic. Tools like next-codemod can automate some transformations, but manual review is essential.
  2. Create a feature branch strategy – Don't migrate everything at once. Adopt a hybrid approach where Pages Router and App Router coexist during transition. Next.js supports this officially.
  3. Test authentication flows early – If you're using NextAuth.js, Auth0, or similar solutions, validate authentication in the App Router before migrating protected routes. Middleware changes may affect your auth logic.
  4. Validate API integrations – Server Actions behave differently from traditional API routes. If your frontend makes fetch requests to internal APIs, you'll need to adapt to either Route Handlers or Server Actions.
  5. Deploy to staging first – Use a staging environment that mirrors your production setup. Multi-region deployments, edge functions, and database connections may behave differently in the App Router.

Common Migration Pitfalls

We've seen several patterns cause problems across Canadian and North American businesses migrating to Next.js 15:

Over-relying on Server Actions for everything – Server Actions are powerful but not a replacement for proper API design. Complex business logic should still live in dedicated Route Handlers or backend services.

Ignoring hydration mismatches – App Router's Server Component-first approach can cause hydration issues if you're not careful with client state. Always mark interactive components with 'use client' and validate that your component tree renders identically on server and client.

Forgetting about static generation optimization – The App Router defaults to dynamic rendering, which is safer but slower. Use generateStaticParams and explicit revalidation strategies for pages you know are mostly static.

Incomplete error boundary setup – App Router requires more thoughtful error handling. Implement error.tsx and not-found.tsx files in your route segments to handle edge cases gracefully.

Practical Migration Checklist

Before declaring victory on your migration, verify:

  • All 404 and 500 errors are caught by proper error boundaries
  • Authentication tokens refresh correctly in Server Actions and Route Handlers
  • Image optimization is working (check DevTools for AVIF delivery)
  • Database connection pooling is configured for serverless functions if you're using Vercel Edge Functions
  • Environment variables are correctly scoped (public vs. private)
  • Performance metrics (Core Web Vitals) match or improve from the old implementation
  • Middleware doesn't unnecessarily block every request

Tools and Resources for 2026

Several tools have matured to support Next.js 15 migration specifically. Vercel's next-codemod package automates many structural changes. Playwright and Cypress continue to be essential for validating that your migrated routes behave identically. For performance testing, Lighthouse CI integrated into your GitHub Actions workflow ensures your migration doesn't degrade user experience.

The Next.js documentation for version 15 is comprehensive, but consider joining the official Discord community where teams share real migration experiences specific to production workloads.

Should You Migrate Right Now?

If you're on Pages Router with a stable, low-maintenance application, there's no urgent need. However, if you're building new features, scaling to multiple regions, or planning significant technical debt work anyway, the App Router is now mature enough to justify the migration investment. The performance improvements alone—particularly in build times and Core Web Vitals—often pay for the engineering effort within 3–6 months through reduced hosting costs and improved user retention.

Migration timelines vary, but plan for 2–4 weeks for a medium-sized application with experienced developers. Larger monoliths may need 8–12 weeks spread across multiple teams.

Get Professional Help

If your team lacks experience with the App Router or you're managing a complex migration with tight deadlines, ElevenClicks specializes in Next.js upgrades and architectural improvements for Canadian and North American businesses. We've successfully migrated dozens of production applications to Next.js 15, and we understand the specific challenges of multi-region deployments and enterprise authentication scenarios. Contact us for a free technical assessment – we'll evaluate your codebase and provide a realistic migration timeline and resource estimate.

Free Consultation

Working on something similar?

ElevenClicks helps Canadian businesses build web development solutions that actually work. Book a free 30-minute call — no pitch, just honest advice.

Ontario-based · Canadian timezone · No offshore handoffs