Next.js Discord

Discord Forum

Next.js App Router File Structure

Unanswered
Entlebucher Mountain Dog posted this in #help-forum
Open in Discord
Entlebucher Mountain DogOP
Hello everyone,
May I know if the following app structure table is appropriate?
Other than layout.tsx and page.tsx , can we create other files here?

5 Replies

Entlebucher Mountain DogOP
@joulev
Thank you.

Aside from that, if I have a component that will display across all the pages/routes.

Should I declare that component on layout.tsx?
Entlebucher Mountain DogOP
Do we have other alternative solution?
Well, you are free to organise your files and components however you want. The router imposes very few restrictions.

https://nextjs.org/docs/app/building-your-application/routing/colocation