How ngtanvan/ml_aiot-elderly-fall-detection-system works
An Toàn AI is a real-time fall and suspected-stroke monitoring system with a React dashboard, FastAPI backend, camera-based detection, alert history, and Telegram notifications. The documented primary workflow is camera video → fall classification and timed confirmation → incident evidence/history and Telegram alert → dashboard monitoring. Authentication, account recovery, and bot linking form a separate user-management branch. The sampled detector and application bootstrap support the timing and service boundaries; video, camera, notifier, bot-listener, and dashboard internals were not sampled, so their detailed wiring is not asserted.
Main entry points: auth.py Auth API · main.py FastAPI application · notifier.py Alert notifier · App.jsx App routes
Components 21
Monitoring and alerts
- Video API
fall-detection-system/backend/app/api/video.py - Camera service
fall-detection-system/backend/app/services/camera.py - Fall detector
fall-detection-system/backend/app/services/detector.py - Alert notifier
fall-detection-system/backend/app/services/notifier.py - Alert evidence
fall-detection-system/backend/alert_images - Socket manager
fall-detection-system/backend/app/core/socket_manager.py
Web application
- Alert history
fall-detection-system/frontend/src/pages/HistoryPage.jsx - Dashboard
fall-detection-system/frontend/src/pages/Dashboard.jsx - Live stream
fall-detection-system/frontend/src/components/VideoPlayer/LiveStream.jsx - Alert popup
fall-detection-system/frontend/src/components/Layout/AlertPopup.jsx - App routes
fall-detection-system/frontend/src/App.jsx - Auth client
fall-detection-system/frontend/src/services/authService.js - Sign-in and recovery
fall-detection-system/frontend/src/pages/LandingPage.jsx
Identity and persistence
- FastAPI application
fall-detection-system/backend/app/main.py - Auth API
fall-detection-system/backend/app/api/auth.py - Token and password security
fall-detection-system/backend/app/core/security.py - SQLite data
fall-detection-system/backend/app/core/database.py
Telegram integration
- Telegram bot listener
fall-detection-system/backend/bot_listener.py
Other components
- Caregiver
- Surveillance camera
- Telegram
Connections 24
- Caregiver → App routes: uses
- App routes → Sign-in and recovery: routes to
- App routes → Dashboard: routes to
- App routes → Alert history: routes to
- Sign-in and recovery → Auth client: calls
- Auth client → Auth API: requests
- FastAPI application → Auth API: registers
- FastAPI application → Video API: registers
- FastAPI application → Socket manager: mounts
- Auth API → SQLite data: reads and writes
- Auth API → Token and password security: verifies and hashes
- Surveillance camera → Camera service: provides video
- Video API → Camera service: uses
- Camera service → Fall detector: provides frames
- Fall detector → Alert notifier: triggers alert
- Alert notifier → Alert evidence: stores evidence
- Alert notifier → SQLite data: records alert
- Alert notifier → Telegram bot listener: dispatches alert
- Telegram bot listener → Telegram: sends alert
- Auth API → Telegram: sends recovery OTP
- Alert history → FastAPI application: requests history
- Live stream → FastAPI application: requests stream
- Alert popup → Socket manager: receives events
- Dashboard → Live stream: shows stream