How wonjae1230/smart_study_monitor works
This is a study-focus monitoring system: a session is started through the server, which launches camera and environmental monitoring; sensor events update session records and can trigger push alerts. The server also exposes session, environment, camera-live, and session-history data, while a standalone ultrasonic script reports phone events. The UI source is present in the tree but was not sampled, so its interactions are not mapped. Relationships shown below are supported by the sampled server and sensor code; the ultrasonic script is not shown as server-managed.
Main entry points: app.js HTTP server and API · camera_detect.py Camera detection · service-worker.js Push service worker · environment.py Temperature sensor
Components 16
Web application
- Web interface
server/public/index.html - Push service worker
server/public/service-worker.js
Session and records
- HTTP server and API
server/app.js - Session lifecycle
server/app.js - Sensor event API
server/app.js - Environment API
server/app.js - Camera status API
server/app.js - Session history API
server/app.js - SQLite records
server/app.js
Sensor monitoring
- Camera detection
camera_detect.py - MJPEG stream
camera_detect.py - Temperature sensor
environment.py - Phone proximity sensor
ultrasonic.py
Push notifications
- Push delivery
server/app.js - Push service
Other components
- Study user
Connections 25
- Study user → Web interface: uses
- HTTP server and API → Web interface: serves
server/app.js - HTTP server and API → Session lifecycle: routes
server/app.js - HTTP server and API → Sensor event API: routes
server/app.js - HTTP server and API → Environment API: routes
server/app.js - HTTP server and API → Camera status API: routes
server/app.js - HTTP server and API → Session history API: routes
server/app.js - Session lifecycle → SQLite records: reads and writes
server/app.js - Sensor event API → SQLite records: updates
server/app.js - Environment API → SQLite records: stores readings
server/app.js - Session history API → SQLite records: reads sessions
server/app.js - Session lifecycle → Camera detection: starts and stops
server/app.js - Session lifecycle → Temperature sensor: starts and stops
server/app.js - Camera detection → HTTP server and API: checks session
camera_detect.py - Camera detection → Sensor event API: reports events
camera_detect.py - Camera detection → Camera status API: posts live status
camera_detect.py - Camera detection → MJPEG stream: updates frames
camera_detect.py - Temperature sensor → Environment API: posts readings
environment.py - Phone proximity sensor → Sensor event API: reports phone events
ultrasonic.py - Sensor event API → Push delivery: triggers alerts
server/app.js - Session lifecycle → Push delivery: triggers alerts
server/app.js - Push delivery → SQLite records: loads subscriptions
server/app.js - Push delivery → Push service: sends notifications
server/app.js - Push service → Push service worker: delivers push
- Push service worker → Study user: shows notification
server/public/service-worker.js