If you need to protect keys and implement backend logic, you'll need to set up a backend-for-frontend (BFF), such as a Node.js application. Alternatively, you can use Adobe App Builder, though keep in mind it may incur additional licensing costs.
If you're able to host an application—such as an AWS ...