Lab build

Transaction monitoring dashboard in Grafana

Writes rule-scored synthetic card transactions to Postgres on AWS and charts approvals in Grafana Cloud.

Role
Builder, end to end
Group
MLOps
Services
MLOps & cloud

What it does

Faker produces synthetic banking transactions, a rule function flags each one and records the triggered rule, an explanation and an approve or reject decision, and psycopg2 writes the rows to a PostgreSQL database on AWS. Grafana Cloud connects to the database and SQL panels show approved and rejected counts and amounts, transaction-type splits and triggered rules.

What was built

  1. 01

    Generator creates transactions with merchant category, card type, amount and blacklist flags using Faker.

  2. 02

    Rule function sets rules_triggered, an explanation and an Approved or Rejected decision per transaction.

  3. 03

    psycopg2 inserts each scored transaction into a banking_data table on AWS-hosted PostgreSQL.

  4. 04

    Grafana Cloud stat and pie panels query counts, amounts, transaction types and triggered rules.

The pipeline, layer by layer

Four layers, one pipeline.

  1. L1Generate

    • Faker transactions
  2. L2Score

    • Rule-based decision function
  3. L3Store

    • PostgreSQL on AWS
  4. L4Visualise

    • Grafana Cloud dashboard

Stack

  • Python
  • Faker
  • pandas
  • psycopg2
  • PostgreSQL
  • AWS
  • Grafana Cloud

Next lab build · 29 / 46

Real-time voice agent on LiveKit

Voice assistant chaining speech-to-text, GPT-4o and ElevenLabs speech, with per-stage latency metrics.

Previous: Airflow ETL for NASA APOD into Postgres

Need a system like this in production? Tell us about it.