Admit it. Your Boom Beach base has been raided for a number of times by some random jerks out there, regardless of in which level you are. Me, too.
The good thing about Boom Beach is that, there's a recap video of the entire base attack which is playable at different speeds for your lesson. Depending on which level you are, there is actually an article which might give you an idea of how to build your base in order to defend as much variations of the enemies attack as possible.
Of course I am NOT copying the ideas. After so many troubles of rewinding the 'Home base raided' videos, here summarizes my opinion on how to build the Boom Beach defensive base as strongest as possible (air your opinions if you find this not convincing):