Search⌘ K
AI Features

Route Groups and Co-location

Explore how to keep your Next.js projects organized and scalable by using route groups to structure folders without altering URLs and colocation to keep related files together. Understand these practices to reduce complexity and improve developer efficiency when building web applications.

We’ve covered the basics of routing and layouts: mapping pages to URLs, building dynamic routes, and creating shared layouts across sections of our apps.

So now, let’s think about what separates smooth projects from ones that become unmanageable. Often, it comes down to organization.

Let’s build on what we’ve learned to keep our projects organized and scalable.

Using Route Groups for organization

As our app grows, we naturally start to define different sections, maybe some marketing pages (/about and /contact) and a separate area for authenticated users (/dashboard or /settings). We want to ...