Looking for recommendations for homebrew security system cameras - eviltoast

A friend of mine is helping me with setting up a Linux-based homebrew security system set up. He’s currently using Wyze cameras, but they are faulty and have ads on them, so I’d like to find something more open-source/closed system that I can control completely. Any recommendations or pointers in the right direction would be great.