This page describes in DCC hardwares based on Opensource and Open hardware as Arduino. You can freely customize these gadget.
Almost every command stations are based on Arduino UNO.
NMRA DCC library is the most popular solution for decoder development. MynaBay's DCC Decoder library may be 2nd choice.
If you want to support Marklin digital, Check LibMotorola or Laserlicht's, cpfair's.