The best open source alternative to ApowerMirror is scrcpy. If that doesn't suit you, our users have ranked more than 10 alternatives to ApowerMirror and four of them is open source so hopefully you can find a suitable replacement. Other interesting open source alternatives to ApowerMirror are MiracleCast (Free, Open Source), Desktop Mirror (Free, Open Source) and sndcpy (Free, Open Source).
The MiracleCast project provides software to connect external monitors to your system via Wi-Fi. It is compatible to the Wifi-Display specification also known as Miracast. MiracleCast implements the Display-Source as well as Display-Sink side.