LegalLens is a free, open-source legal research platform that helps anyone search federal and state laws, scrape court cases from public sources, and build a personal research library — all in one place.
Legal information should be accessible to everyone. Whether you're a law student, paralegal, self-represented litigant, journalist, or just someone trying to understand your rights — LegalLens gives you the tools that used to cost hundreds per month.
- 🔍 Multi-Source Legal Search — Scrapes and aggregates results from public legal databases (Google Scholar, CourtListener, Justia, Cornell LII)
- 🏛️ All 50 States + Federal — Complete U.S. jurisdiction coverage
- 📚 Case Library — Save, organize, and annotate search results into folders
- 📝 Research Notes — Built-in note-taking system with jurisdiction and category tagging
- 🔐 User Accounts — Secure authentication with personal research history
- 📊 Research Stats — Track your research activity and saved cases
- ⚡ Demo Mode — Try the full platform instantly without signing up
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| Database | PostgreSQL via Neon |
| ORM | Drizzle ORM |
| Styling | Tailwind CSS 4 |
| Auth | JWT + bcrypt (custom, no vendor lock-in) |
| Scraping | Cheerio |
| Deployment | Vercel |
- Node.js 18+
- A PostgreSQL database (we recommend Neon — free tier works great)
# Clone the repo
git clone https://github.com/Ocean82/LegalLens.git
cd LegalLens
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your database URL
# Push the database schema
npx drizzle-kit push
# Start the dev server
npm run devOpen http://localhost:3000 and click "Try Demo Account" to explore with pre-loaded data.
Create a .env.local file in the project root:
# PostgreSQL connection string (Neon, Supabase, or local)
DATABASE_URL=postgresql://user:password@host/database?sslmode=require
# JWT secret for authentication (change this!)
JWT_SECRET=your-secret-key-hereWe have big plans. Here's where LegalLens is headed:
- AI-powered case summarization — Quick plain-English summaries of complex rulings
- Citation graph — Visualize how cases cite each other
- Alerts & monitoring — Get notified when new cases match your research areas
- Collaborative workspaces — Share research with colleagues or study groups
- PDF export — Generate formatted research briefs
- Browser extension — Save cases from any legal site directly to your library
- API access — Build your own tools on top of LegalLens data
- Mobile app — Research on the go
- Multi-language support — Make legal research accessible worldwide
We welcome contributions of all kinds! This project exists to make legal research accessible — and we need help from developers, designers, legal professionals, and writers.
- Fork the repository
- Create a branch for your feature (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
| Area | Skills Needed |
|---|---|
| 🔍 Search quality | NLP, web scraping, data engineering |
| 🎨 UI/UX | React, Tailwind, accessibility, design |
| 📱 Mobile | React Native or PWA experience |
| 🧠 AI features | LLM integration, summarization, embeddings |
| 📖 Documentation | Technical writing, legal knowledge |
| 🧪 Testing | Jest, Playwright, QA |
| 🌐 i18n | Translation, internationalization |
| ♿ Accessibility | WCAG compliance, screen reader testing |
| 🔒 Security | Auth hardening, rate limiting, input sanitization |
Look for issues tagged good first issue — these are specifically scoped for newcomers.
See CONTRIBUTING.md for detailed guidelines.
If LegalLens helps you or you believe in making legal information accessible, consider sponsoring the project:
Sponsorship funds go directly toward:
- Server and database costs
- Adding AI-powered features (summarization, citation analysis)
- Expanding jurisdiction coverage
- Keeping the platform free for everyone
MIT License — see LICENSE for details.
TL;DR: Use it however you want, commercially or otherwise. Just include the copyright notice and give credit.
Built with love for everyone who needs legal information but can't afford premium research tools.
Special thanks to the open data efforts at CourtListener, Cornell LII, and Justia that make projects like this possible.
⭐ Star this repo if you believe legal research should be free and accessible ⭐
