@tethich thanks so much for sharing the details . so using same above structure . what is the best way to setup . meaning Site-A already existing with default archetype structure
now Site-B setup needs to be done where site-B will be using same Site-A components except the new template and page component different. for this case what will the best way . should we still go with sub module structure or manually going in ui.apps and create different folder structure for Site-B and new components will just extend Site-A resourcetype , similarly for \ui.content\src\main\content\jcr_root\conf also Site-B folder structure and create template configuration ?
and later we also have Site-C which will be brand new i.e all new components and new template structure for pages . in this what will be the best way to plan the project structure to avoid restructuring later
If you have different teams managing each site code base and/or you want to manage separately the release strategy and/or you must run independent gitflows, then I think having unique maven modules would be fit. And everything that is common from site-a would be moved to a commons module and extended from there in case customizations are required. Of course, this is doable when you have let's say a low number of sites, maybe up to 5 (it is not an exact rule).
The other approach, by keeping only one module, but create folder inside to differentiate the codebase for each site, in my view would be same thing in terms of amount of files to manage, but only more complicated and prone to errors. I would still keep things separately and cleaner.
If you think that you will have to support lots and lots of sites, each with mostly same components and services but just slightly different, then you might think of making the code smarter. Implement the logic to support different behaviors for different sites (or group of sites), keeping the number of components/services/templates etc as lower as you can manage them.
There is always a tradeoff between how flexible is your end solution and how maintainable it is.
Consider also using techniques like components proxing and components versioning.