Skip to content

LouisPages/2026ParisFinTech

Repository files navigation

Nesmos.ai

Agentic AI pipeline for Third-Party Litigation Funding

Turn a public antitrust ruling into a TPLF investment memo - shortlist potential claimants, enrich financial KPIs, produce company-level analyses, and generate Word/PDF deliverables.

Project built for the Paris Fintech Hackathon 2026.

React 19 TanStack Start Vite 7 Tailwind 4 FastAPI LangGraph Gemini Cloudflare Workers


Overview

Nesmos.ai is a web platform that automates Third-Party Litigation Funding (TPLF) deal origination for European antitrust litigation.

Starting from a court or competition authority decision, the pipeline:

  • extracts a structured judicial contract (jurisdiction, sanctioned entities, infringement, markets, period, fines, appeal status);
  • sources listed European companies that may have been harmed;
  • enriches each candidate with parallel financial/legal research (KPIs, exposure, litigation capacity);
  • ranks candidates with an LLM-as-judge selection step;
  • writes a full investment memo and generates .docx / .pdf outputs.

Main frontend pages:

Route Purpose
/ Marketing/value proposition page.
/analysis Upload a decision, monitor progress via SSE, download outputs.
/architecture Interactive pipeline view (React Flow + backend node mapping).

Tech stack

  • Frontend: React 19, TypeScript, TanStack Start/Router/Query, Vite 7, Tailwind 4, shadcn/ui, React Flow.
  • Backend: Python 3.11+, FastAPI, LangGraph, LangChain + Gemini, Pydantic v2, pypdf, python-docx, docx2pdf.
  • Infra target: Cloudflare Workers for frontend; backend deployed separately (e.g., Fly/Render/Railway/Cloud Run).

Quick start

1) Install dependencies

git clone <repository-url>
cd 2026ParisFinTech

# Frontend
npm install

# Backend
python -m venv .venv
# Windows PowerShell
. .venv/Scripts/Activate.ps1
# macOS / Linux
# source .venv/bin/activate
pip install -r backend/requirements.txt

2) Configure environment variables

cp backend/.env.example backend/.env

Set at least:

GOOGLE_API_KEY=your_api_key_here

Optional variables include:

  • PAPPERS_API_KEY
  • STORAGE_BUCKET
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_REGION

3) Run locally (2 terminals)

# Terminal 1 - FastAPI backend on :8000
npm run api

# Terminal 2 - Frontend on :8080
npm run dev

The Vite dev server proxies /api and /files to http://localhost:8000, so no extra CORS setup is needed for local development.

4) Open the app

Service URL
Web app http://localhost:8080
FastAPI http://localhost:8000
Swagger http://localhost:8000/docs
ReDoc http://localhost:8000/redoc

Minimal API flow (without frontend)

# Upload decision file
curl -F "file=@backend/25d07_version_publique.pdf" http://localhost:8000/api/v1/analysis/upload

# Start analysis job
curl -X POST http://localhost:8000/api/v1/analysis/start \
  -H "Content-Type: application/json" \
  -d '{"document_id":"<id>"}'

# Stream live progress
curl -N http://localhost:8000/api/v1/analysis/<job_id>/stream

Useful scripts

Command Description
npm run dev Start frontend dev server on port 8080.
npm run api Start FastAPI (backend/main.py) on port 8000 with reload.
npm run build Production build (client + SSR).
npm run preview Preview production build locally.
npm run lint Run ESLint.
npm run format Format repository with Prettier.

Python tests:

cd backend
pytest -q

Repository structure

.
├─ backend/
│  ├─ api/v1/routes/analysis.py
│  ├─ pipeline/
│  │  ├─ graph.py
│  │  ├─ state.py
│  │  ├─ judicial_from_contract.py
│  │  └─ nodes/
│  ├─ models/
│  ├─ services/
│  ├─ tools/gemini_grounding.py
│  ├─ tests/
│  ├─ analysis_cache/
│  ├─ config.py
│  ├─ main.py
│  └─ requirements.txt
├─ src/
│  ├─ routes/
│  ├─ components/
│  ├─ lib/
│  ├─ router.tsx
│  └─ styles.css
├─ vite.config.ts
├─ wrangler.jsonc
└─ package.json

Notes

  • backend/.env is gitignored; never commit secrets.
  • analysis_cache/ stores SHA-256-based cached outputs for repeat runs.
  • PDF export depends on docx2pdf (Microsoft Word required on Windows/macOS).

Credits

Nesmos.ai - Paris Fintech Hackathon 2026.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors