The maker movement is fascinated with video surveillance cameras.
Recently this full set of build instructions for a PoE powered network board camera was published to a Raspberri Pi hobbyist site. Here's a short video overview:
I added up the cost of components and I think the BOM can be purchased or scrounged together for about $90.
One of the most interesting aspects here is that unlike the 'real' surveillance camera market almost no attention is paid to camera video quality, and everything is about component selection, assembly/ build quality and enclosure design:
The camera is a stock 8MP board (only 1080p @ 30fps), the PoE adapter is scratch built, and there is room for an SSD inside the enclosure. There is also a giant heat sink for some reason. But the cable gland is IP66 rated.
I've not seen video quality from a finished unit, but supposedly there is an ONVIF driver for this in the works.
Overall, fairly sophisticated for a DIY tinker project!