Inspiration

When you are looking for a legislative bill, the last thing you want is to scroll through pages of Google to find it and then not be able to understand what the bill says. We wanted to create an application that centralizes bills from all 50 U.S. states and also helps people understand the bills to promote intellectual vitality about policy.

What it does

LegisPal is a comprehensive AI tool that is designed to improve civic engagement by making legislation more accessible and easy to understand. Here is what LegisPal offers:

  1. 24/7 Chatbot Support: Our chatbot is available around the clock to assist anyone with any questions they have about any bill or legislation in general.

  2. Bill Searching: Users can now easily search for bills by just entering the name of the bill or the bill number.

  3. Bill Analyzer: Easily find key words and ideas in bills to quickly understand the gist of a bill.

How we built it

We built LegisPal as a modern legislative tracking platform using Next.js 14 with TypeScript, creating the UI with Tailwind CSS and Shadcn UI components. The application integrates with the OpenStates API developed from the nonprofit Plural Policy to fetch comprehensive bill data across jurisdictions, while implementing a SQLite database for efficient local caching to optimize API usage and store user interactions such as votes. Our architecture follows a clean separation of concerns with server-side rendering for initial content delivery, client-side interactivity for voting features, and a RESTful API layer to manage data flow.

Challenges we ran into

The API's strict rate limits (250 requests per day and 10 per minute) repeatedly constrained our development workflow and required us to implement an intelligent caching system with SQLite to minimize redundant requests. We also struggled with the inconsistent structure of bill data across different jurisdictions. Some bills contained extensive metadata including vote records and document links, while others had minimal information, forcing us to have to build flexible UI components for these variations.

Accomplishments that we're proud of

  • In 24 hours, we built LegisPal, the first accessible AI powered tool with thorough and friendly UX, and detailed output
  • This projected helped us understand and practice prompt-engineering, something that is important for future AI-driven applications.
  • Our Claude prompts are tuned to give us clear and decisive results, which shows our understanding and growth throughout 24 hours.

What we learned

  • Legislative bill engagement is relatively inaccessible.
  • Simplicity is what matters. Keeping things simple helps improve understanding.
  • Structure of prompting LLMs matter. This will improve the result of each prompt.

What's next for LegisPal

  • Predictor of whether or not a bill will get passed based on the political party in office and the subject of the bill.
  • Viewing current bills in progress that are either being proposed or in progress on being passed or not.
  • Anonymous user forums to foster a community of civic engagement that allows people to speak their opinions.

Built With

Share this project:

Updates