How its-serah/explavision-hardware-component works
Project type and purpose
• This is a hybrid IoT-enabled full-stack application. It integrates an ESP8266 microcontroller (edge device) with a Node.js backend and AWS S3 cloud storage.
• Purpose: monitor motion via an IR sensor, trigger a webcam capture on the server, upload the image to S3, and notify the microcontroller.
File structure
• Top-level
– README.md: project overview and setup
– ServerCam/: Node.js server code
• index.js (server entrypoint)
• captures/: local folder for saved images
• package.json, package-lock.json, .gitignore
– microcontroller/: ESP8266 Arduino sketch (CircuitCode.ino)
• Key observations
– “ServerCam/index.js” implies an Express-based HTTP endpoint (likely /capture).
– “captures” directory: local persistence before S3 upload.
– Arduino sketch uses HTTPClient to call the server.
– AWS credentials and S3 interactions live in Node.js code (node-fetch or AWS SDK).
README for additional insights
• Node.js server uses express, fs, path, node-webcam, node-fetch.
• ESP8266 code includes ESP8266WiFi.h and ESP8266HTTPClient.h.
• Workflow: IR sensor → ESP8266 triggers HTTP → server takes webcam photo → save to local → upload to AWS S3 → respond to ESP8266.