{"id":25367971,"url":"https://github.com/yuberlinets/transactions-fraud","last_synced_at":"2026-04-10T00:04:11.415Z","repository":{"id":276533192,"uuid":"926805992","full_name":"YuBerlinets/Transactions-Fraud","owner":"YuBerlinets","description":"Fraudulent Transaction detection","archived":false,"fork":false,"pushed_at":"2025-02-08T20:17:02.000Z","size":395,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T05:44:18.386Z","etag":null,"topics":["analysis","docker-compose","fastapi","fraud-detection","java","kafka","kafka-streams","ml","mongodb","nginx","python","react","real-time","rest-api","sockjs","spring","spring-boot","typescript","websocket"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YuBerlinets.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-03T22:15:11.000Z","updated_at":"2025-02-08T20:17:05.000Z","dependencies_parsed_at":"2025-02-08T21:33:14.232Z","dependency_job_id":null,"html_url":"https://github.com/YuBerlinets/Transactions-Fraud","commit_stats":null,"previous_names":["yuberlinets/transactions-fraud"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuBerlinets%2FTransactions-Fraud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuBerlinets%2FTransactions-Fraud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuBerlinets%2FTransactions-Fraud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuBerlinets%2FTransactions-Fraud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YuBerlinets","download_url":"https://codeload.github.com/YuBerlinets/Transactions-Fraud/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987105,"owners_count":21028891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","docker-compose","fastapi","fraud-detection","java","kafka","kafka-streams","ml","mongodb","nginx","python","react","real-time","rest-api","sockjs","spring","spring-boot","typescript","websocket"],"created_at":"2025-02-15T00:23:51.055Z","updated_at":"2025-12-30T19:12:11.374Z","avatar_url":"https://github.com/YuBerlinets.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Transaction Fraud Detections\n### Real-time analysis of banking transactions to detect fraudulent ones\n\n## Overview\nThis project is a real-time fraud detection system for banking transactions. It utilizes Apache Kafka for event streaming, a machine learning model trained with DecisionTreeClassifier from sklearn, and a Spring Boot backend to process transactions. Fraudulent transactions are stored in MongoDB, while legitimate ones (in a real-world scenario) would be forwarded to an internal banking system.\n\n## Architecture\n![Architecture Scheme](https://github.com/user-attachments/assets/8a438fcb-6e7e-4ef4-b6e4-bdb537993a29)\n\n### Transaction Producer (Python)\n- Generates 100 transactions per minute for testing.\n- Sends transactions to the Kafka topic transactions.\n### Backend (Java Spring Boot)\n- Consumes transactions from Kafka.\n- Calls an ML-based fraud detection model (DecisionTreeClassifier).\n- If fraudulent, stores the transaction in MongoDB and sends to \"fraud-alert\" Kafka topic\n- If legitimate, in a real-world case, forwards the transaction to a banking system.\n- Sends transaction updates via WebSocket to the frontend.\n  \n### Frontend (React + TypeScript)\n- Real-time dashboard displaying: Transactions per 3 minutes, Blocked Transactions, Approved Transactions, Fraud Alerts\n- HTTP server configured using Nginx\n\n### Transactions Streaming (Kafka)\n- Has two topics with events (fraud-alerts, transactions)\n\n### ML Model (Python + FastAPI + SkLearn)\n- Trained on datasets with transaction samples based on the Decision Tree Classifier\n- Has endpoints to send and analyze transactions and evaluate a model\n\n## Tech Stack\n- **Backend**: Java, Spring Boot, Kafka Streams, MongoDB, FastAPI, WEBSocket\n- **Machine Learning**: Python, Scikit-learn\n- **Frontend**: React, TypeScript, Vite, SockJS, Nginx\n- **Event Streaming**: Apache Kafka\n\n## Client Layout\n**Dashboard**\n![Dashboard Light](https://github.com/user-attachments/assets/7a507fe6-de1f-4b07-8c00-9bda76e5a544)  \n![Dashboard Dark](https://github.com/user-attachments/assets/a80b4f1d-9fee-46ba-8326-0d07debc796b)  \n\n\n**Stored Fraudulent Transactions**\n![DB Light](https://github.com/user-attachments/assets/d530af8b-1fd5-4c39-b0e3-2362523442de)\n![DB Dark](https://github.com/user-attachments/assets/4b7d03e8-7cb0-4ba4-b428-c0ea107666d4)\n\n## Config (.env files)\n\n### **Client**  \nVITE_BASE_URL=  \n  \n### **Java Backend**\nMONGODB_URI=  \nKAFKA_BOOTSTRAP_SERVERS=  \nML_MODEL_URL=  \nKAFKA_STREAMS_APPLICATION_ID=  \nBOOTSTRAP_SERVERS_CONFIG=  \n  \n### **Python Generator**  \nBASE_URL=  \n\n## How to run?\n\u003e [!WARNING]\nDon't forget to change the .env files and properties in docker-compose.yml!  \n\nTo run using Docker compose run this command in project folder.  \n```\n\ndocker-compose up --build\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuberlinets%2Ftransactions-fraud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuberlinets%2Ftransactions-fraud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuberlinets%2Ftransactions-fraud/lists"}