Doofinder using Phoenix Liveview in PHP Ecommerce Page?

Hi,

we use Phoenix Liveview for some backend tasks related to the ecommerce system Shopware (written in PHP and Twig templates).
Some Shopware stores use a plugin from Doofinder (which is a search engine in the cloud with Elasticsearch) for the search.
Now we have accidentally seen that they seem to use Phoenix Liveview for the search plugin or are we mistaken?
At least a websocket is opened when you type something into the search bar and the usual phx-join, phx-reply messages can be seen in the Inspector.
Now we wonder how they did it without an iframe?
Does anyone have an idea?

An example page is the one here (it’s in german, sorry):

https://www.schulrucksack.de/

We have heard of https://github.com/launchscout/live_state , but it doesn’t seem to be made with that or does it?

Thanks :slight_smile:

Looks like Doorfinder has some custom client that they have around phoenix LiveView as part of the Livelayer.

See:
https://cdn.doofinder.com/livelayer/1/js/dflayer.js?vsn=1.4.181

In terms of architecture - you can create a websocket connection with any domain/server. No need for an iframe.

Thank’s for your answer, yes, i’ve seen the dflayer.js and know about the websocket connection.
But there is a 2 div’s, one for the search input and another at the end of the body, which seem’s to be for the liveview.
I didn’t think you could just put a div in a completely different page that is triggered by Liveview with the usual diff’s.
Thought this always required an iframe or something like live_state, live_template…
It’s not quite clear to me yet.

Best regards, Werner.

I did an interview for them and I can confirm that they are using liveview and also they are using elixir for real time analytics/reporting.

2 Likes

Hi,
that’s great :smiley:
Unfortunately, I’m still not quite sure how they programmed it, I’ll have to think about it again. :thinking:

If I had to guess they’re using something like live state. It’s useful for providing third party services backed by live view.

Edit: I meant to link to live data. I always get live data and live state confused.

Yes, of course that could be the case.