Thanks Sanket,
Above links helped a bit.
But I am still not sure about dir structure. For Example :
1. When to add code in "module" dir vs "extension" directory
2. Where to add code if I want to add some functionality to core alfresco Ex. If I want to run some code when user click to left tree in alfresco share , should I copy paste entire tree.js file in "<my-base-jar>/META-INF/components/documentlibrary/tree.js" or I can put a custom file with "onNodeClicked" event ?
Thanks
Sumit