Normal DEX web3 pattern to use in project

guys is there any we3 pattern to use in DEX project fronend ? i want make swap with web3 . i am using uniswapv2router02 contract.

Thanks