I know how you feel. I usually just start with someone else's code that is at least similar to what I want to do, and then hack it to work for me. Basic structure of an App is
- get user input for all of the devices needed to run the app
- subscribe to events from those devices, and supply functions which can handle the events from the subscriptions
- add logic to the event handler functions
- Add scheduled functions which can cause the app to wake up periodically even if no new events have come in.
At least, that's how I approach a basic groovy app for Hubitat... There are lots of great community developers that I am sure would help you along the way.