LegalDocs AI is a professional-grade legal intelligence platform that transforms complex court cases, contracts, and statutes into clear, actionable summaries in seconds. Built for speed and reliability, it uses a RAM-Lite Architecture to deliver high-performance legal analysis even on resource-constrained hosting environments.
- Instant Legal Analysis: Process complex PDFs using state-of-the-art models via OpenRouter.
- 🔍 Verifiable Sources: Every claim in the summary is grounded with inline citations and transparent page references.
- 💾 Permanent Persistence: Full accounts and document history managed via PostgreSQL (Neon).
- ⚡ RAM-Lite Optimization: Custom "Stuffing" RAG logic designed to run efficiently on 512MB RAM environments like Render.
- 🛡️ Secure Auth: JWT-protected dashboard with organizational data isolation.
- 📄 Multi-format Exports: Download analysis reports in PDF, DOC, or TXT formats.
| Layer | Tools / Frameworks |
|---|---|
| Frontend | React 18, TypeScript, Vite, TailwindCSS, Shadcn/UI |
| Backend | FastAPI, Python 3.10+, SQLAlchemy, Pydantic |
| Database | PostgreSQL (Production via Neon), SQLite (Local Dev) |
| LLMs | Arcee-ai Trinity Large (via OpenRouter) |
| Deployment | Netlify (Frontend), Render (Backend) |
LegalDocs-AI/
├── backend/
│ ├── main.py # FastAPI Entry Point
│ ├── summarizer.py # persistence & History Logic
│ ├── model_pipeline.py # RAM-Lite AI Core (Stuffing RAG)
│ ├── auth.py # JWT Authentication
│ ├── models.py # Database Schema (Postgres/SQLite)
│ └── requirements.txt # Optimized Dependency List
│
├── client/
│ ├── App.tsx # Main Router
│ ├── global.css # Design System & Animations
│ ├── components/ # Reusable UI Blocks (Shadcn)
│ ├── pages/ # Dashboard, SignIn, Features
│ └── lib/ # Utility functions
│
└── render.yaml # Infrastructure as Code (Blueprint)- Python 3.10+
- Node.js 18+
- OpenRouter API Key
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Set DATABASE_URL in .env (defaults to local sqlite)
uvicorn main:app --reloadnpm install
npm run devCreate a .env file in the root directory:
# OpenRouter API
OPENROUTER_API_KEY=your_key_here
OPENROUTER_MODEL=arcee-ai/trinity-large-preview:free
# Database
DATABASE_URL=postgresql://user:pass@host/dbname
# JWT Security
SECRET_KEY=your_random_secret
ALGORITHM=HS256Developed by @prakritea.
Special thanks to OpenRouter and the FastAPI community.
LegalDocs AI — Grounded Legal Intelligence at Scale. your fingertips.*
