To follow the ScandiPWA directory structure, it is necessary to store your code within the src directory. It is also crucial to establish a systematic organization for your code. You can learn more:

What is the directory structure?

While it is possible to place your code directly in the root src directory, it is recommended that you organize your code within the src directory of extensions. Doing so will lead to better separation of concerns and make your code easier to distribute and reuse.

How to work with ScandiPWA extensions?