What is the difference between chainstate and blocks folder? Is the blocks and chainstate folder store the same blocks data ?

How can we read those data using code and display that on the web frontend like the blockchain explorer websites
Is the blocks and chainstate folder store the same blocks data ?


No, the blocks directory contains the actual blocks. The chainstate directory contains the state as of the latest block (in simplified terms, it stores every spendable coin, who owns it, and how much it's worth).


  How can we read those data using code and display that on the web frontend like the blockchain explorer websites


No, you need transaction and address indexes for that. Bitcoin Core is not designed to provide those.