This is the code used in my youtube ESP_IDF series: https://www.youtube.com/playlist?list=PL-rMnRcAeqTDPshRP01D4dYJXx7tYmWg7
Please note that I'm using ESP-IDF version 5.4. My playlist might not be suitable if you are using an older version than 5.X of ESP-IDF. I'm using Visual Studio Code with ESP_IDF extension by Espressif.
Note besides following the source file, you might make changes to CMakeLists.txt. which I have covered in each of videos.