You can find the firmware source code and documentation on Github, as well as nodemcu-flasher, a Windows only tools to flash the firmware to a module. There’s also a separate tool called esptool that will let you flash nodemcu from Linux. In case you find the documentation is all over the place, you might want to checkout NodeMCU video tutorial below.

Nodemcu.com is the official website for the project, but you’ll find more information on Github. You can also get answers to your questions on their BBS orESP8622 community forums.