How pandeysidhartha/child-safety works
Guardian accepts text, images, and location pings through a Flask API, moderates content, records scan events, and alerts guardians when severity warrants it. A feed simulator exercises the same moderation flow; the React dashboard submits scans and simulations, polls for status and history, and presents alerts for review. Text and image moderation, geofencing, alert delivery, and persistent storage are distinct product stages. The README documents geofencing and Twilio/SMTP integrations; their route-level implementation is not fully shown in the excerpts.
Main entry points: App.jsx Dashboard shell · app.py Flask API · alert_manager.py Alert manager · db.py SQLite database
Components 20
Inputs & Dashboard
- Dashboard shell
frontend/src/App.jsx - API client
frontend/src/api/client.js - Scan console
frontend/src/components/ScanConsole.jsx - Simulator panel
frontend/src/components/SimulatorPanel.jsx - Status banner
frontend/src/components/StatusBanner.jsx - Stats row
frontend/src/components/StatsRow.jsx - Activity pulse
frontend/src/components/ActivityPulse.jsx - Alert feed
frontend/src/components/AlertFeed.jsx - Events log
frontend/src/components/EventsLog.jsx
API & Moderation
- Flask API
backend/app.py - Text moderation
backend/moderation/text_moderator.py - Image moderation
backend/moderation/image_moderator.py - Feed simulator
backend/simulator/feed_simulator.py
Alerts & Geofencing
- Alert manager
backend/alerts/alert_manager.py - Twilio SMS
- SMTP email
- Geofencing
backend/app.py
Persistence
- SQLite database
backend/storage/db.py
Other components
- Connected content source
- Guardian
Connections 25
- Dashboard shell → API client: calls
frontend/src/App.jsx - Dashboard shell → Status banner: renders
frontend/src/App.jsx - Dashboard shell → Stats row: renders
frontend/src/App.jsx - Dashboard shell → Activity pulse: renders
frontend/src/App.jsx - Dashboard shell → Alert feed: renders
frontend/src/App.jsx - Dashboard shell → Scan console: renders
frontend/src/App.jsx - Dashboard shell → Simulator panel: renders
frontend/src/App.jsx - Dashboard shell → Events log: renders
frontend/src/App.jsx - Scan console → Dashboard shell: submits scan
frontend/src/App.jsx - Simulator panel → Dashboard shell: submits run
frontend/src/App.jsx - Alert feed → Dashboard shell: requests review
frontend/src/App.jsx - API client → Flask API: HTTP requests
README.md - Connected content source → Flask API: sends content
README.md - Flask API → Text moderation: analyzes text
backend/app.py - Flask API → Image moderation: analyzes images
backend/app.py - Flask API → Feed simulator: generates sample feed
backend/app.py - Flask API → SQLite database: records and queries
backend/app.py - Flask API → Alert manager: triggers alerts
backend/app.py - Alert manager → SQLite database: reads child; stores alert
backend/alerts/alert_manager.py - Alert manager → Twilio SMS: sends SMS
backend/alerts/alert_manager.py - Alert manager → SMTP email: sends email
backend/alerts/alert_manager.py - Flask API → Geofencing: handles location ping
README.md - Geofencing → SQLite database: checks and stores location
backend/app.py - Geofencing → Alert manager: alerts on exit
backend/app.py - Guardian → Alert manager: receives notification
README.md