Inspiration

The inspiration came from two main observations:

During our internships and academic experiences, we noticed that many contracts and agreements are intimidatingly complex, even for people with technical backgrounds.

AI models like GPT can understand natural language deeply, which made me think: why not leverage them to simplify legal text for everyone?

I wanted a tool that could help users quickly understand obligations, deadlines, and risks without spending hours reading.

What it does

Contracts are essential in business, legal, and personal contexts, but they are often long, dense, and filled with jargon. Many people struggle to read and fully understand them. Inspired by the idea of making legal information more accessible, I decided to build Contract Simplifier, a web application that uses AI to summarize and simplify contracts into plain English.

The project leverages OpenAI’s GPT model as a backend service to parse contract text or PDF files, generate summaries, and highlight key clauses. The frontend interacts with the backend through a clean REST API, allowing users to upload files or paste contract text and receive a simplified summary in real time.

How we built it

Backend setup:

  • Created a Spring Boot application with a ContractController for endpoints and a ContractService for business logic.

  • Used OpenAIClient to interact with GPT for text simplification.

  • Used FileParser to convert PDFs to text.

Endpoints:

POST /api/simplify/text — Accepts raw text and returns simplified summary.

POST /api/simplify/upload — Accepts PDF files, extracts text, then summarizes.

Frontend (optional for hackathon):

  • A simple form allowing users to upload contracts or paste text.

  • Fetches results from backend and displays summaries.

Integration:

  • Connected file parsing and GPT calls through the service layer.

  • Added error handling for missing API keys, invalid files, and large documents.

Challenges we ran into

  • Java package structure: Initially, I faced multiple ClassNotFoundException and compilation errors because my classes were not placed correctly according to their packages. I learned that Java is extremely strict about folder hierarchy matching package names.

  • Duplicate classes: Accidentally having the same public class in multiple files caused build failures.

  • API integration: Handling OpenAI API calls asynchronously and parsing GPT responses was tricky, especially for PDFs with complex layouts.

  • File uploads and text extraction: PDFs with tables, images, or non-standard encodings required additional parsing logic.

Accomplishments that we're proud of

  • Successfully built a fully functional backend in Java Spring Boot that accepts contract text or PDF files and returns simplified summaries in real time.

  • Integrated OpenAI GPT into the backend, enabling AI-powered understanding of complex legal language.

  • Implemented robust PDF parsing with Apache PDFBox, handling multi-page documents and extracting text accurately.

  • Overcame challenging Java package and folder structure issues, ensuring a clean, maintainable, and compilable project.

What we learned

How to structure a Java Spring Boot project with proper packages, controllers, services, and utility classes.

  • How to integrate OpenAI GPT into a backend application and handle API requests securely.

  • Techniques for parsing PDF files with libraries like Apache PDFBox to extract text for AI processing.

  • The importance of folder/package consistency in Java, and how small mismatches can break builds.

  • How to design and test REST endpoints for both text and file uploads.

  • Practical experience applying AI language modeling concepts to real-world text simplification tasks.

What's next for SimplifyContract

Ideally, we can allow for multiple document formats to be analyzed as well increase the amount of languages that the application can handle so it can be used in regard with a greater majority of people around the people.

Built With

Share this project:

Updates