What problem does it solve?
Building consistent, performant, and multilingual Next.js 15 App Router pages and layouts for the Sira learning platform is complex and error-prone; this guide codifies server/client component patterns, i18n, PWA, and streaming conventions so engineers avoid subtle runtime bugs and bloated client bundles.
Core Features & Use Cases
- Server vs Client Component Rules: Defaults pages and layouts to server components and prescribes when to mark a component with 'use client' for interactive leaf components.
- i18n Enforcement: Standardizes next-intl usage with locale-aware routing and translation file placement for FR and EN.
- PWA, Offline & Streaming: Covers next-pwa configuration, Workbox caching strategies, offline indicators, SSE streaming for AI lessons, and queueing mutations for sync.
- Use Case: Implement a localized authenticated app shell with dashboard, module pages, AI-generated lesson streaming, offline support, and consistent performance targets across mobile and desktop.
Quick Start
Create a new locale-aware page that awaits Next.js 15 params, fetches translations with next-intl on the server, and uses Tailwind mobile-first styling while keeping interactive pieces as small client components.