# zeph2004/sms-based-fraud-detection- architecture

> Architecture diagram of the GitHub repository zeph2004/sms-based-fraud-detection-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zeph2004/sms-based-fraud-detection-
- Repository: https://github.com/zeph2004/sms-based-fraud-detection-

## Overview

Argus combines a Flutter SMS-safety app, a Spring Boot fraud-detection API, and a React admin portal. The admin flow is login, email OTP verification, then authenticated dashboard use for SMS audit review and user administration. The backend also exposes SMS scanning, fraud alerts, feedback, and administration; the mobile app includes SMS ingestion and detection services. Backend and mobile links beyond the README-described system boundaries are dashed where implementation excerpts were unavailable.

Main entry points: [`web-client/src/App.tsx`](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/App.tsx) (Portal navigation), [`backend/src/main/java/com/example/smsfraud/scan/ScanController.java`](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/scan/ScanController.java) (SMS scanning), [`web-client/src/pages/VerificationPage.tsx`](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/pages/VerificationPage.tsx) (OTP verification), [`backend/src/main/java/com/example/smsfraud/admin/AdminController.java`](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/admin/AdminController.java) (Admin operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Admin portal"]
  node_web_entry["Portal entry<br/>[main.tsx]"]
  node_web_app["Portal navigation<br/>[App.tsx]"]
  node_login["Admin login<br/>[LoginPage.tsx]"]
  node_verify["OTP verification"]
  node_dashboard["Admin dashboard<br/>[DashboardPage.tsx]"]
  node_auth_client["Auth API client<br/>[authService.ts]"]
  node_admin_client["Admin API client<br/>[adminService.ts]"]
end

subgraph group_mobile["Mobile app"]
  node_mobile_ui["Mobile app<br/>[main.dart]"]
  node_sms_ingest["SMS ingestion"]
  node_sms_detect["SMS detection"]
  node_sms_worker["Background SMS worker<br/>[SmsScanWorker.kt]"]
end

subgraph group_api["Fraud API"]
  node_backend_api["Spring API"]
  node_auth_api["Authentication"]
  node_scan_api["SMS scanning"]
  node_alerts["Fraud alerts"]
  node_feedback["Fraud feedback"]
  node_admin_api["Admin operations"]
  node_ml_client["ML detection client"]
end

subgraph group_state["Persistence and integrations"]
  node_scan_store[("Scan records")]
  node_user_store[("User records")]
  node_fraud_store[("Feedback records")]
  node_postgres[("PostgreSQL")]
end

node_admin_user(("Admin"))
node_ml_service["ML service"]

node_admin_user -->|"opens"| node_web_entry
node_web_entry -->|"renders"| node_web_app
node_web_app -->|"shows"| node_login
node_web_app -->|"shows"| node_verify
node_web_app -->|"shows"| node_dashboard
node_login -->|"requests login"| node_auth_client
node_verify -->|"verifies OTP"| node_auth_client
node_auth_client -->|"HTTP requests"| node_auth_api
node_verify -->|"continues on success"| node_dashboard
node_dashboard -->|"loads and updates"| node_admin_client
node_admin_client -->|"HTTP requests"| node_admin_api
node_admin_user -->|"uses"| node_mobile_ui
node_mobile_ui -.->|"uses"| node_sms_ingest
node_sms_ingest -.->|"submits messages"| node_sms_detect
node_sms_worker -.->|"supports background scans"| node_sms_ingest
node_sms_detect -.->|"requests classification"| node_scan_api
node_backend_api -.->|"exposes"| node_scan_api
node_scan_api -.->|"requests detection"| node_ml_client
node_ml_client -.->|"calls"| node_ml_service
node_scan_api -.->|"persists scans"| node_scan_store
node_admin_api -.->|"reads scan data"| node_scan_store
node_admin_api -.->|"manages users"| node_user_store
node_feedback -.->|"persists feedback"| node_fraud_store
node_scan_store -->|"stored in"| node_postgres
node_user_store -->|"stored in"| node_postgres
node_fraud_store -->|"stored in"| node_postgres

click node_web_entry "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/main.tsx"
click node_web_app "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/App.tsx"
click node_login "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/pages/LoginPage.tsx"
click node_verify "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/pages/VerificationPage.tsx"
click node_dashboard "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/pages/DashboardPage.tsx"
click node_auth_client "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/services/authService.ts"
click node_admin_client "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/services/adminService.ts"
click node_mobile_ui "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/frontend/lib/main.dart"
click node_sms_ingest "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/frontend/lib/services/sms_ingestion_service.dart"
click node_sms_detect "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/frontend/lib/services/sms_detection_service.dart"
click node_sms_worker "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/frontend/android/app/src/main/kotlin/com/example/secure_signal/SmsScanWorker.kt"
click node_backend_api "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/SmsfraudApplication.java"
click node_auth_api "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/auth/AuthController.java"
click node_scan_api "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/scan/ScanController.java"
click node_alerts "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/scan/FraudAlertController.java"
click node_feedback "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/feedback/FraudRecordController.java"
click node_admin_api "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/admin/AdminController.java"
click node_ml_client "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/ml/MlFraudDetectionClient.java"
click node_scan_store "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/scan/SmsScanRepository.java"
click node_user_store "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/user/UserRepository.java"
click node_fraud_store "https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/feedback/FraudRecordRepository.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web_entry,node_web_app,node_login,node_verify,node_dashboard,node_auth_client,node_admin_client toneBlue
class node_mobile_ui,node_sms_ingest,node_sms_detect,node_sms_worker toneAmber
class node_backend_api,node_auth_api,node_scan_api,node_alerts,node_feedback,node_admin_api,node_ml_client toneMint
class node_scan_store,node_user_store,node_fraud_store,node_postgres toneRose
class node_admin_user,node_ml_service toneIndigo
```

## Components

### Admin portal

- [Portal entry](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/main.tsx): `web-client/src/main.tsx`
- [Portal navigation](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/App.tsx): `web-client/src/App.tsx`
- [Admin login](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/pages/LoginPage.tsx): `web-client/src/pages/LoginPage.tsx`
- [OTP verification](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/pages/VerificationPage.tsx): `web-client/src/pages/VerificationPage.tsx`
- [Admin dashboard](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/pages/DashboardPage.tsx): `web-client/src/pages/DashboardPage.tsx`
- [Auth API client](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/services/authService.ts): `web-client/src/services/authService.ts`
- [Admin API client](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/web-client/src/services/adminService.ts): `web-client/src/services/adminService.ts`

### Mobile app

- [Mobile app](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/frontend/lib/main.dart): `frontend/lib/main.dart`
- [SMS ingestion](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/frontend/lib/services/sms_ingestion_service.dart): `frontend/lib/services/sms_ingestion_service.dart`
- [SMS detection](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/frontend/lib/services/sms_detection_service.dart): `frontend/lib/services/sms_detection_service.dart`
- [Background SMS worker](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/frontend/android/app/src/main/kotlin/com/example/secure_signal/SmsScanWorker.kt): `frontend/android/app/src/main/kotlin/com/example/secure_signal/SmsScanWorker.kt`

### Fraud API

- [Spring API](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/SmsfraudApplication.java): `backend/src/main/java/com/example/smsfraud/SmsfraudApplication.java`
- [Authentication](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/auth/AuthController.java): `backend/src/main/java/com/example/smsfraud/auth/AuthController.java`
- [SMS scanning](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/scan/ScanController.java): `backend/src/main/java/com/example/smsfraud/scan/ScanController.java`
- [Fraud alerts](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/scan/FraudAlertController.java): `backend/src/main/java/com/example/smsfraud/scan/FraudAlertController.java`
- [Fraud feedback](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/feedback/FraudRecordController.java): `backend/src/main/java/com/example/smsfraud/feedback/FraudRecordController.java`
- [Admin operations](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/admin/AdminController.java): `backend/src/main/java/com/example/smsfraud/admin/AdminController.java`
- [ML detection client](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/ml/MlFraudDetectionClient.java): `backend/src/main/java/com/example/smsfraud/ml/MlFraudDetectionClient.java`

### Persistence and integrations

- [Scan records](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/scan/SmsScanRepository.java): `backend/src/main/java/com/example/smsfraud/scan/SmsScanRepository.java`
- [User records](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/user/UserRepository.java): `backend/src/main/java/com/example/smsfraud/user/UserRepository.java`
- [Feedback records](https://github.com/zeph2004/sms-based-fraud-detection-/blob/main/backend/src/main/java/com/example/smsfraud/feedback/FraudRecordRepository.java): `backend/src/main/java/com/example/smsfraud/feedback/FraudRecordRepository.java`
- **PostgreSQL**

### Other components

- **Admin**
- **ML service**

## Connections

- Admin → Portal entry: opens (evidence: `README.md`)
- Portal entry → Portal navigation: renders (evidence: `web-client/src/main.tsx`)
- Portal navigation → Admin login: shows (evidence: `web-client/src/App.tsx`)
- Portal navigation → OTP verification: shows (evidence: `web-client/src/App.tsx`)
- Portal navigation → Admin dashboard: shows (evidence: `web-client/src/App.tsx`)
- Admin login → Auth API client: requests login (evidence: `web-client/src/pages/LoginPage.tsx`)
- OTP verification → Auth API client: verifies OTP (evidence: `web-client/src/pages/VerificationPage.tsx`)
- Auth API client → Authentication: HTTP requests (evidence: `web-client/src/services/authService.ts`)
- OTP verification → Admin dashboard: continues on success (evidence: `web-client/src/App.tsx`)
- Admin dashboard → Admin API client: loads and updates (evidence: `web-client/src/pages/DashboardPage.tsx`)
- Admin API client → Admin operations: HTTP requests (evidence: `web-client/src/services/adminService.ts`)
- Admin → Mobile app: uses (evidence: `README.md`)
- Mobile app → SMS ingestion: uses
- SMS ingestion → SMS detection: submits messages
- Background SMS worker → SMS ingestion: supports background scans
- SMS detection → SMS scanning: requests classification
- Spring API → SMS scanning: exposes
- SMS scanning → ML detection client: requests detection
- ML detection client → ML service: calls
- SMS scanning → Scan records: persists scans
- Admin operations → Scan records: reads scan data
- Admin operations → User records: manages users
- Fraud feedback → Feedback records: persists feedback
- Scan records → PostgreSQL: stored in (evidence: `README.md`)
- User records → PostgreSQL: stored in (evidence: `README.md`)
- Feedback records → PostgreSQL: stored in (evidence: `README.md`)
