Skip to content

Repository files navigation

⚖️ LegalLens — U.S. Legal Research Made Simple

LegalLens Screenshot

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.


✨ Features

  • 🔍 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

🛠️ Tech Stack

LayerTechnology
FrameworkNext.js 16 (App Router)
LanguageTypeScript
DatabasePostgreSQL via Neon
ORMDrizzle ORM
StylingTailwind CSS 4
AuthJWT + bcrypt (custom, no vendor lock-in)
ScrapingCheerio
DeploymentVercel

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • A PostgreSQL database (we recommend Neon — free tier works great)

Setup

# 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 dev

Open http://localhost:3000 and click "Try Demo Account" to explore with pre-loaded data.


⚙️ Environment Variables

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-here

🗺️ Roadmap

We 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

🤝 Contributing

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.

How to Contribute

  1. Fork the repository
  2. Create a branch for your feature (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to your branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Areas Where We Need Help

AreaSkills Needed
🔍 Search qualityNLP, web scraping, data engineering
🎨 UI/UXReact, Tailwind, accessibility, design
📱 MobileReact Native or PWA experience
🧠 AI featuresLLM integration, summarization, embeddings
📖 DocumentationTechnical writing, legal knowledge
🧪 TestingJest, Playwright, QA
🌐 i18nTranslation, internationalization
♿ AccessibilityWCAG compliance, screen reader testing
🔒 SecurityAuth hardening, rate limiting, input sanitization

First-Time Contributors

Look for issues tagged good first issue — these are specifically scoped for newcomers.

See CONTRIBUTING.md for detailed guidelines.


💖 Sponsorship

If LegalLens helps you or you believe in making legal information accessible, consider sponsoring the project:

Sponsor

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

📄 License

MIT License — see LICENSE for details.

TL;DR: Use it however you want, commercially or otherwise. Just include the copyright notice and give credit.


🙏 Acknowledgments

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 ⭐

About

Free, open-source U.S. legal research platform. Search federal and state laws, scrape court cases, and build your research library.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages