## Inspiration

Navigating the world of legal and financial documents often feels like walking through a minefield blindfolded. Whether it’s a rental agreement, a complex medical bill, or an employment contract, the "fine print" is designed to be difficult for the average person to understand. I wanted to build a "Butler" that doesn't just manages documents , but acts as a proactive legal shield. Legal Lens was born from the idea that everyone—regardless of their background or geography—deserves to know exactly what they are signing.

## What it does

Legal Lens is an AI-powered personal legal assistant that bridges the gap between complex legalese and human understanding.

  • Analyze: Users upload any PDF or image of a document to receive an instant, plain-language summary of the most critical terms.
  • Red-Flag Detection: The app proactively scans for "vampire" clauses, unfair penalties, and deviations from standard global norms.
  • Full-Cycle Creation: Users can generate fair, balanced templates for common scenarios (like leases or disputes) from scratch, ensuring they start on equal footing.
  • Global Context: While it understands regional nuances, it is built for a global audience, helping users everywhere spot overcharges in bills or exploitative terms in contracts.

## How we built it

The project is built on the cutting edge of the Flutter + Serverpod stack:

  • Frontend: A polished Flutter mobile app utilizing Material 3 for an intuitive, "Butler-like" user experience.
  • Backend: Powered by Serverpod 3, leveraging its robust RPC system for lightning-fast communication between the app and the server.
  • Logic: We utilized Serverpod’s Future Calls to handle heavy AI processing asynchronously, ensuring the app remains responsive while analyzing complex documents.
  • Database: PostgreSQL (via Serverpod) stores user document history and a library of fair-standard templates.

## Challenges we ran into

One of the biggest hurdles was configuring the development environment on Windows, particularly managing SDK paths and terminal permissions. Additionally, teaching an AI to recognize "unfairness" across different document types required careful prompt engineering to ensure the "Butler" remained a helpful assistant and not a rigid judge. Overcoming these technical roadblocks with Serverpod's streamlined CLI was a massive learning experience.

## Accomplishments that we're proud of

We are incredibly proud of creating a truly full-stack "Butler." Legal Lens doesn't just show information; it processes it, stores it, and helps the user act on it. Achieving a working connection between a local Flutter app and a Serverpod backend—complete with a running database and functional endpoints—is a milestone we are thrilled to have reached within the hackathon timeline.

## What we learned

This hackathon was a deep dive into the power of Dart on the backend. We learned how Serverpod simplifies the "bridge" between server and client through automated code generation, allowing us to focus on the problem we were solving rather than the boilerplate code.

## What's next for Legal Lens

The vision for Legal Lens is to move beyond simple analysis into automated negotiation. We plan to integrate real-time chat features where the Butler can draft and send counter-emails directly to landlords or service providers. We also aim to expand our template library to cover more specific international laws, making "Legal Clarity" a global standard.

Built With

Share this project:

Updates