I am not sure about the specific question you area asing here, so I am going to share with you some useful resources for building frontend substrate Dapps.
The front-end-template is the basic example, it uses ReactJS to render a web browser interface that enables you to interact with the Substrate-based blockchain node. It uses the PolkadotJS tool. Another framework you can use for interactions with Substrate chains is CAPI.
polkadot-js-api-ts-template is a template that you can use to quickly start hacking in top of any substrate based chain, it creates for you all the basics.
Another example to interact with a substrate node you can look is: Substrate Contracts UI. It is a web application for deploying and interacting with WASM smart contracts on Substrate blockchains that include the FRAME Contracts Pallet.
You can also take a look at the code of a production-ready frontend app: Polkadot Staking Dashboard
Other front end examples: substrate-society, chess-substrate-dapp ...
Is good to see how the community is creating more front-end related tools, and example thet can be useful for you to interact with Smart Contracts from your frontend is useInkathon
Typesafe React Hooks abstracting functionality by polkadot.js for
working with Substrate-based networks and ink! Smart Contracts.