# logesh760/ai_finanical_scame-detection-1- architecture

> Architecture diagram of the GitHub repository logesh760/ai_finanical_scame-detection-1-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/logesh760/ai_finanical_scame-detection-1-
- Repository: https://github.com/logesh760/ai_finanical_scame-detection-1-

## Overview

FinGuard is a full-stack scam-monitoring prototype: users review a unified risk dashboard, then inspect transactions, UPI activity, AutoPay mandates, messages, alerts, risk analysis and scam history, with chatbot support. The React client loads dashboard data through a fetch-with-local-mock-fallback service; the Express server serves mock-backed API responses. The README documents these capability areas, while sampled frontend wiring directly confirms initial dashboard loading and navigation. Backend excerpts are partial, so detailed AI analysis and chatbot dispatch paths are not inferred; the GenAI dependency is shown only as an optional integration.

Main entry points: [`frontend/src/App.tsx`](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/App.tsx) (App coordinator), [`frontend/src/services/mockApiService.ts`](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/services/mockApiService.ts) (API fallback client), [`backend/server.js`](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/backend/server.js) (Express API), [`frontend/src/components/layout/Sidebar.tsx`](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/layout/Sidebar.tsx) (Section navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Dashboard client"]
  node_app["App coordinator<br/>[App.tsx]"]
  node_sidebar["Section navigation<br/>[Sidebar.tsx]"]
  node_dashboard["Overview dashboard<br/>[DashboardShell.tsx]"]
end

subgraph group_monitoring["Risk monitoring"]
  node_transactions["Transaction review"]
  node_upi["UPI activity<br/>[UPIActivityTab.tsx]"]
  node_autopay["AutoPay mandates<br/>[AutoPayTab.tsx]"]
  node_messages["Message monitoring<br/>[MessagesTab.tsx]"]
  node_alerts["Scam alerts<br/>[ScamAlertsTab.tsx]"]
  node_risk_analysis["AI risk analysis"]
  node_history["Scam history<br/>[ScamHistoryTab.tsx]"]
end

subgraph group_backend["API and data"]
  node_api_client["API fallback client<br/>[mockApiService.ts]"]
  node_local_data["Local mock data<br/>[mockData.ts]"]
  node_api_server["Express API<br/>[server.js]"]
end

subgraph group_support["AI support"]
  node_chatbot["Security chatbot<br/>[ChatbotTab.tsx]"]
end

node_user(("Financial user"))
node_genai{{"Google GenAI"}}

node_user -->|"uses dashboard"| node_app
node_app -->|"loads overview data"| node_api_client
node_app -->|"renders navigation"| node_sidebar
node_sidebar -->|"selects section"| node_app
node_app -->|"renders overview"| node_dashboard
node_api_client -->|"fetches API data"| node_api_server
node_api_client -->|"falls back to"| node_local_data
node_api_server -->|"returns endpoint data"| node_api_client
node_app -->|"renders section"| node_transactions
node_app -->|"renders section"| node_upi
node_app -->|"renders section"| node_autopay
node_app -->|"renders section"| node_messages
node_app -->|"renders section"| node_alerts
node_app -->|"renders section"| node_risk_analysis
node_app -->|"renders section"| node_history
node_app -->|"renders section"| node_chatbot
node_api_server -.->|"uses AI integration"| node_genai

click node_app "https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/App.tsx"
click node_sidebar "https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/layout/Sidebar.tsx"
click node_dashboard "https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/DashboardShell.tsx"
click node_api_client "https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/services/mockApiService.ts"
click node_local_data "https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/data/mockData.ts"
click node_api_server "https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/backend/server.js"
click node_transactions "https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/TransactionsTab.tsx"
click node_upi "https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/UPIActivityTab.tsx"
click node_autopay "https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/AutoPayTab.tsx"
click node_messages "https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/MessagesTab.tsx"
click node_alerts "https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/ScamAlertsTab.tsx"
click node_risk_analysis "https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/AIRiskAnalysisTab.tsx"
click node_history "https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/ScamHistoryTab.tsx"
click node_chatbot "https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/ChatbotTab.tsx"

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_app,node_sidebar,node_dashboard,node_user toneBlue
class node_transactions,node_upi,node_autopay,node_messages,node_alerts,node_risk_analysis,node_history toneAmber
class node_api_client,node_local_data,node_api_server toneMint
class node_chatbot toneRose
class node_genai toneIndigo
```

## Components

### Dashboard client

- [App coordinator](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Section navigation](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/layout/Sidebar.tsx): `frontend/src/components/layout/Sidebar.tsx`
- [Overview dashboard](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/DashboardShell.tsx): `frontend/src/components/dashboard/DashboardShell.tsx`

### Risk monitoring

- [Transaction review](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/TransactionsTab.tsx): `frontend/src/components/dashboard/TransactionsTab.tsx`
- [UPI activity](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/UPIActivityTab.tsx): `frontend/src/components/dashboard/UPIActivityTab.tsx`
- [AutoPay mandates](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/AutoPayTab.tsx): `frontend/src/components/dashboard/AutoPayTab.tsx`
- [Message monitoring](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/MessagesTab.tsx): `frontend/src/components/dashboard/MessagesTab.tsx`
- [Scam alerts](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/ScamAlertsTab.tsx): `frontend/src/components/dashboard/ScamAlertsTab.tsx`
- [AI risk analysis](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/AIRiskAnalysisTab.tsx): `frontend/src/components/dashboard/AIRiskAnalysisTab.tsx`
- [Scam history](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/ScamHistoryTab.tsx): `frontend/src/components/dashboard/ScamHistoryTab.tsx`

### API and data

- [API fallback client](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/services/mockApiService.ts): `frontend/src/services/mockApiService.ts`
- [Local mock data](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/data/mockData.ts): `frontend/src/data/mockData.ts`
- [Express API](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/backend/server.js): `backend/server.js`

### AI support

- [Security chatbot](https://github.com/logesh760/ai_finanical_scame-detection-1-/blob/main/frontend/src/components/dashboard/ChatbotTab.tsx): `frontend/src/components/dashboard/ChatbotTab.tsx`

### Other components

- **Financial user**
- **Google GenAI**

## Connections

- Financial user → App coordinator: uses dashboard
- App coordinator → API fallback client: loads overview data
- App coordinator → Section navigation: renders navigation
- Section navigation → App coordinator: selects section
- App coordinator → Overview dashboard: renders overview
- API fallback client → Express API: fetches API data
- API fallback client → Local mock data: falls back to
- Express API → API fallback client: returns endpoint data
- App coordinator → Transaction review: renders section
- App coordinator → UPI activity: renders section
- App coordinator → AutoPay mandates: renders section
- App coordinator → Message monitoring: renders section
- App coordinator → Scam alerts: renders section
- App coordinator → AI risk analysis: renders section
- App coordinator → Scam history: renders section
- App coordinator → Security chatbot: renders section
- Express API → Google GenAI: uses AI integration
