When I wrote my first plugin I used the nUI_Infopanel_Minimap as a guide to how infopanel plugins are set up. After a few plugins I understood enough to arrange the code to my way of coding and progressed from there. For the chat window plugins I used the combatlog plugin to get an idea how that works with nUI and thus nUI_InfoPanel_Guildchat was born
Feel free to use any of my InfoPanel plugins to get an idea or even do what I did and use the Minimap file to guide you.
For help in lua/addon coding in general I find wowwiki and endless supply of knowledge and is on my browser toolbar as I use it so often.