How to design and make a house foundation that is straight, strong and durable regardless of environment is not a complex process, but a very important start of the house construction project. There are major rules to follow and if you do those correctly, the project will go smooth afterward.

1. Well below frost layer. The earth surface freezes only just so many inches deep in the ground depending on where you live. It's important to get the foundation footer beneath the frost layer to prevent frost heaves or dips. If frost gets under concrete, it can expand the ground up push it upward, then when it relaxes you have a dip. This can make a house uneven over time.
2. Poured on undisturbed soil or compacted gravel. The ground needs to be compacted gravel or at the minimum soil where you have dug down low enough and the ground is hard, like a rocky surface, not soft like clay or dirt.
3. In square. The forms you use need to be measured so that they are perfectly in square. Being "in square" means corners are at perfect 90 degree angles so that various building materials (plywood sheathing, sheetrock, cabinets, carpeting) fit into place.The forms will need to be braced so cement doesn't bow out the sides.
4. Is level. All houses and buildings are level. That's because the foundations are measured and formed with a level or transit so buildings are flat and straight up. They don't have a slope. Not even on mountain slopes.
5. Allowed to cure without freezing or dehydrating. Cement is delivered and poured with an exact amount of water as an industry standard. That moisture can freeze and damage the cement. On really hot days, the water in the cement can wick into the dry ground or evaporate before it has a chance to completely cure. It needs to slowly cure and dry to be strong.