The only things I can add to @NoWon's thorough explanation are:
An XBee 3 isn't a requirement. An older Series 2 XBee device can be used. I am using three XBee S2 modules (model XB240Z7WIT-004) and they work wonderfully with all my Xiaomi and other Zigbee devices. My particular model of XBee isn't programmable, but that doesn't matter because they can still be flashed with firmware that allows the module to act as a Zigbee repeater (router) and also can be used to map your Zigbee mesh network using Digi's International's free XCTU software. For an explanation of how to decipher model numbers for older XBee modules, see my previous post here.
Using and XBee just requires a) An XBee module, b) an XBee USB host "Explorer"/Development board (which supplies power and a USB-to-serial connection for the XBEE without any soldering), c) an always on USB power supply, and d) the above mentioned XCTU software for initial firmware flashing / setup and also mesh network mapping. Because the XBee + USB host boards don't come with any case, some people have made a DIY case, and that's about the only DIY aspect of them. Seriously, they are not difficult to get set up and working, plus there's the advantage of being able to map your network to see which devices are connecting through a repeater along with signal strength.
The Securifi Peanut Plug does not work well as a repeater for Xiaomi devices, and I've even had troubles pairing my Sengled classic smart bulbs while my Peanut Plug is on. I don't recommend it if you're using Xiaomi devices / Sengled bulbs.