The best thing for keeping a horse barefoot is turnout, on dry, hard ground. 24/7 is preferable, with only stall time to eat "feed".
A very natural diet is best too. Lots of grass or mixed hay, with no grain or sweet feed. My horses get 1 lb of ADM's StaySTRONG Metabolic Mineral pellets and 1/2 scoop (3qt scoop) of chopped alfalfa hay. Since my horses don't have much grazing, they also get a Omega 3 supplement, Uckele's Cocosoya oil, 2-4 oz depending on the horse. My hard workers or keepers get 1-1.5 scoops of Alfalfa pellets as well (3-4lbs).
My horses have to deal with mud; there's not much I can do about it, so I treat all of them for thrush 2-4 times a week, depending on pasture conditions. I spray the bottom of their feet with either Iodine (weak solution from the farm store) or other thrush product. I use Hoof Heal as a topical treatment twice a week during the summer as we go from mud to rock hard and back to mud quickly and often... Hoof Heal moisturizes the feet as well as prevents bacterial and thrush growth.
Frequent trimming is good too. It promotes hoof balance and proper wear. I trim mine myself every 3-5 weeks, depending on the horse. I only have one horse that needs boots for trail riding. I use Easy Boot Edge boots on her. I still have one in front shoes, but she will be transitioned to barefoot soon.