Project source code

https://github.com/xucian/mores.ai

Inspiration

Legal research is notoriously time-consuming and expensive. Lawyers spend hours sifting through case files, searching for precedents, and manually cross-referencing legal codes. I wanted to build a tool that combines the visual, collaborative feel of Figma with the intelligence of modern AI to transform how lawyers organize and analyze their cases. The goal: make legal work faster, cheaper, and more accessible - Pareto principle applied to law.

What it does

mores.ai is ai-based virtual desktop for lawyers. it saves lawyers time with summarizing docs and connecting the dots between previous cases, current case, precedents, jurisdiction -- all under a very intuitive interface, while still staying human-centric.

features:

  • infinite canvas: drag-and-drop documents, create groups, zoom/pan through your entire case at a glance
  • smart document processing: automatically summarizes legal documents and extracts parties, dates, and key issues
  • rag-powered q&a: ask questions about your case and get answers with source citations from your documents
  • legal code library: instantly access up-to-date federal and state penal/criminal codes with automatic cross-referencing
  • precedent search: find similar cases with jurisdiction, facts, and issues similarity scoring
  • citation verification: check if precedents are still good law (current/questioned/overruled)

How we built it

frontend: sveltekit 5 + tailwindcss + panzoom for the infinite canvas experience backend: fastapi (python) with postgresql and pgvector for vector similarity search ai stack:

  • openai gpt-4o-mini as fallback for large contexts
  • daytona for sandboxed (private) web searches and secure pdf processing
  • coderabbit for preventing logical inconsistencies before pushing code
  • browser use for testing the app's ui while coding!
  • galileo for llm observability
  • sentry for error monitoring
  • sentence-transformers for embeddings
  • docker for postgresql with pgvector extension
  • agent search with duckduckgo for legal research
  • beautifulsoup for actually reading the search results

Challenges we ran into

  1. rag performance: balancing context window size with response quality - large legal documents quickly exceed token limits
  2. precedent matching: designing a similarity scoring system that accounts for jurisdiction, facts, legal issues, and outcomes
  3. citation verification: building a reliable system to check if cases are still good law (not overruled or questioned)
  4. canvas ux: creating an intuitive infinite canvas that handles dozens of documents without performance degradation

Accomplishments that we're proud of

  • full-stack mvp in record time: from idea to working prototype with real legal ai capabilities
  • smart observability: integrated galileo to track every llm call, enabling continuous optimization
  • canvas-based ux: built an intuitive visual interface that feels like figma for legal work
  • production-ready infrastructure: docker, alembic migrations, proper error handling, and monitoring from day one
  • dry architecture: clean separation between frontend, backend, and ai agent services

What we learned

  • latex in legal docs: many court filings use complex math notation that requires special handling
  • vector search nuances: pgvector is powerful but requires careful tuning for legal document embeddings
  • canvas performance: svelte 5's reactivity system handles complex canvas state beautifully
  • first-principles thinking: focusing on the 80-20 (addressing the biggest pain points) led to faster shipping
  • for demo-ing in a hackathon: it is ok to use demo hardcoded examples where time didn't allow fully implementing the feature -- meeting the deadline is more important than having a complete product no one sees

What's next for mores.ai

week 1: legal code library, auto cross-referencing, up-to-date-ness checker, agentic adversarial fact checker using multipel llms week 2: multi-document rag improvements, precedent search refinement, citation graph visualization week 3: adversarial simulation of court cases with virtual assistants using various llms, judges, evaluators month 1: collaborative sessions, real-time editing, integration with court filing systems long-term: mobile app, voice dictation, automated brief generation, api for third-party integrations

Built With

  • alembic
  • alembic-postgresql
  • beautiful-soup
  • beautifulsoup4
  • browser-use-docker
  • browseruse
  • claude
  • code-rabbit-date-fns
  • coderabbit
  • date-fns
  • daytona
  • daytona-sdk
  • docker
  • fastapi
  • httpx
  • intel-galileo
  • javascript-sveltekit-5
  • langchain
  • langchain-galileo
  • lucide-svelte
  • openai
  • panzoom
  • panzoom-fastapi
  • pgvector
  • pgvector-friendliai
  • postgresql
  • pypdf
  • python
  • sentence-transformers
  • sentry
  • sqlalchemy
  • svelte
  • tailwindcss
  • typescript
Share this project:

Updates