This is the basic flow:
Detect motion (Use Johnny-Five IR.Motion obj)
Take photos (Raspistill, command line tool)
Cat facial detection (KittyDar)
Store the photos in cloud storage (Cloudinary)
Publish the data (URL) to PubNub for realtime streaming
Stream on web (subscribe the data from PubNub)