Start with agricultural grade products, such as sold here... or elsewhere...
KNO3- Potassium nitrate supplies potassium and nitrogen.
KH2PO4- Potassium phosphate supplies phosphorus. It is dosed in such small amounts that the potassium almost does not count.
K2SO4- Potassium sulfate supplies potassium, and is good to have some on hand in case you have a tank that is running a bit high in NO3, but still needs the K.
Another source of potassium is potassium bicarbonate, but this also raises the KH, so may not be something you want to add on a regular basis.
Calcium can come from calcium carbonate (also raises the KH) or calcium chloride.
Magnesium can come from Epsom salt
Iron is available in several chelated forms, a bit of research to figure out which works best in your tank.
All the other traces are available in chelated form at that site, except for chelated Molybdenum.
You could get boron from boric acid (This is the source of the B in CSM+B)
I priced it out from Peters and one other site, and tried to figure out a ratio to purchase so I could come close to the elements in CSM+B and found that it would cost almost the same as ordering from one of the members here at planted tank.
The macros might be a bit cheaper if you get together with friends and order 50 pound bags, but unless you are running several thousand gallons worth of tanks there is no way you are going to need more than a pound or so of KNO3 and less KH2PO4. Might not need any K2SO4.
As a club, SFBAAPS did that- someone purchased 50lb bags of KNO3, KH2PO4, K2SO4 and shared it among the members. Took years to use it up!