Wow this is cool! I’m not the most knowledgeable person to answer this (@cristi or @dimitrie, please correct me if I’m wrong) but here it goes:
The preview service is run as a separate module from the server. You can get the preview image for any stream like this one https://speckle.xyz/streams/81d2f2c135
using the /preview/STREAM_ID
url:
https://speckle.xyz/preview/81d2f2c135
I’m fairly certain the route structure is the same as for the stream url
. So just replacing streams
for preview
should do the trick to get the image. See a specific branch preview:
https://speckle.xyz/preview/81d2f2c135/branches/info
As for how this actually works, as far as I’m aware it is configured through Nginx, which sends all /preview
request to the server.
Then the server interacts with the preview module to return your image:
And that’s as far as my knowledge can take you Looking forward to a demo of that cool app!