Skip to content

edycutjong/lexexhibit

Repository files navigation

LexExhibit ⚖️

Translate any wallet's on-chain history into a court-ready legal affidavit in 15 seconds.

LexExhibit

Live Demo Pitch Video Built for BLI Legal Tech


Next.js React TypeScript OpenAI Alchemy Supabase Tailwind CI


📸 See it in Action

LexExhibit Forensic Dashboard

Paste a wallet → Trace the money → Generate a court-ready affidavit. Blockchain forensics in 3 clicks.


💡 The Problem & Solution

When a divorce attorney suspects a spouse is hiding assets in DeFi liquidity pools, or a bankruptcy trustee needs to trace crypto dispersals, they face an impossible gap: Etherscan is not court-admissible evidence. Hex addresses, wei amounts, and method hashes mean nothing to a non-technical judge. Hiring forensic blockchain experts costs $300–500/hour and takes weeks. An estimated $35B in crypto is hidden in divorce cases annually.

LexExhibit solves this with a 1-click forensic translation engine. Paste any Ethereum wallet address and receive a formal legal affidavit — formatted to US/CA court standards — in under 15 seconds.

Key Features:

  • 1-Click Forensic Tracing — Alchemy SDK maps full transaction histories, flags Tornado Cash mixer interactions and cross-chain bridge dispersals
  • 📝 AI Legal Translation — GPT-4o converts raw JSON into formal legal prose with chronological "Exhibits" references
  • 📄 Court-Admissible PDF — jsPDF renders pleading-paper formatting native to US/CA courts (numbered lines 1–28, case captions, perjury declarations)
  • 🌊 Fund-Flow Visualization — Interactive Sankey-style diagrams showing money movement through wallets and contracts
  • 🔒 Exhibit Verification — Every claim cites a verifiable on-chain transaction hash

🏗️ Architecture & Tech Stack

Layer Technology
Framework Next.js 16.2.3 (App Router)
UI React 19.2.4
Styling Tailwind CSS v4 + CSS custom props
Animations Framer Motion 12
Blockchain Alchemy SDK 3.6 (Transaction Traces)
AI OpenAI GPT-4o (Structured Output)
PDF jsPDF 4.2 (Court formatting)
Icons Lucide React
Cache Supabase (wallet scan cache + affidavit audit log)
Language TypeScript 5

Data flow:

Wallet Address
  ↓
[Demo wallet?] ──────────────────────── Pre-cached JSON (instant)
  ↓ else
[Supabase cache hit?] ───────────────── Cached trace < 100ms
  ↓ else
Alchemy SDK getAssetTransfers()
  → classify by known contract addresses (Uniswap, Tornado, bridges)
  → detectSuspiciousPatterns (mixer, dispersal, cross-chain hop)
  → write to Supabase cached_traces (7-day TTL)
  ↓
legal-formatter → OFAC-aware affidavit prose per transaction
  ↓
jsPDF → pleading paper PDF + fund-flow diagram page
  → write audit entry to Supabase generated_reports
  ↓
Court-Ready PDF + Exhibit Verification Panel

🏆 Hackathon Context

Competition: BLI Legal Tech Hackathon 2 Track: Compliance Innovation & Top Law Firm Bounties Core Thesis: The "last mile" in legal tech is format translation. Raw blockchain data tools exist (Etherscan, Arkham, Chainalysis). What's missing is turning data into documents that lawyers can actually file in court. LexExhibit closes that gap in 15 seconds.


🚀 Getting Started

Prerequisites

  • Node.js ≥ 20
  • npm

Installation

git clone https://github.com/edycutjong/lexexhibit.git
cd lexexhibit

# Configure environment
cp .env.example .env.local
# Add your ALCHEMY_API_KEY and OPENAI_API_KEY

# Install dependencies
npm install

# Start the dev server
npm run dev

Open http://localhost:3000 to see the dashboard.

For Judges: The app includes pre-cached transaction data from the Ronin Bridge exploiter for an instant, reliable demo experience without API keys.

🌉 The "Golden Path" Demo

  1. Paste 0x098B716B8Aaf21512996dC57EB0615e2383E2f96
  2. Let the tracer flag suspicious activities (mixer interactions, rapid dispersals)
  3. Explore the fund-flow diagram — see money flowing from the exploit through mixers
  4. Click "Generate Affidavit" to produce the court-formatted PDF
  5. Download the legal document — ready to file with a court clerk

🧪 Testing & CI

npm run lint          # ESLint with Next.js 16 rules
npm run typecheck     # Full TypeScript validation
npm run test          # Run tests with Jest
npm run test:coverage # Coverage report
npm run ci            # Full CI pipeline (lint + typecheck + test)

📁 Project Structure

lexexhibit/
├── app/
│   ├── api/
│   │   ├── scan/             # Alchemy trace + classification
│   │   └── generate-affidavit/ # GPT-4o translation + jsPDF
│   ├── investigate/          # Investigation results page
│   ├── globals.css           # Design tokens
│   ├── icon.png              # App icon
│   ├── layout.tsx            # Root layout with metadata
│   ├── page.tsx              # Landing page with wallet input
│   └── template.tsx          # Page transition animations
├── components/
│   ├── FundFlowDiagram.tsx        # Interactive Sankey-style flow viz
│   ├── TransactionTimeline.tsx    # Chronological TX list with flags
│   ├── AffidavitPreview.tsx       # PDF preview with download
│   └── ExhibitVerificationPanel.tsx # Per-exhibit on-chain verification cards
├── data/                          # Pre-cached demo transaction data
├── docs/                          # README assets (hero, screenshots)
├── lib/
│   ├── tx-classifier.ts           # Transaction categorization engine
│   ├── suspicious-detector.ts     # Flag detection (mixer, dispersal, bridge)
│   ├── legal-formatter.ts         # Legal prose templates with flag language
│   └── pdf-generator.ts           # Court-standard PDF + fund-flow diagram page
├── scripts/                  # Playwright demo recording scripts
├── .env.example              # Environment template
├── .github/                  # CI workflows
├── LICENSE                   # MIT License
└── README.md                 # You are here

📸 Screenshots

🎨 Asset Trajectory Topology 📂 Case Documentation View
Topology Case Documentation
✍️ Forensic Dashboard 📄 Court-Ready PDF Preview
Dashboard PDF Preview

📄 License

MIT © 2026 Edy Cu

🙏 Acknowledgments

Built for BLI Legal Tech Hackathon 2. Thank you to Alchemy for blockchain infrastructure and OpenAI for the GPT-4o API.

About

⚖️ 1-click forensic translation engine that converts any Ethereum wallet's on-chain history into a court-ready legal affidavit.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages