Best practive for a custom Software Plugin

Hi everyone,

I am a developer currently working on a new Shopify Shop that will need a custom software plugin on the frontend. The software will be an assistant to help the user finding the right product for him based on a survey.

I wonder what is the best practice for realizing that. Can i just develop the app somewhere else and integrate it with that html-snippet and an iframe? Is there an API that would fit my needs?

I want to be able to show the user a result page with the product that fit him best and an option to put it in her cart.

Thanks in advance for advice

Best regards