Why Monorepo?
Single source of truth: Shared UI, config, and types.
Faster release cycle: Packages are tested together.
Cost: CI/CD simplifies.
Our Suggested Stack
Next.js 14+ (App Router, RSC, Route Handlers)
Firebase (Auth, Firestore, Storage; Functions if needed)
Turborepo (task caching) + ESLint/Prettier
Production Considerations
Environment variables: .env.local is only read on the server side.
Edge or Node? Select API routes according to necessity.
Determine ISR and caching policy.
Measurement and Improvement
Core Web Vitals targets: LCP < 2.5s, INP < 200ms.
Internal Link Suggestions:
[Cybersecurity checklist] → CSP/HSTS
[Cloud Strategy] → Transition from Firebase to multi-cloud
Next.js Security Checklist: CSP, HSTS, and Secret Key Management
