This is what I use, though you could probably vary it some and get similar results
1 bar of Goatboy brand goat soap, grated as small as possible, could also use food processor
1 cup of borax
1 cup washing soda
1 cup Oxyclean
Mix it all up and store in sealed tupperware type container. I have a front load machine. I use the scoop that came with the Oxyclean but only use about 3/4 of a scoop per load.
The scent from the soap smells in the detergent, but gets rinsed out, so if you are one of those people whose clothes have to smell you can add those laundry scent crystals, or just use a dryer sheet with scent.