App · TypeScript
Fintech Fraud Detection
Real-time transaction fraud detection: Rails API (risk rules, Solid Queue) + React dashboard
Why it exists
A learning project: the two of us built it to learn rule-based risk scoring and background jobs in Rails 8 on a realistic fintech problem. It taught how to keep scoring explainable (each blocked or flagged payment lists the rules that fired), how to keep a decision and its side effects consistent, and how much a small app has to handle once sessions, devices and audit logs are real.
What it does
- 01
PayPal Orders v2 (sandbox). create, authorize, capture, void and refund behind the risk gate; hold expiry, partial refunds, idempotency keys and a signature-verified webhook receiver with event-id dedupe (docs/paypal-webhooks.md).
- 02
AI analyst on Gemini. a bounded verdict, "Why this verdict?" and "What would change it?" answers, and a drafted case narrative saved to the audit trail. A grounding check replaces any text that names a number, rule or identifier not in the facts. Behind a token bucket, a circuit breaker, one retry and fallback models; the payment verdict waits at most 8 s, a reviewer's question 20 s, and a failure falls back to rules only (docs/analyst-resilience.md, docs/ask-analyst.md).
- 03
Review queue and roles. a case card per held payment (signal cards, tabs for asking the analyst, similar cases, the narrative and linked accounts, a decision bar); analyst, reviewer and admin roles with decision limits; four-eyes approval above a limit and for refunds.
- 04
Similar cases with pgvector (nearest decided payments and what a person did) and linked accounts that share a device.
- 05
Customer side. a held payment says in plain words what is happening, and the customer can send the reviewer one note (never sent to the AI).
- 06
Agent mandates. a customer gives a shopping agent one merchant, a cap per payment, a cap in total and an end date, revocable at any time. The agent's token is stored only as a digest; a payment outside the mandate is refused and audited, and one inside it is still judged by the rules, the model and the analyst. Agent payments use a simulated PayPal client (docs/agent-mandates.md).
Next
Valorant Voice AI