###Fraud Detection Dashboard
The Fraud Detection systems encapsulates a credit card transaction system and dashboard for monitoring fraudulent transactions and suspicious issuers and users. This system will also allow a monitor to approve or reject a transaction in realtime.
###Functional requirements
- Show dashboard with all relevant details of a credit card system.
- Monitor transactions as they arrive.
- Monitor transactions by issuer
- Create blacklist/watchlist of users and issuers.
- Raise alerts when a monitor is logged in and transactions in watch list are observed
Dashboard View will contain the following
- No of overall transactions
- No of transactions by sector
- No of transactions by issuer
- No of transactions by minute
- No of transactions by hour
- No of transactions by day
- View of all transactions under review.
###User View
- Allow searching for a particular user.
- Table will contain all transactions for a user, highlighting any under review
- Ability to approve or reject a transaction
- View/Add/Delete Users to a blacklist
###Issuer View
- Allow searching for a particular issuer.
- Table will contain all transactions for am issuer, highlighting any under review
- Ability to approve or reject a transaction
- View/Add/Delete Issuers to a blacklist
Spark Jobs need to created for some analysis per day of transactions.
Search needs to able to look up issuers and users.
Trade Processor Generally 10 transactions per second which is nearly 1 million a day
Trade processor will includes spikes every 10 days or so to simulate busy days
To run TransactionCreator for today
mvn clean compile exec:java -Dexec.mainClass="com.datastax.creditcard.TransactionCreator" -DnoOfDays=0
To populate data for a number of days and then continue in real time
mvn clean compile exec:java -Dexec.mainClass="com.datastax.creditcard.TransactionCreator" -DnoOfDays=10
Commands
~/Tools/cassandra-loader/build/cassandra-loader -f users.csv -host localhost -schema "datastax_creditcard_demo.users(user_id,first,last,gender,city,state,cc_no)"
~/Tools/cassandra-loader/build/cassandra-loader -f merchants.csv -host localhost -schema "datastax_creditcard_demo.merchants(id, name, location)"
insert into blacklist_merchants (merchant, city, amount) values ('merchant1','City-125',200);
insert into blacklist_merchants (merchant, city, amount) values ('merchant7','City-4986',50);
insert into blacklist_merchants (merchant, city, amount) values ('merchant50000','City-1969',200);
insert into blacklist_cards (dummy, cc_no, amount) values ('dummy', '0000000005702649', 1000);
insert into blacklist_cards (dummy, cc_no, amount) values ('dummy', '0000000004737244', 1000);
To remove the tables and the schema, run the following.
mvn clean compile exec:java -Dexec.mainClass="com.datastax.demo.SchemaTeardown"