First and foremost, the name of the game is to have more walls/ceilings/roofs between your loot and the outside. “Honeycombing” is a method of having extra walls/ceilings/roofs between the usable areas of the base and the outside, and it mainly relies on triangles. Triangles allow for more efficient use of area by having more walls and circular shapes. Big square bases are kind of bad unless you’re part of a big clan that needs square foundations for lots of things and will likely never be raided.
Make sure your walls face outwards, everything except sheet metal and armored has the back side weak to tools. For twig, the back side has an x pattern, for wood and stone it’s the flat side. Note that foundations have their top side as weak, so don’t be having exposed foundations.
Openings are weakpoints. Ladder hatches are basically an invitation to be raided. Windows are as well unless you put metal bars in them. Sheet metal doors are slightly weaker than stone walls. You want to make sure that it’s more costly to go through your doors (which will be a raider’s first option) than to go through the walls.
Stack walls. Basically, you can build out and then back with triangles in a way that you have foundations super close, but not touching. Then when you put walls and doorways on, you have double the walls there in the same area and number of foundations. You probably only need one layer of this near your perimeter, and note that this approach is weak to rockets if raiders choose to go in by walls instead of doors, but good against C4.
Do not neglect your roof. Raiders will get on top of it, so make sure that they don’t get an advantage in raiding you by doing so
Build actual airlocks. Square foundation, 90 degree turn from a normal door to a double door that opens into the airlock. While the double door is open, the main doorway cannot be passed through. This means that it’s impossible to go through without opening or closing a door, preventing anyone from going deep just because things are open.
Traps. The shotgun trap is currently the most effective because it’s hard to drain it like with flame and auto turrets. It’s very good behind doors, especially double doors, and can be combined with the “actual airlock” concept to trap a player and kill them easily.
Section off your base. You want to not have large open areas. About the absolute most open area I’ll have in a base is 8 triangle foundations and 3 square foundations, and that’s on a server where raiding is only allowed the last day of the wipe and most people would consider that too much.
External walls. Even wooden ones will help prevent doorcamping and deter people. Just note that while they make it harder to get to your ceiling, raiders will eventually get on top, ladders are not expensive
Finally, and this is something many people seem to forget, put foundation stairs up to your doorway (may need 2, you should be able to run straight in) once you no longer plan to expand it with more airlocks. Put simply, you are at a disadvantage if your means of getting to safety is behind a jumping puzzle because you will get downed trying to parkour it. If you’re not sure if you’ll expand it or not, make the stairs only wooden.