Institutional-grade M&A due diligence in seconds, not weeks.
Built at the Hanwha AI Center HACathon — Building AI for Finance | April 3, 2026, San Francisco
DealSight AI compresses the M&A due diligence pipeline from weeks to minutes. A senior analyst spends 4+ hours reading a single Confidential Information Memorandum (CIM). DealSight AI processes the same document in under 60 seconds — producing a three-lens analysis (CPA, M&A, Legal), valuation range, risk flags, 12 actionable items, and 20 buyer questions ready for the seller meeting.
The same AI intelligence layer runs through all five stages of a deal — passing structured data forward automatically so nothing is re-entered between stages.
Three-lens due diligence: CPA, M&A, and Legal simultaneously. Valuation range, risk scorecard, action items, buyer questions.
Pre-LOI financial screen from P&L and balance sheet. Revenue analysis, EBITDA normalization, owner compensation addbacks.
Auto-generated Letter of Intent anchor terms from CIM and financial data. Purchase price range, payment structure, transition terms.
Quality of Earnings analysis. EBITDA bridge waterfall, working capital analysis, AR aging, weighted buy/walk score.
AI-powered purchase agreement review. Closing checklist, clause flags, risk items, recommended closing terms.
CIM Analysis → Financials → LOI Builder → Diligence → Close
| Stage | Input | What AI does | Time saved |
|---|---|---|---|
| CIM Analysis | CIM PDF | Three-lens analysis: CPA, M&A, Legal. Valuation range. 20 buyer questions. | 4 hrs → 60 sec |
| Financials | P&L / balance sheet CSV or PDF | EBITDA normalization, owner addbacks, revenue quality screen | 3 hrs → 90 sec |
| LOI Builder | Auto — no upload | Price range, deal structure, earnout, transition terms | 4 hrs → instant |
| QoE Dashboard | Full financial package | EBITDA bridge waterfall, working capital, AR aging, buy/walk score | 3 weeks → hours |
| Agreement Review | APA / purchase agreement | Clause flags, closing checklist, negotiation recommendations | 6 hrs → 60 sec |
| Layer | Technology | Why |
|---|---|---|
| Frontend | React + TanStack Start | Lovable-generated, exported and owned |
| Backend | Python FastAPI | Real code, not no-code. Deployed on Railway. |
| AI | Claude API (claude-sonnet-4-20250514) | Reads PDFs natively. One call = three expert lenses. |
| Database | Supabase (Postgres) | Deal persistence across sessions |
| Frontend hosting | Cloudflare Workers | Matches TanStack Start deployment target |
| Backend hosting | Railway | Free tier, auto-deploy from GitHub |
Browser (Cloudflare Workers)
│
│ FormData (PDF/CSV upload)
│ or JSON (LOI Builder)
▼
FastAPI Backend (Railway)
│
│ POST /v1/messages
│ { model, system_prompt, document }
▼
Claude API
│ Returns structured JSON
▼
FastAPI parses + enriches
│ Revenue trend %, valuation midpoint,
│ flag counts, EBITDA bridge waterfall
▼
JSON response → React renders dashboard
│
▼
Supabase — deal stored for persistence
Stage 1 output → stored in React state
↓
Stage 2 receives step1_output (prefills CIM context)
↓
Stage 3 receives step1_output + step2_output (auto-generates LOI)
↓
Stage 4 receives step1_output + step3_output
↓
Stage 5 receives step1_output + step3_output
No re-entry of data between stages.
Deal-Sight-AI/
├── dealsight-backend/
│ ├── main.py ← FastAPI backend
│ ├── requirements.txt
│ ├── Procfile
│ ├── runtime.txt
│ └── prompts/
│ ├── step1-cim-system-prompt.txt
│ ├── step2-financials-prompt.txt
│ ├── step3-loi-prompt.txt
│ ├── step4-qoe-prompt.txt
│ └── step5-agreement-prompt.txt
├── screenshots/
│ ├── Firstpage.png
│ ├── cim-analyser.png
│ ├── finance.png
│ ├── loi-builder.png
│ ├── diligence.png
│ └── close.png
└── README.md
Frontend lives in a separate repo: dealsight-ai-frontend — React + TanStack Start, deployed on Cloudflare Workers
All endpoints live at https://deal-sight-ai-production.up.railway.app
| Method | Endpoint | Input | Description |
|---|---|---|---|
POST |
/api/cim-analyzer |
file (PDF) |
Three-lens CIM analysis |
POST |
/api/financials |
file (PDF/CSV) + step1_output |
Financial screening |
POST |
/api/loi-builder |
step1_output + step2_output (JSON) |
LOI anchor terms |
POST |
/api/qoe-dashboard |
files (CSV/PDF, multiple) + step1_output + step3_output |
QoE analysis |
POST |
/api/agreement-review |
file (PDF) + step1_output + step3_output |
Agreement review |
GET |
/api/deals |
— | List all deals |
GET |
/health |
— | Health check |
Interactive API docs: https://deal-sight-ai-production.up.railway.app/docs
- Python 3.11+
- Node.js 18+
- Anthropic API key
- Supabase account (free tier)
- Railway account (free tier)
- Cloudflare account (free tier)
git clone https://github.com/KamayaniR/Deal-Sight-AI.git
cd Deal-Sight-AI/dealsight-backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtCreate .env:
ANTHROPIC_API_KEY=sk-ant-...your-key...
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=eyJ...your-anon-key...
ALLOWED_ORIGINS=http://localhost:8080,https://your-frontend.workers.dev
Run locally:
uvicorn main:app --reload --port 8001Test:
curl http://localhost:8001/health
# {"status":"ok"}
curl -X POST http://localhost:8001/api/cim-analyzer \
-F "file=@your-cim.pdf"In Supabase SQL Editor, run:
CREATE TABLE deals (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
business_name TEXT,
industry TEXT,
stage INTEGER DEFAULT 1,
cim_analysis JSONB,
financials JSONB,
loi_terms JSONB,
qoe_analysis JSONB,
agreement_review JSONB,
status TEXT DEFAULT 'active'
);# Push to GitHub, then:
# railway.app → New Project → Deploy from GitHub
# Add environment variables: ANTHROPIC_API_KEY, SUPABASE_URL, SUPABASE_KEY, ALLOWED_ORIGINSgit clone https://github.com/KamayaniR/dealsight-ai-frontend.git
cd dealsight-ai-frontend
npm install
npm run dev
# Open http://localhost:8080Create .env.local:
VITE_API_URL=https://deal-sight-ai-production.up.railway.app
Connect dealsight-ai-frontend repo to Cloudflare Workers & Pages:
- Build command:
npm run build - Deploy command:
npx wrangler deploy - Add environment variable:
VITE_API_URL
| Endpoint | Max tokens | Why |
|---|---|---|
| CIM Analyzer | 16,000 | Large system prompt + full PDF + detailed JSON output |
| Financials | 6,000 | Shorter prompt, structured financial data |
| LOI Builder | 8,000 | Text-only, concise deal terms |
| QoE Dashboard | 12,000 | Multiple CSV files + detailed EBITDA analysis |
| Agreement Review | 12,000 | Full legal document + detailed clause flags |
| Item | Cost |
|---|---|
| Claude API per CIM analysis | ~$0.05 |
| Full five-stage pipeline per deal | ~$0.20 |
| $10 in API credits | ~50 full pipelines |
| Railway (free tier) | $0/month |
| Supabase (free tier) | $0/month |
| Cloudflare Workers (free tier) | $0/month |
Per-analysis pricing:
- Single CIM scan: $50
- Full five-stage pipeline per deal: $500
- Enterprise unlimited: $2,000/month per deal team
Target customers:
- Lower middle market PE firms reviewing 200-500 CIMs per year
- M&A advisory firms reducing junior analyst hours
- Search fund operators accessing institutional-grade DD at startup cost
Unit economics:
- API cost per full pipeline: ~$0.20
- Price per full pipeline: $500
- Gross margin: 99.96%
Press Shift+D anywhere in the app to load hardcoded demo data for the Midwest MSA Managed IT Services deal — no API call needed, no PDF required.
Demo deal: Managed IT Services Provider, Colorado
- Revenue: $2.44M | Net Margin: 33.4% | Recurring: 80%
- Verdict: PROCEED WITH CONDITIONS
- Valuation: $3.3M — $5.0M
Hanwha AI Center HACathon — Building AI for Finance San Francisco, April 3, 2026
Sponsors: Lovable · n8n · MiniMax · Crossmint · Hanwha
MIT License — see LICENSE for details.
DealSight AI — Institutional-grade M&A due diligence for everyone in the deal.





