Inspiration

Government policies are often long, dense, and hard to understand for the general public. I wanted to create a tool that simplifies complex policies, highlighting key points, benefits, and drawbacks so that anyone can grasp their essence quickly. The inspiration came from noticing how many people struggle to read and analyze policy documents effectively, and the idea of using AI to make this process faster and more accessible excited me.

What it does

PolicySimplify allows users to paste a policy text or upload a policy document, and the AI returns a plain-English summary along with 3 pros and 3 cons. This helps users quickly understand policies without needing to read dense legal language.

How we built it

The project is a web app where users can paste a policy text or upload a policy document, and the AI returns a plain-English summary along with 3 pros and 3 cons.

  1. Built a Next.js 15 app with TypeScript.
  2. Implemented serverless API routes to call the Gemini AI model.
  3. Used GoogleAuth with service account credentials to authenticate API requests.
  4. Parsed the AI response to clean Markdown, extract pros and cons, and return structured JSON.
  5. Designed a responsive React frontend using TailwindCSS and Radix UI components.

Challenges we ran into

  • Handling authentication securely in a serverless environment.
  • Parsing AI-generated text reliably into pros and cons.
  • Ensuring proper error handling when the AI fails or returns unexpected output.

Accomplishments that we're proud of

  • Successfully integrated Google Gemini AI for natural language understanding.
  • Built a fully functional web app with real-time text analysis.
  • Made policy analysis accessible to non-experts in just a few seconds.
  • Structured AI responses into a clean, easy-to-use JSON format for the frontend.

What we learned

Throughout this project, I learned how to integrate Google’s Generative Language API with a Next.js app, handle authentication securely using service accounts, and process AI-generated text into structured summaries. I also strengthened my skills in TypeScript, serverless API routes, and text parsing.

What's next for PolicySimplify

-Add support for more document formats like scanned images.

  • Improve AI prompts to handle longer policies and edge cases more accurately.
  • Introduce user accounts to save past analyses.
  • Explore summarization for multiple languages.
  • Add charts and visualizations for policy pros and cons.

Built With

Share this project:

Updates