A passive DI box is not much more than the right transformer, a 1/4" jack, a panel mount XLR-M and a project box. Add some switches and resistors for ground lift and pads and a second 1/4" jack for a through connection. It'll probably cost more to by one Jensen transformer than a commercially made DI with the same transformer since they can buy the parts in bulk.
An active DI is more complicated. It would need a couple of op amps with their associated components and some provision for power from batteries and/or phantom power. Many of the better active DIs also have a transformer on the output.