In general, viewing the source code for the smart contract that would be used on the client side, can be done via contract registries. Essentially, you need to validate that at this specific address, this source matches the binary. I haven't seen a component that does this directly, but there are some that provide links for this.
For example, here is a transaction that was done on public mainnet:
https://etherscan.io/tx/0x4e3895eb7ba72df5727dc198e70fd88efcbc4971ad4f20e62e3be11e31c8d8a5
If you click on the contract address in etherscan:
Then you will see the contract and transactions done with it. You can then view the source (verified to match the binary) on the contract tab).
We don't have a single component to do this currently, but the same thing can be created for private blockchains to allow users to verify the source that they are using it the one they assume it to be.