Next.js Discord

Discord Forum

What is the best structure for a nextjs project using /src

Answered
French Angora posted this in #help-forum
Open in Discord
French AngoraOP
Hey guys. So I'm not sure at what point I started to make a /ui dir that matches my routes, but now I would like to change the structure so that it matches other projects. However I have seen that some have multiple component. they will usually have like a /src/ui/components but then also have a components in the page, what is a good standard though? I am looking to restructure my project becasue I find my self, re-creating many components that I could reuse but because of my structure I dont. For example the edit and create vehicles are similar form yet one just has data already passed into it while the other doesn't. Thanks for the help.
Answered by B33fb0n3
There is no "best structure" for your project. It very much depends what you like, what your team uses, what kind of projects you have, ...

You can find some common examples on how people often have their folder structure here: https://nextjs.org/docs/app/getting-started/project-structure
View full answer

4 Replies