Digital twin with node red

Hi all, I am currently researching digital twins.
I would like to know how we can make a digital twin with node red and docker. without the need to use the cloud only in my Raspberry.
Any tutorials or links would be very helpful.
thank you in advance

A digital twin of what?

a digital twin of a simple installation: temperature sensor, LEDs and a small motor acting as a fan.
all connected to the raspberry.
my goal is much more to know how to make a digital twin even if it's just a data capture from a sensor.

Watch this playlist to understand how node-red works and get some inspiration along the way. If that didnt help, go through the documentation.