Maybe even use an esp32 cam board instead of a whole raspberry pi:
https://randomnerdtutorials.com/esp32-cam-video-streaming-we...
https://www.thingiverse.com/thing:3996434