Is it worth it or safe to design your own power supply?
If you're building a few for personal use, I'd say it's not worth it unless part of your goal is to learn power supply design techniques and principles.  Even then, it's much safer to get a wall wart to convert your line to, say, 12VAC for safety.

If you're planning to go into production with it, you should consider your volumes first.  The lion's share of the development cost will be the safety and conformance certifications needed to plug it into the wall, which can run into thousands of dollars.  Even so, you'll be hard pressed to match the cost performance of a commodity OTS supply with your lower volume custom design.