115 Commits

Author SHA1 Message Date
c83dcd660e Update Paperclip DB URL for Docker migration
Paperclip moved from embedded PG (localhost:54329) to Coolify-managed
PostgreSQL container (10.0.2.13:5432).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 11:17:57 +00:00
e5dc037088 Create Paperclip issue + plugin state link when opening new case
Wizard now creates: project + issue (CMP-N) + plugin_state entry
linking the issue to the legal-ai case number. This enables the
sync job in the marcusgroup.legal-ai plugin to track case status.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 13:44:49 +00:00
40406b5fde Keep original filename when doc_type is auto instead of 'auto-{case}.ext'
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 12:52:18 +00:00
561a4f7bcf Allow .md file uploads alongside PDF, DOCX, RTF, TXT
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 12:44:30 +00:00
10071d7f18 Prevent duplicate Paperclip projects: check existing before creating
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:21:06 +00:00
5fc52ce530 Switch to cases/{new,in-progress,completed}/ directory structure
Replace single CASES_DIR with find_case_dir() that searches across
all status directories. New cases created in cases/new/{number}/.

Config: CASES_BASE, CASES_NEW, CASES_IN_PROGRESS, CASES_COMPLETED
Docker: added -v /home/chaim/legal-ai/cases:/cases volume mount

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 10:45:47 +00:00
dc6026100c Improve case-not-found error: show clear message with create button
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 10:27:36 +00:00
0dfb42ab00 Fix env var loading for Docker: support GITEA_TOKEN fallback, configurable Paperclip DB URL
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 10:18:24 +00:00
0593fe9b01 Add interactive case creation wizard + document upload with auto-rename
New SPA UI with 4 views:
- Case list (#/) with status cards and document counts
- New case wizard (#/new) with 4-step form: details, parties, schedule, review+create
- Case view (#/case/:id) with grouped documents and drag-drop upload with tagging
- Legacy upload (#/upload) for backwards compatibility

Auto-creation pipeline in wizard step 4:
1. Creates case in legal-ai DB with local git repo
2. Creates Gitea repo in 'cases' org and pushes initial commit
3. Creates Paperclip project via direct DB insert

Document upload with smart rename:
- scan_001.pdf -> כתב-ערר-קובר-1130-25.pdf
- Based on doc_type + party_name + case_number

New files:
- web/gitea_client.py: Gitea REST API client
- web/paperclip_client.py: Paperclip embedded DB client

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 10:17:24 +00:00
cb41867bc9 Remove din-leumi: fully separate into standalone service
- Removed din-leumi imports, endpoints, and processing from app.py
- Removed bundled din-leumi source from repo
- Simplified Dockerfile (no din-leumi dependency)
- din-leumi now runs as its own Coolify application

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:34:35 +00:00
316dd2aefb Redesign upload UI + update Gitea org references
web/static/index.html: Complete redesign with clean modern layout:
- RTL Hebrew throughout
- Two-column layout: upload zone + pending files
- Cleaner drag & drop with visual feedback
- Improved classification form with radio buttons
- Better progress tracking display
- Status bar with system metrics

CLAUDE.md: Updated Gitea URL to new org ezer-mishpati/legal-ai

Closes ezer-mishpati/legal-ai#1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:10:18 +00:00
59bb471368 Add expanded workflow API endpoints and update CLAUDE.md
New endpoints: outcome, direction, claims, QA validation, learning loop,
document text retrieval. Updated Dockerfile and project documentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:04:28 +00:00
df7cc4f5a5 Add REST API endpoints for Paperclip integration
Expose case management, search, workflow status, and drafting tools
via HTTP endpoints for the Paperclip plugin to consume.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 21:05:39 +00:00
98311eef12 Add unified upload UI with Din Leumi support and auto metadata extraction
Upload interface now supports three targets:
- Ezer Mishpati case documents
- Ezer Mishpati training corpus
- Din Leumi NI court decisions (new)

Din Leumi uploads auto-extract metadata (court, judge, date, parties,
topics, outcome) using Claude API, eliminating manual form filling.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 16:07:16 +00:00
6f515dc2cb Initial commit: MCP server + web upload interface
Ezer Mishpati - AI legal decision drafting system with:
- MCP server (FastMCP) with document processing pipeline
- Web upload interface (FastAPI) for file upload and classification
- pgvector-based semantic search
- Hebrew legal document chunking and embedding
2026-03-23 12:33:07 +00:00