I just want to understand how this mining process works (from the developers point of view from very start to end). Can someone guide me towards a doc or a open source code (I am newbie here so a VERY BASIC one)? Thanks in advance
I'm not sure that a guide as basic as you describe is even possible. It depends on what exactly you mean. Mining itself isn't too complicated to read and understand, but writing a start-to-end app that can be used for mining means writing a full node. That is very complicated.
Writing a Bitcoin miner from start to end involves not only collecting transactions, calculating the Merkle root, constructing the block header, and the actual hashing/mining, but also verifying the blockchain and each transaction in it, and communicating with peers in the network to get and send blocks and transaction.
Tim S. pretty much covered it, but I wanted to 2 great resources which have been very helpful for myself and many others:
- Ken Shirriff's blog has a few Bitcoin mining related posts which use Python code to great effectiveness; whilst Bitcoin Mining The Hard Way is probably the most useful, there's also some novel use cases where Ken tries Bitcoin mining by hand and using a 55 year old mainframe
- Not specifically related to mining, but very useful in visualising related concepts is RoyalFork Blog