Quick Answer: The best architecture is a single Next.js codebase using the App Router, with static marketing content rendered through Server Components and ISR, and authenticated app surfaces behind middleware-gated route groups. This gives you one deployment, shared design system and SEO foundation, while keeping app data private, cacheable, and fast at the edge. For larger teams, isolate marketing and application concerns with separate route groups, shared packages, and server-side auth/session enforcement rather than client-only protection.
A strong Next.js architecture for mixed marketing and authenticated experiences should separate concerns at the routing and rendering layer, not necessarily at the repository level. Public pages should be optimized for crawlability and performance using static generation, incremental revalidation, and edge-friendly asset delivery, while authenticated pages should be rendered as dynamic Server Components with session validation, role-based access control, and data fetching performed on the server. The most maintainable pattern is a single monorepo or single app with route groups such as (marketing) and (app), shared UI and utility packages, centralized auth middleware, and clear caching boundaries so that public content benefits from CDN caching without leaking private data into static caches.