Next.js Hybrid Router

Pages + App Router in one codebase. Marketing on Pages, StackScan results on App.

Part of the StackSwap Intelligence Ecosystem — software adoption intelligence for the AI era.

What Is the Next.js Hybrid Router Setup?

StackSwap runs on Next.js 14 with both the Pages Router (`/pages/*`) and the App Router (`/app/*`) active in the same codebase. Marketing, portfolio, and legacy surfaces live under Pages where getStaticProps/getStaticPaths are still the simplest fit; StackScan results and high-interactivity views live under the App Router so we can use server components, colocated loading.tsx, and streaming. Routing boundaries are explicit — the report experience at `/stackscan/results/[reportId]` is an App Router client component, while the intake flow at `/stackscan` stays on Pages.

How It Fits the StackSwap Intelligence Ecosystem

Keeping both routers means we can migrate incrementally without rewriting working surfaces. New features that benefit from streaming, suspense, or server-side data fetching go straight to App Router; documented, SEO-sensitive pages (portfolio, ethos, benchmarks) keep their Pages implementations and static generation. Shared components (PlatformNav, PlatformFooter) work in both routers via `"use client"` boundaries where needed.

Why This Matters for Velocity and Maintainability

Hybrid routing is a pragmatic choice for a shipping product: we get modern server-component ergonomics where they pay off and don't force a rewrite where Pages already works. Anyone reading StackSwap's code can trace a request end-to-end without guessing which router owns what — the path is the contract.