How karan7jr/qr_shield works
QR Shield is a QR-content safety analyzer. Users scan or submit content, receive a risk assessment before choosing whether to open a URL, and can review saved scans and aggregate threat statistics. The backend classifies content, applies URL-risk checks, persists results, and serves history and statistics; the React app presents these workflows. Camera processing is documented as client-side, but the scanner implementation was not sampled, so its exact capture-to-submit wiring is uncertain. The graph uses README capabilities where source excerpts were unavailable.
Main entry points: index.js API client · App.jsx App routes · history_routes.py History and stats · app.py Flask app
Components 16
Web client
- App routes
frontend/src/App.jsx - QR scanner
frontend/src/pages/Scanner.jsx - Scan result
frontend/src/components/ScanResult.jsx - History view
frontend/src/pages/History.jsx - Analytics dashboard
frontend/src/pages/Dashboard.jsx - API client
frontend/src/api/index.js - Home page
frontend/src/pages/Home.jsx
Scan analysis
- Risk analyzer
backend/utils/risk_analyzer.py
Scan records
- Scan model
backend/models.py - DB configuration
backend/config.py - MySQL store
database/schema.sql
API service
- Scan endpoints
backend/routes/scan_routes.py - History and stats
backend/routes/history_routes.py - Flask app
backend/app.py
Other components
- User
- Browser
Connections 25
- User → App routes: uses
- App routes → Home page: routes
- App routes → QR scanner: routes
- App routes → Analytics dashboard: routes
- App routes → History view: routes
- User → QR scanner: scans QR
- QR scanner → API client: submits content
- API client → Scan endpoints: POST scan
- Flask app → Scan endpoints: registers routes
- Flask app → History and stats: registers routes
- Scan endpoints → Risk analyzer: analyzes content
- Scan endpoints → Scan model: creates scan
- Scan model → MySQL store: persists scan
- Flask app → DB configuration: loads config
- Flask app → Scan model: initializes ORM
- API client → Scan result: returns analysis
- User → Scan result: reviews result
- Scan result → Browser: opens on confirmation
- History view → API client: requests history
- API client → History and stats: GET or DELETE
- History and stats → Scan model: queries or deletes
- History and stats → MySQL store: reads statistics
- Analytics dashboard → API client: requests stats
- API client → History and stats: GET stats
- User → Browser: grants camera access