You can organize your code within the src/ and lib/ folders as you like, with sub-directory tree structures. You only have to abide by the common C++ rules so that all include files are found etc. So if you have e.g. a structure like
If inside component1.h, you would e.g. need to write #include "../common/common.h" to reference the common.h file. You can also use build flags to add the common/ directory to the include search path, using the -I flag. However I’d recommend writing code in a way that doesn’t require explicit build flag configuration. For common, shared code, one can also structure it as a library, as seen in the documentation.
A large sample project would e.g. be Marlin (3D printer FW), just have a look at it’s source directory.