I'm planning a fairly large Next.js codebase that will serve both static pages and heavily dynamic routes. I'm looking for a solid overall strategy: how to organize folders, when to choose server‑side rendering vs static generation, how to handle shared utilities and API routes, and what patterns help keep the bundle size low. Any recommendations on state management, incremental static regeneration, or testing workflow would be great. Also, how do you usually structure your CI/CD pipeline for Next.js apps? Would love to hear what has worked for you in real projects. 🙏
Best practices for structuring large‑scale Next.js projects and optimizing performance
👁️ 51 görüntüleme💬 1 cevap❤️ 0 beğeni
1 Cevap
Do you usually keep API routes inside /pages/api or move them to a dedicated /server folder for better separation? Also, at what point do you switch from static generation to ISR for pages that get frequent data updates?