Author here. I've shipped multiple Next.js projects to production with LLMs writing over 90% of the code, and this post outlines a project structure that aids LLMs and doesn't trip them up.
TL;DR: Keep it flat, obvious and simple. 7 top-level folders (app, components, database, emails, functions, lib, public) instead of deep nesting. Explicit server/client separation. Everything has one obvious place to live.
Happy to answer questions about working with LLMs on larger codebases or specific patterns I've found useful.
aakashns•1d ago
TL;DR: Keep it flat, obvious and simple. 7 top-level folders (app, components, database, emails, functions, lib, public) instead of deep nesting. Explicit server/client separation. Everything has one obvious place to live.
Happy to answer questions about working with LLMs on larger codebases or specific patterns I've found useful.