ADR-0042: Choose a router for the operator console
Status
Accepted
Context and Problem Statement
The operator console (app.crastinating.pro) needs nested routes, typed route parameters, and SSR for the public-share view of a decision. Should we adopt Next.js App Router, TanStack Router on Vite, or React Router v7 (Remix)?
Decision Drivers
- Type-safe route parameters end-to-end (no
as stringcasts in pages). - SSR for SEO on public-share pages.
- Operator team fluency: 4 of 6 engineers are already fluent in Next.js.
- We want one routing primitive across web/app/brief/playbook — already
three of those are Next.
Considered Options
- Next.js App Router (16.2)
- TanStack Router on Vite
- React Router v7 (Remix)
Decision Outcome
Chosen: Next.js App Router.
Decisive driver: typed routes + SSR + team fluency. The other two are technically excellent and TanStack's type inference is arguably the best in class — but adopting either would cost ~one engineer-quarter of ramp-up across the four front-end apps. We don't have that quarter.
Pros and Cons of the Options
Next.js App Router
Pros
experimental.typedRoutesgives us link-time type safety.- Native SSR via React Server Components.
- Same primitive across all four apps in the monorepo.
Cons
- Cache Components is still settling; some sharp edges around
use cache + cacheLife semantics.
- The framework moves fast — we will pay an upgrade tax 1–2× per year.
TanStack Router on Vite
Pros
- Best-in-class typed search params and route params.
- Faster cold dev start than Next.
Cons
- No first-class SSR. We'd need a separate Vite SSR setup or a hybrid host.
- New primitive for the team — ramp-up cost.
React Router v7 (Remix)
Pros
- Excellent loaders/actions story.
- SSR out of the box.
Cons
- The merge with Remix is recent; some patterns are still in flux.
- New primitive for the team relative to existing Next apps.
More Information
- Supersedes ADR-0019 (where we picked plain Vite + React Router v6 for the
console — that decision predated typedRoutes shipping).
- Benchmark notes:
/docs/router-bench-2026-04.md - Discussion thread:
#arch-router(2026-04-08).