Problem and solution
Problem
Fraudulent transactions make up a very small share of the project dataset. Exploring this imbalance and reviewing model predictions requires both transaction-level tools and a clear overview of the data.
Solution
An interactive analytics application connects transaction search, statistical dashboards, real-time fraud prediction, and model comparison through a shared REST API.
Technical approach
- Real-time fraud prediction through a dedicated prediction API.
- Interactive dashboard with transaction statistics, filtering, and search.
- Comparison of three machine-learning models, with Random Forest identified in the documented ML stack.
- CSV export for further transaction analysis.
- Apache Spark data scripts and a Docker Compose setup for the project services.
Implementation details
FraudLens is a Big Data Analytics course project developed by Worachat Paranya. It brings credit-card transaction analysis and fraud prediction into a React and TypeScript dashboard, supported by a Node.js and Express REST API, PostgreSQL, scikit-learn, and Apache Spark. Users can review statistics, search and filter transactions, request fraud predictions, compare three machine-learning models, and export transaction data to CSV.
Dataset and analytical context
The project uses the Kaggle Credit Card Fraud Dataset: 284,807 transactions, including 492 fraud cases, or approximately 0.17% of the dataset. This imbalance is central to the project's fraud-analysis context.
The dataset is supplied separately as creditcard.csv under spark/data. The project includes a model-comparison view for three models; the README identifies Random Forest but does not specify the other two models or report evaluation scores.
Dashboard and prediction workflow
Users explore transaction statistics through an interactive React dashboard with Recharts visualizations, narrow transaction lists with search and filters, and export data to CSV. Model insights provide a separate comparison of three machine-learning models.
The REST API exposes GET /api/stats for summary statistics, GET /api/transactions for transaction listings, POST /api/predict for fraud prediction, and GET /api/stats/model-comparison for model comparison.
Architecture and local setup
The repository separates the React and TypeScript frontend, Node.js and Express backend, scikit-learn model code, and Apache Spark data scripts into frontend, backend, model, and spark directories. PostgreSQL stores application data, and Docker Compose coordinates the local environment.
The documented setup loads the dataset, builds and starts the services with Docker Compose, and runs the backend seed script. A setup guide and user manual explain installation, testing, and use. FraudLens is presented as an educational Big Data Analytics mini project.
