How krithikshyaam/cyberastryx works
Cyberastryx trains and serves a locally run spam classifier, with Gmail automation plus a website and Chrome extension for scanning and verdicts. The main workflow is incoming mail through n8n to the API and model, then a spam decision; users can also analyze mail or scan an inbox in the website. Separate branches cover account administration, feedback and retraining, model training, monitoring, and optional link/image checks. The README documents integrations not present in this file tree; edges to those services reflect that documentation, not inspected workflow source.
Main entry points: api_server.py REST API · App.tsx Website · api.ts Web API client · trainer.py Model trainer
Components 28
Mail automation
- n8n workflow
Detection service
- REST API
spam_detection/api_server.py - Spam predictor
spam_detection/src/predict.py - Link/image checks
spam_detection/link_image_checker.py - Accounts and auth
spam_detection/auth.py - API keys
spam_detection/key_store.py - Account database
- Usage monitoring
spam_detection/monitoring.py
Model lifecycle
- Feedback and retraining
spam_detection/feedback_loop.py - Dataset pipeline
spam_detection/dataset_pipeline.py - Data loading
spam_detection/src/data_loader.py - Model trainer
spam_detection/src/trainer.py - BiLSTM and BERT
spam_detection/src/models/baseline_model.py - Model configuration
spam_detection/src/config.py
Web application
- Website
web/src/App.tsx - Sign-in screens
web/src/components/auth/AuthPage.tsx - User dashboard
web/src/components/user/UserDashboard.tsx - Admin dashboard
web/src/components/admin/AdminDashboard.tsx - Web API client
web/src/lib/api.ts - Verdict rules
web/src/lib/verdict.ts - Account state
web/src/lib/account.ts - Client settings
web/src/lib/settings.ts - Scan history
web/src/lib/history.ts
Browser extension
- Chrome extension
extension/content.js
Other components
- Gmail
- Website user
- Administrator
- Extension user
Connections 34
- Gmail → n8n workflow: triggers on mail
README.md - n8n workflow → Gmail: labels and archives
README.md - n8n workflow → REST API: requests scoring
README.md - Website → n8n workflow: scans inbox
README.md - Website → REST API: uses API
README.md - Chrome extension → REST API: requests verdicts
README.md - REST API → Spam predictor: runs inference
spam_detection/api_server.py - REST API → Link/image checks: uses checks
spam_detection/api_server.py - REST API → Accounts and auth: routes auth
spam_detection/api_server.py - REST API → API keys: uses keys
spam_detection/api_server.py - REST API → Feedback and retraining: records feedback
spam_detection/api_server.py - REST API → Usage monitoring: records usage
spam_detection/api_server.py - Accounts and auth → Account database: reads and writes
spam_detection/auth.py - Feedback and retraining → Data loading: loads training data
spam_detection/feedback_loop.py - Feedback and retraining → Model trainer: starts retraining
spam_detection/feedback_loop.py - Dataset pipeline → Data loading: prepares data
- Model trainer → Data loading: loads data
spam_detection/src/trainer.py - Model trainer → BiLSTM and BERT: builds classifiers
spam_detection/src/trainer.py - Model trainer → Model configuration: uses settings
spam_detection/src/trainer.py - Spam predictor → BiLSTM and BERT: loads BiLSTM
spam_detection/src/predict.py - Spam predictor → Model configuration: uses model paths
spam_detection/src/predict.py - Website user → Website: uses
README.md - Administrator → Website: administers
README.md - Extension user → Chrome extension: configures and views
README.md - Website → Sign-in screens: renders
web/src/App.tsx - Website → User dashboard: renders
web/src/App.tsx - Website → Admin dashboard: renders
web/src/App.tsx - Sign-in screens → Web API client: calls auth API
web/src/components/auth/AuthPage.tsx - User dashboard → Web API client: requests scans
web/src/components/user/UserDashboard.tsx - Admin dashboard → Web API client: loads admin data
web/src/components/admin/AdminDashboard.tsx - Web API client → Account state: uses session
web/src/lib/api.ts - Web API client → Client settings: reads settings
web/src/lib/api.ts - User dashboard → Scan history: stores scan history
web/src/components/user/UserDashboard.tsx - User dashboard → Verdict rules: interprets results
web/src/components/user/UserDashboard.tsx