In this guide, I will tell you about all of the bases in Clash of Clans, and how to make them. I will also include some very useful tips. This is all my work, and none of it is copied from another Clash of Clans guide. Also, all of the pictures are screenshots of my base. Feel free to copy any of the bases. Please give any feedback and suggestions in the comments.
There are 4 types of bases in Clash of Clans: defensive bases, farming bases, hybrid bases, and clan war bases.
A good defensive base has an inner core and layers surrounding the inner core. Make sure all of the layers in the base are segmented to prevent people from easily beating you. The inner core houses the most important buildings (town hall, clan castle, heroes, x-bows, and mortars) The layer around the inner core houses air defenses, inferno towers, hidden teslas, storages and point defenses (cannons and archer towers). If there are still defenses, make a third layer which houses the rest of the point defenses (cannons and archer towers) and if there is space, put in a few collectors (mines and pumps). If you have room collectors (mines and pumps) prioritize the dark elixir drill. All of the extra buildings should be places al close as possible to the outer layer, so people can't get an easy 50% on you and win.
Farming bases are bases that aim to protect resources. Farming is good when you have to upgrade lots of things, or if you have a lot of loot that you want to protect. People with farming bases normally drop trophies to get to the 1,000 - 1,300 (silver 1 and gold 3) trophy range. They drop trophies to that range so they won't be attacked by very good people and that means they don't loose too much loot. Trophies don't matter to people with farming bases. The town hall is on the outside, so it is easily destroyed. The way a farming base works is when a person attacks you, they most likely destroy your town hall and end the battle. This is because they already got some trophies, and they don't want to use up any more troops if they already have won. Since they ended the battle you lost no loot and since they got 1 star, you will get a 12 hour shield, so no one else can attack you. The shield will help because that will give you time to rearm your traps.
A good farming base has the town hall on the outside and an inner core and layers surrounding the inner core. Make sure that all of the layers in the base are segmented so the attacker can't easily beat you. The inner core houses storages and the clan castle. The layer around the inner core should house the most important defenses, mortars, air defenses, and wizard towers. The third layer houses inferno towers, hidden teslas, the point defenses (cannons and archer towers). If there are remaining defenses, make a forth layer housing them, and if there is still room, put in collectors (mines and pumps). If you have room for collectors (mines and pumps) prioritize the dark elixir drill. With the remaining buildings, place them as close as possible to the outer layer, to prevent attackers from getting an easy 50%.
Hybrid bases are bases that protect the town hall and resources. Since a hybrid base protects the town hall and resources, it doesn't protect them very well. Hybrid bases are normally used by people who want to keep some of their resources, and not loose too many trophies. Hybrid bases will most likely make you stay at your trophy count.
A good hybrid base has an inner core that houses the most important defenses, clan castle, heroes, x-bows, and mortars. The layer around the inner core should house the town hall, inferno towers, hidden teslas, and point defenses (cannons and archer towers). If there are still defenses remaining, make a third layer housing the point defenses (cannons and archer towers) and if there is still room, put in a few collectors (mines and pumps). If there is room for collectors (mines and pumps) prioritize the dark elixir drill. With the remaining buildings, put them right outside of the outer layer of walls so the attackers can't easily get 50%.
Clan war bases are meant to protect one and only one thing, your town hall. The point of a clan war base is to not let your attacker get 3 stars, or even 1 or 2 stars. In clan wars, you can't loose any loot or trophies, so most people put storages on the outside. The only problem with this is that in clan wars, you have 2 bases, a clan war base and your normal base. Both of the bases are exactly the same. I would go into more detail about clan wars, but this is a Clash of Clans base guide. Since both bases are exactly the same, you will loose all of your loot in your storages because they are on the outside, so that is why not to put storages on the outside. The layout of a clan war base is the exactly the same as a defensive base, so if you want a clan war base, look at the "Defensive Base" section.
Note that you may not have some of the buildings, so substitute those buildings with buildings of your choice.
Triangulation/Squared defenses is very important. It is important because if you triangulate/square your important defenses (mortars, wizard towers, and air defenses) that gives the the most coverage of the base. That is good because if your best defenses have the most coverage, your best towers can attack more which means the enemy will destroy fewer buildings.
Try to centralize your clan castle so the attackers can't lure out your troops. If the attacker lures out your clan castle troops, he can put a few troops near the clan stale troops and kill them. If you make your clan stale centralized, the attackers can't lure them out, and because the cant lure them out, the clan castle troops can kill lost of the attackers troops.
Funneling is an essential part of a good base. Funneling is when you purposely leave a gap in some walls. Them in the gap, you put traps and bombs. Normally, you put a defense in that section where you have a gap in the wall, so when an attacker puts troops down (probably golems, giants, or hog riders) they will get sprung off the map, or take damage.
Don't use giant bombs unless you always have an excesses of gold. Don't use them because they cost a lot and if they are activated by one troops it is a big waste.
All hacks for Clash of Clans are fake, and they require unlimited surveys. Also, they may add a virus to your device.