Real-Time Fraud Detection Microservice
21st May, 2026
During my last year of undergraduate degree in Computer Science, I have stumbled upon a book called 'Designing Data-Intensive Applications' by Martin Kleppman. You can find it pictured below:
Front cover for 'Designing Data-Intensive Applications'
Before this in my degree, I have not yet studied closely distributed systems and it was an exciting read because it shown me to which degree there is uncertainty and challenges all throughout the whole process of communication between machines on the network.
When I started reading papers on fraud detection to pick a dissertation topic, I noticed something that decided the project for me. Almost everything I found was about the algorithms: which model classifies a fraudulent transaction best, how to handle class imbalance, which features matter. Very little of it dealt with the infrastructure those models actually run on, even though a detection system that cannot keep up with the transaction stream is not much use regardless of how accurate the classifier is. That gap is what I wanted to contribute to, so I built the pipeline rather than the model.
Most of the stack was new to me. I wrote the services in Go, which I had barely touched before, and used Kafka to move transaction events between them, Cassandra to store the ones that got flagged, and Docker to run everything locally. I also added a small REST API for querying flagged transactions, with the Cassandra tables partitioned into time buckets so a date-range query does not have to look at the whole dataset, and put the detection rules in YAML config files so I could change what counts as suspicious without touching the Go code.
My department was kind enough to allow me to publish the source code after the consolidation of grades, so I would appreciate if you could check it out! It is live on my github account (simply click here to open it in a new window!).