Payment Observability

How do you let people ask an LLM about live operational data without letting it see more than it should?

A real-time dashboard that replays synthetic payment events through an event bus, a risk engine and a guarded conversational analyst.

100% syntheticreplayed through an event bus, a risk engine and a Redis cache into a live dashboard; no real records
Year
2026
Status
Working full-stack demo · synthetic data only · CI on backend and frontend
Stack
Python, FastAPI, WebSockets, Redis, SQLite, React, TypeScript, ECharts, Ollama, Docker
01

Events in, insight out

Transactions flow through a producer, an in-memory event bus and an incremental analytics engine into a Redis KPI cache, then out over WebSockets as an initial snapshot plus live updates. The browser never reads a database. Source adapters all publish the same event contract, so nothing downstream cares where events come from.

  1. Synthetic generator

    SQLite demo store

  2. Replay producer

    pause · resume · reset · fast-forward

  3. Event bus
  4. Analytics + risk engine

    refusals, timeouts, latency, anomalies

  5. KPI cache
    • Redis
    • in-memory fallback
  6. FastAPI
    • REST
    • WebSocket
    • guarded analyst
Live dashboard with KPI tiles and trend charts
02

A conversational analyst with guardrails

The assistant answers questions about KPIs, anomalies, architecture and replay state through whitelisted tools with bounded queries, rate limits and response sanitisation. It falls back to rules when no model is configured, can use a local Ollama model, and optionally a hosted one.

One more section for engineers: architecture, hyper-parameters and design decisions.

03

Under the hood

Under the hood
Backend
FastAPI, Uvicorn, Pydantic, aiosqlite, async services with clear boundaries
Realtime
WebSocket snapshot + deltas, optional token for non-local deployments
Cache
Redis KPI snapshots with automatic in-memory fallback
Frontend
React 19, TypeScript, Vite, Tailwind, ECharts
Tests
Aggregation, replay state, API/WebSocket contracts, chatbot safeguards, cache behaviour, reconciliation, interpolation
04

What it doesn't do (yet)

  1. The public version runs on generated demo data. It demonstrates patterns, not production scale.
  2. The conversational analyst answers from whitelisted tools and local knowledge; it is not a general SQL interface by design.

Read the code and the full results on GitHub