Have you seen this page? There is also the example_ynh dummy app that offers skeleton scripts with (almost?) all the features and functions you could use to integrate an app. You can also follow these formal guidelines (WIP).
As a newbie app maintainer, I would suggest not to hesitate to have a look to other package to see and understand how they are made, and how some app-specific features have been implemented in the scripts.
Have a development environment made specifically to test your package. Do not use your own server with your own data, you may pollute your system with remainders of failed installations and removals, and at worst lose your data.
Start off the example_ynh app. Rename it. Prepare the
manifest.json while asking yourself “what my app needs to know from the admin to be correctly installed?” Then follow its
install script while asking yourself "does it need a specific port, a database, a service, etc? If no, remove the functions. If yes, RTFM of the app to know how to proceed and what to write.
Do not hesitate to run the
install scripts on your development server with
--verbose option as often as necessary. I personally find easier to advance one error at a time than getting everything to work blindly.
Do not try to completely integrate it into YNH from scratch. Start by making it work with the
install script, and make its removal clean. Then implement
upgrade. Then you can try do interface it with SSOwat or the LDAP server.
I will stop here, I am sure more experienced packagers can share their wisdom.