A robust and scalable system for real-time transaction monitoring using Kafka, MongoDB, and Matplotlib. This project generates synthetic transaction data, processes it for suspicious activity detection, and provides real-time visualizations of transaction trends.
- Data Generation: Uses the Faker library to generate realistic synthetic transaction data.
- Real-Time Processing: Kafka-based producer-consumer architecture ensures seamless transaction streaming.
- Suspicious Activity Detection: Automatically flags transactions with amounts exceeding $30,000.
- Database Integration: Stores processed transactions in MongoDB for further analysis.
- Live Visualization: Dynamic Matplotlib charts visualize transaction trends in real time.
- Install Kafka, Zookeeper, and Kafka Manager.
- Install MongoDB.
- Clone this repository:
git clone https://github.com/yourusername/transmon.git cd transmon
- Install Python dependencies:
pip install -r requirements.txt
-
Start the Kafka producer:
python producer.py
-
Start the Kafka consumer with real-time visualization:
python consumer.py
- Producer: Generates and streams transaction data to Kafka.
- Consumer: Processes data, detects anomalies, and stores results in MongoDB while updating live visualizations.
- Database: MongoDB stores transaction data for persistence and analytics.
- Python 3.8+
- Kafka and Zookeeper
- MongoDB
- Python dependencies listed in
requirements.txt
- Modify
transaction_data.py
(or equivalent) to customize the data schema or generation logic. - Adjust thresholds for suspicious activity detection in
consumer.py
if needed. - Use
db_connection.py
for database querying and analytics.
Contributions are welcome! Feel free to fork this repository and submit a pull request with your enhancements or fixes.
This project is licensed under the MIT License. See the LICENSE file for details.
YousefMohammad
Contact: [email protected]