DEV Community

Discussion on: Better file structure in React projects

Collapse
 
victorocna profile image
Victor Ocnarescu

Hello Jakub! I see many devs in the comment section prefer the src folder as well. Is this a standard in python or just a preference?

Collapse
 
sibyx profile image
Jakub Dubec

Hi Victor, I don't want to say that it's some kind of standard. There is no such thing as a standardized project structure (not even in Python PEPs). As I said in the previous comment, the project repository is not only a source code but lots of accompanying files such as configs and documentation. The src folder is not just a Python thing but it's very common in many other languages such as C++ or Java. It comes from the necessity to separate source code from the rest of the project files in larger projects. Here are a few examples of popular projects that come to my mind:

Also, there is a lot of popular projects which are not using such a structure.

To sum up, it's always a preference of a maintainer or the community. But usage of the src folder makes perfect sense for me.