Skip to content

About

AI-powered chargeback representment workbench for disputes analysts

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Casewright

Version 1.1.0 · Built by Mo Shehu

A lightweight merchant-risk workbench for a payment processor's operations team, in two modes. Disputes takes a chargeback case, reads the relevant scheme reason-code rules, reviews attached merchant evidence, and produces an analyst-ready workup with a recommendation and evidence checklist. Periodic Review re-underwrites a merchant on their CDD/EDD cycle: it computes what changed between their onboarding record and their current one, classifies each change against a rulebook, and produces a codified decision with a drafted request for information. A named analyst signs off on both.

Supports OpenAI, Anthropic, and DeepSeek models. Runs locally or behind a cloud deployment (Azure Container Apps or similar). No external services beyond the LLM API.

Live demo: casewright.mohammedshehu.com. It runs on a house key with a daily call cap; results clear ten minutes after they were last touched, so every visitor finds unprocessed queues. The first visit after an idle hour takes about 20 seconds while the container wakes.

image

Quick start

1. Clone

git clone https://github.com/shehuphd/casewright.git
cd casewright

2. Add evidence documents

Copy your evidence PDFs and images into data/documents/:

cp /path/to/evidence/files/* data/documents/

Or set DOCUMENTS_DIR in .env to an absolute path elsewhere.

3. Configure your API key

Copy .env.example to .env and fill in your key — or skip this and enter it via the in-app Settings panel on first launch.

cp .env.example .env

See USAGE.md for every .env field.

4. Launch

Platform How to run
macOS Double-click launch.command in Finder
Linux Run ./launch.sh in your terminal
Windows Double-click launch.bat in Explorer

On first run the launcher creates a virtual environment (outside the project folder, at ~/.venvs/casewright) and installs dependencies automatically. Subsequent launches skip straight to startup.

macOS note: if Gatekeeper blocks the script, right-click → Open the first time to approve it.

Windows note: launch.bat requires Python to be on your PATH. Install from python.org and tick "Add to PATH" during setup.

The launcher finds a free port automatically (5050 by default, with fallback) and opens the app in your browser.

To reset all generated workups without losing case data:

python reset_outputs.py

Learn more

Doc Covers
USAGE.md Configuration, deployment modes (local, bring-your-own-key cloud, house-key cloud with an optional access gate), document processing, the periodic review, the audit trail, LLM output shape, and known limitations
ARCHITECTURE.md A STRuFOL quick-reference summary, then the two request flows (analysis and periodic review), module responsibilities, and how credential resolution differs between local and cloud mode
MANIFEST.md A per-file map of the codebase
CHANGELOG.md Version history

License

Copyright (C) 2026 Mo Shehu. All rights reserved. Casewright is proprietary software; no licence is granted to use, copy, modify, or distribute it without written permission.


Built by Mo Shehu

About

AI-powered chargeback representment workbench for disputes analysts

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages