How varunkonka2673/final-year-project works
SocialGuard is a web dashboard and FastAPI service for detecting fraudulent accounts and coordinated bot networks. Users authenticate, submit a profile for scoring or upload a CSV, then explore risk results, model evaluations, clusters, live simulated detections, dataset tools, and scan history. The backend orchestrates feature extraction, classification, and anomaly analysis; the dashboard also supports admin access, feedback, and research-report export. The graph follows documented features and shown references; unsampled implementation details are omitted where relationships cannot be verified.
Main entry points: app.py FastAPI service · App.jsx Dashboard shell · pipeline.py ML orchestrator · historyService.js History service
Components 28
Dashboard
- Dashboard shell
frontend/src/App.jsx - Sign-in portal
frontend/src/components/AuthPortal.jsx - Profile scanner
frontend/src/components/SingleScanner.jsx - Batch audit
frontend/src/components/BatchScanner.jsx - Model arena
frontend/src/components/ModelArena.jsx - Bot clusters
frontend/src/components/BotClusterVisualizer.jsx - Sentinel stream
frontend/src/components/LiveSentinelStream.jsx - Dataset explorer
frontend/src/components/DatasetExplorer.jsx - Scan history
frontend/src/components/HistoryViewer.jsx - Research report
frontend/src/components/IEEEPaperViewer.jsx
API and persistence
- FastAPI service
backend/api/app.py - Request schemas
backend/api/schemas.py - API database
backend/api/db.py
Detection engine
- ML orchestrator
backend/ml/pipeline.py - Profile features
backend/ml/preprocessor.py - Profile extraction
backend/ml/profile_extractor.py - LinkedIn extraction
backend/ml/linkedin_extractor.py - Text features
backend/ml/nlp_engine.py - Model suite
backend/ml/models.py - SMOTE balancing
backend/ml/imbalance_handler.py - Anomaly and rings
backend/ml/anomaly_engine.py - Dataset generator
backend/ml/dataset_generator.py - Data collector
backend/ml/data_collector.py
Identity and history
- Auth state
frontend/src/context/AuthContext.jsx - Firebase client
frontend/src/firebase.js - History service
frontend/src/services/historyService.js - Firestore
Other components
- Dashboard user
Connections 41
- Dashboard user → Dashboard shell: uses
README.md - Dashboard shell → Sign-in portal: shows
frontend/src/App.jsx - Dashboard shell → Profile scanner: routes to
frontend/src/App.jsx - Dashboard shell → Batch audit: routes to
frontend/src/App.jsx - Dashboard shell → Model arena: routes to
frontend/src/App.jsx - Dashboard shell → Bot clusters: routes to
frontend/src/App.jsx - Dashboard shell → Sentinel stream: routes to
frontend/src/App.jsx - Dashboard shell → Dataset explorer: routes to
frontend/src/App.jsx - Dashboard shell → Scan history: routes to
frontend/src/App.jsx - Dashboard shell → Research report: routes to
README.md - Dashboard shell → Auth state: provides auth
frontend/src/App.jsx - Sign-in portal → Auth state: calls auth
frontend/src/components/AuthPortal.jsx - Auth state → Firebase client: uses auth
frontend/src/context/AuthContext.jsx - Auth state → FastAPI service: checks admins
frontend/src/context/AuthContext.jsx - Profile scanner → FastAPI service: requests scoring
README.md - Profile scanner → History service: saves scans
frontend/src/components/SingleScanner.jsx - Batch audit → FastAPI service: submits CSV
README.md - Model arena → FastAPI service: loads metrics
README.md - Bot clusters → FastAPI service: loads clusters
README.md - Sentinel stream → FastAPI service: requests ticks
README.md - Dataset explorer → FastAPI service: uses dataset tools
README.md - Research report → FastAPI service: exports report
README.md - Scan history → History service: loads history
frontend/src/components/HistoryViewer.jsx - History service → Firebase client: uses Firestore SDK
frontend/src/services/historyService.js - History service → Firestore: reads and writes
frontend/src/services/historyService.js - History service → FastAPI service: submits feedback
frontend/src/services/historyService.js - FastAPI service → ML orchestrator: scores accounts
backend/api/app.py - FastAPI service → Request schemas: validates requests
backend/api/app.py - FastAPI service → API database: uses persistence
backend/api/app.py - FastAPI service → Dataset generator: generates retraining data
backend/api/app.py - FastAPI service → Profile extraction: uses extraction
backend/api/app.py - FastAPI service → Profile features: aligns features
backend/api/app.py - FastAPI service → Data collector: uses collection
backend/api/app.py - ML orchestrator → Profile features: preprocesses
backend/ml/pipeline.py - ML orchestrator → Text features: extracts text features
backend/ml/pipeline.py - ML orchestrator → Model suite: runs classifiers
backend/ml/pipeline.py - ML orchestrator → SMOTE balancing: balances training
backend/ml/pipeline.py - ML orchestrator → Anomaly and rings: scores anomalies
backend/ml/pipeline.py - ML orchestrator → Dataset generator: generates data
backend/ml/pipeline.py - Profile extraction → LinkedIn extraction: delegates to
backend/ml/profile_extractor.py - Data collector → ML orchestrator: uses pipeline
backend/ml/data_collector.py