I am using ESPs (at the moment only ESP8266) to control LED strips in my home. Some of the LED strips are controlled by MQTT only. Others by buttons. Still others rely on both. Some areas are covered by a WiFi-repeater which is switched off sometimes. This causes trouble because then the ESP is desparately trying to connect to the WiFi which is not there and blocks everything else. I'm trying to find a way to circumvent this and to generate a kind of universal code.
I typically use the Wemos D1 mini dev board because of its size and because I can still program it directly via USB. My LED strips are for 12V but the schematic should work also for 24V (with the necessary adpations). As Mosfets I use IRLU024N. They are logic level and not very expensive. Although the schematic shows a maximum use case, I only put the components onto a perfboard that I really need for a particular use case.
Depending on the dev board I use a 5V or 3.3V supply (5V for the Wemos D1 mini). This can be done by a linear regulator (which requires a heat sink) or a switch mode DC-DC converter. Max. current of 500 mA is sufficient. Since the ESP tends to draw quite some current when sending on WiFi I added a 100uF electrolytic cap.
Some people advice pull-down resistors (e.g. 10k) at the gates of the mosfets to avoid initial undefined states but I don't care.
The LED strips that I use draw 2-3 A. So I do not need any heat sink for the mosfet. Switching more than 5A is possible but requires thinking about possibly using a heatsink.
The numbers in the schematic designate the GPIOs not any pin numbers.
Concerning the ADC (if used): The ADC of the ESP 8266 is limited to 1V. The Wemos D1 mini is designed such that it can handle up to 3.3V. Other boards might be different.