A full-stack ML-powered financial fraud detection application built with React + FastAPI.
internship.proj/
├── backend/
│ ├── main.py # FastAPI server + ML model
│ └── requirements.txt
└── frontend/
├── src/
│ ├── components/ # Sidebar, StatCard, TransactionRow
│ ├── pages/ # Dashboard, FraudAnalyzer, Transactions, Analytics, Alerts, Settings
│ ├── utils/api.js # Axios API calls
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
├── index.html
├── package.json
├── vite.config.js
└── tailwind.config.js
cd backend
pip install -r requirements.txt
uvicorn main:app --reload --port 8000Backend runs at: http://localhost:8000 API Docs at: http://localhost:8000/docs
cd frontend
npm install
npm run devFrontend runs at: http://localhost:3000
- Dashboard — Live overview with stats, charts, recent transactions
- Live Transaction Feed — Real-time stream with risk scores and filters
- Fraud Analyzer — Submit any transaction for instant ML risk scoring
- Analytics — Model performance metrics, confusion matrix, charts
- Alert Center — Security alerts with severity levels and resolution
- Settings — Configure detection thresholds, model, and notifications
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, Tailwind CSS, Recharts, Framer Motion |
| Backend | FastAPI, Python |
| ML | scikit-learn, RandomForest, SMOTE, XGBoost |
| API | REST (Axios) |
| Deploy | Docker-ready |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/analytics/overview | System overview stats |
| GET | /api/metrics | ML model metrics |
| GET | /api/transactions/stream | Live transactions |
| GET | /api/analytics/chart-data | Charts data |
| POST | /api/predict | Predict fraud risk |
| POST | /api/train | Retrain model |