Smart Surveillance System

I want to create a smart surveillance system using Raspberry pi 4, Hp webcam and MIT App Inventor. It should simply get the live camera feed from Hp and process it on pi and send the live feed on MIT app. If any anomaly occurs, any fight or weapon, any murder/robbery is detected, it should detect it and send the notification on app, and also send an email. It should also store the records of one week. For that I've created the app, but I don't know how to do the detection code on pi, and connect live feed to MIT app. It will be really very helpful if someone gives any solution!

What have you tried so far? What works, what doesn't work?
No-one can build you an app without all the additional hardware - rpi / webcam...

I've created app, also did the live-streaming on the app through Python-Motion framework from rpi, it did work. I wanted to know how the YOLO be used with Motion, so that I can also live stream and at the same time the anomalies would be detected.