Front end
The front end displays the button that the customer clicks to start the ComPilot Widget.
There are three stages to developing the front-end integration.
- Create a session function that uses the back-end endpoint (see step 3 of the back-end integration).
- Initialize the ComPilot widget using a configuration object.
- Use the hooks provided by the SDKa to interact with the ComPilot Widget.
The @compilot/react-sdk
and @compilot/web-sdk
SDKs help with this integration.
📄️ Step by step with React or Next.js
1. Install @compilot/react-sdk.
📄️ Step by step with other JavaScript-based applications
1. install @compilot/web-sdk and @compilot/web-sdk-wallet-wagmi.