How Do I integrate React App Bridge Customization in Rails

Hi – hoping you can help me with this.

I have created and tested and pushed to one of my development stores a discount function. This was NOT created with the Remix template, but it is active on my store and has metafields. I want to use Rails and React to create the App Bridge UI. I don’t want to just use the Remix one page app for reasons below.

I have a server set up, with NGINX as reverse proxy, Certbot for certs, a fully qualified domain name etc.

I have installed the Shopify Rails app from:

https://github.com/Shopify/shopify-app-template-ruby

It is live on my server:

How do I and where do I plug in the React code:

Are there any steps I need to do to generate the template on the server? Or any other way to generate this code?

Do I use the api key from my shopify function app .env file? Do I need to port/copy my Shopify function code from my laptop as it is on the Shopify CDN or not? Do I need to restart generating the code from the server somehow with a ruby template instead of Remix ?

[Why I don’t want to use Remix: A. I know how and its easy to set up NGINX as reverse proxy for Rails; B. Its easy to use Rails with our existing Postgresql AWS databases in production which is a must; C. setting up the app installation part for Rails is easy and well documented; D. Moving Rails from local development machine to production is easy and very well documented.]

Please let me know if there is any way to do this, I would like to stay on the main Rails infrastructure if at all possible. Thanks!