SameerInfinity/AI_DD
0
ABYSS — AI-Powered M&A Due Diligence Virtual Data Room
A multi-party Virtual Data Room (VDR) platform for mergers & acquisitions due diligence. Upload documents, get perspective-specific AI analysis with structured findings, risk scores, and source citations. Supports Buy Side, Sell Side, and Admin workflows with role-based access, request lists, audit trails, and Human-in-the-Loop review.
Live: Frontend (Vercel) | Backend (HF Spaces)
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ FRONTEND (React 18 + TypeScript + Vite 8) │
│ Auth → Perspective → Projects → Data Room / Q&A / Audit │
│ UI: shadcn/ui + Tailwind | State: Zustand + React Query │
│ Theme: Ocean dark + Sunny light | Code-split (React.lazy) │
└─────────────────────────┬───────────────────────────────────────┘
│ REST API (JWT Auth)
┌─────────────────────────▼───────────────────────────────────────┐
│ BACKEND (FastAPI + async) │
│ │
│ Auth ─ Projects ─ Teams ─ Documents ─ Requests ─ Queries │
│ Folders ─ DD Tests ─ Routines ─ Planning ─ Finance ─ Export │
│ Knowledge ─ Self-Improvement ─ VDR Security │
│ │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ OCR → Chunker → Embeddings → Vector Store │ │
│ │ (PyMuPDF / Tesseract → Semantic Split → Pinecone EU) │ │
│ └────────────────────────────────────────────────────────────┘ │
│ │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ AI PIPELINE (8-Step State Machine) │ │
│ │ Rewrite → Classify → Retrieve → Completeness │ │
│ │ → Think (Groq) → Audit → Structure → Done │ │
│ │ + Review feedback injected into system prompt │ │
│ └────────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────┘
│ │ │
┌─────▼──────┐ ┌──────▼───────┐ ┌─────▼──────────┐
│ Supabase │ │ Pinecone │ │ Supabase │
│ PostgreSQL │ │ (vectors) │ │ Storage (files) │
│ (EU) │ │ (EU) │ │ (EU) │
└────────────┘ └──────────────┘ └────────────────┘Tech Stack
All 11 Modules
1. Auth Module
- Register, login, Google OAuth, email verification (Brevo), password reset
- 8 analyst perspectives (set once, changeable from sidebar)
- 5 project roles: Admin, Buy Side (Legal/Tax/Commercial), Sell Side
- Email-based project invitations (admin sends, user accepts/declines)
- Session management with global 401 redirect
2. Project Module
- Create, rename, delete projects with extended fields (legal form, deal type, country, employees, revenue, deal value)
- Email invitation system (replaced invite codes)
- Team management with role badges and activity feed
- VDR security settings (watermarks, download restrictions per role)
3. DMS Module (Data Room)
- Upload PDFs, DOCX, XLSX, CSV, images, plain text
- Nested folder structure with directory upload
- Document versioning, AI auto-tagging, full-text search
- Professional list-view file manager
- Language detection (AI responds in document language)
- Document watermarks (username + date overlay, configurable)
4. OCR Module
- PyMuPDF for digital PDFs, Tesseract for scanned documents
- python-docx for Word, pandas + openpyxl for Excel/CSV
- Semantic chunking (1200 chars, 150 overlap) → Pinecone indexing
- Reprocess-all endpoint for failed documents
5. Agent Module (AI Pipeline)
- 8-step pipeline: Rewrite → Classify → Retrieve → Completeness → Think → Audit → Structure → Complete
- 8 perspective-specific system prompts
- Citation enforcement, confidence scoring, red flag detection
- Human-in-the-Loop review (Approve/Edit/Reject) on all AI outputs
- Review feedback injected into system prompt (AI learns from corrections)
6. Planning Module
- Interactive AI-guided audit planning dialog
- AI analyzes project profile, asks 4-6 targeted risk questions
- Auto-generates DD request list by workstream
- Sessions persisted — visible to all team members
- Past sessions viewable in read-only mode
7. Finance Module
- Upload accounting data (Excel/CSV), auto-detect SKR 03/SKR 04
- Range-based account mapping (100+ German standard account ranges)
- Journal entry format support (debit/credit per row)
- Balance sheet items excluded from P&L automatically
- Variance analysis: Month-over-Month, Year-over-Year, anomaly detection (>30%)
- Key metrics: EBITDA margin, gross margin, net margin, personnel ratio, equity ratio, ROA
8. Report Module
- PDF export: Q&A analysis with structured findings, TOC, confidence bars
- DOCX export: Full DD report with request list, test results, Q&A summary
- XLSX export: Workstream sheets with status, scores, findings
- Editable executive summary (write or AI-generate before export)
- Download restrictions enforceable per role
9. Knowledge Module
- 20 built-in IDW/M&A standards (Legal, Tax, Commercial, General)
- Auto-seeded on first access, filterable by category
- AI-generated cross-project insights ("Generate Insights" button)
- User-level, accessible from Projects page
10. Audit Module
- Completeness audit: AI cross-checks documents against request list
- Per-field DD tests with pass/fail/warning scoring
- Custom test routines with user-defined prompts
- Results persisted — load on revisit, shows "Last run by [name]"
- Activity log: human-readable action labels, user/IP tracking
- Cookie consent + GDPR privacy policy
11. Self-Improvement Module
- Usage analytics: projects, queries, uploads, tests, reviews
- 30-day activity heatmap
- AI review patterns: approve/edit/reject rates with contextual messages
- Actionable recommendations: missing docs, open requests, unrun audits
- User-level, accessible from Projects page
Performance
Pages (21 total)
Database Schema (19 Tables)
Enums: UserRole (5), Perspective (8), Workstream (4), InviteStatus (4), DocStatus (4), QueryStatus (9), RequestStatus (5), Severity (5)
Environment Variables
Quick Start
# 1. Clone
git clone https://github.com/SameerInfinity/AI-Due-Diligence.git
cd AI-Due-Diligence
# 2. Backend
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
# 3. Frontend
cd frontend && npm install && cd ..
# 4. Configure
cp .env.example .env
# Edit .env with your keys
# 5. Run backend
uvicorn backend.main:app --reload --port 8000
# 6. Run frontend (new terminal)
cd frontend && npm run devDeployment
License
Private — All rights reserved.
