Inspiration
Our inspiration for LegisLink came from our shared desire to learn more about the local politicians representing us. We both voted earlier this month, and were thoroughly disappointed in the lack of available information about candidates. There was an abundance of websites that explained in detail about federal government races, but surprisingly little on the New York State Senate, State Assembly, and other district-specific positions. Because of this, we decided to create LegisLink to make information about elected officials and their policies more accessible and engaging!
What it does
LegisLink is a web app that allows users to find their representatives based on their location and message with an AI-powered chatbot for personalized insights on each representative's views and policies. With LegisLink, users can receive detailed information on specific politicians, including their legislative history, stance on issues, and even a general analysis of their policy trends. This tool serves as a unique blend of location-based search and intelligent interaction, helping users better understand the political landscape and what affects them the most.
How we built it
We built LegisLink using Deno Fresh, a typescript-based interface that allowed for easy deployment to the web. The app uses the Gemini text-based API to provide intelligent, detailed responses about politicians based on data from policy records and legislative actions. We obtained policy records through the Open Legislation API created by the New York State Senate and the Congress.gov API, mainly focusing on New York to start. We also integrated location tracking functionality to determine users' geographic positions and find their representatives using the Open States API. Our UI features a chatbox that dynamically updates with responses, and provides users with answers to their questions about politicians and candidates.
Challenges we ran into
One of the main challenges we faced was working with all the API's and handling their specific framework. It initially took a large amount of time to find API's that did what we wanted, especially for the information about local candidates (which is more reason why this project is useful and important!). Once we did, we had to figure out how to extract a politician's name from user input, find info from the API's, and send it back to Gemini for a response. Common issues like different API's treating names different (i.e last name then first vs first name then last, nicknames, middle names, etc.) were incredibly tedius and cost a lot of time. Another issue we encountered was about prompt engineering. It is incredibly hard to get an AI model to reproduce outputs for the same inputs. We had to experiment with different prompts and what to add before the user's message to ensure the AI outputted the requested info in a good format.
Accomplishments that we're proud of
This was both of our first hackathon ever, so we are honestly proud that we were able to make a project that works and serves a purpose. We thought of a topic that we are both interested in, and were able to implement it almost exactly as we wanted. We rarely have had practical experience coding like this hackathon, which we are incredibly happy about. We built an interactive platform that merges location-based data retrieval with AI-powered insights, which (we think) is very good for our first try, and it can only get better as we get more experience. Despite the challenges, we successfully optimized the user experience to be both informative and user-friendly, allowing for quick interactions, valuable insights and making complex political information more accessible
What we learned
Throughout this project, we learned a great deal about API integrations with Deno and handling asynchronous processes efficiently. Our work with Gemini AI models taught us the importance of careful model selection and optimization to achieve responsive answers. We also gained experience in UI/UX design for dynamic web applications, learning how small adjustments like loading animations can improve user engagement during data processing.
What's next for LegisLink
Our first goal for the future would be to include other states beyond just New York by finding similar API's and implementing them in a similar way. Next, we aim to enhance LegisLink's capabilities by incorporating more detailed legislative data and expanding our AI's scope to include predictions and analysis based on real-time data. We also plan to add features like personalized notifications for new bills or policies from specific representatives and expand our data sources to provide a complete and comprehensive view of state & local governance. Ultimately, we envision LegisLink as a complete hub for civic engagement and political insight, empowering citizens to stay informed and connected to their representatives.
Built With
- congressgovapi
- css
- deno
- gemini
- html
- openlegislationapi
- openstatesapi
- tailwind
- typescript
Log in or sign up for Devpost to join the conversation.