Inspiration
Democracy has a UX problem.
During the Ontario wildfires, many of us saw a spike in concern about air quality, emergency preparedness, and climate policy. People had strong opinions and wanted change, but the administrative gap between public opinion and government action killed momentum before anything could actually change.
Even when citizens cared deeply about an issue, taking action often required navigating complicated government websites, understanding dense political vernacular, and knowing where to begin in the first place.
At the same time, social platforms have become incredibly good at helping people discover content aligned with their interests. It has never been easier to form an opinion, yet it has never been harder to act on it.
This led us to ask: What if social action was as easy as scrolling?
What it does
Our platform makes civic engagement easier by helping citizens discover, understand, and take action on Canadian government petitions.
- Users share their location and interests through free-form text. AI analyzes their responses to recommend petitions that match their concerns and priorities.
- Users browse petitions through a swipe-based interface inspired by apps like Tinder. Each petition card highlights an accessible petition summary, sponsoring Member of Parliament (MP), current number of signatures, and relevant tags.
- The recommendation algorithm starts off with the user's inputted interests and region. The system improves recommendations by learning from user engagement, including petitions viewed, petitions supported, and petitions skipped.
- After supporting a petition, users can choose from three ways to participate:
- Sign the petition: redirect users to the official Canadian government petition website.
- Contact their MP: Uses AI to draft a personalized email with the user's local MP contact information.
- Share the cause: Generates a social media post that users can copy and share.
How we built it
We built the app on Next.js 16 (App Router) with React 19 and Tailwind CSS, structured around a swipeable card interface for Canadian federal petitions.
- Data pipeline: We pull petition data directly from the House of Commons' official XML feed, parse it with fast-xml-parser, and store it in MongoDB.
- Personalized matching: After a short onboarding flow captures a user's interests, we use Gemini API's vector embeddings to semantically match those interests against petitions, returning a ranked, personalized feed for the swipe screen.
- Civic action layer: For any petition a user wants to act on, we look up their Member of Parliament by postal code using Open North's Represent API, resolving their federal riding, MP name, and contact email. From there, our /api/generate-draft route calls Backboard to generate a tailored email to the MP and a shareable social media post in a single streamed response, parsed via marker-delimited output so the UI can render both pieces as they arrive.
- Auth & persistence: User sessions and onboarding preferences are handled with Auth0, and swipe history/saved petitions are persisted per-user in MongoDB so the feed and saved gallery stay in sync across visits.
- Frontend: The core UX is a Tinder-style swipe deck (SwipeScreen, PetitionCard) with dedicated views for saved petitions, an archive, and per-action detail pages, all sharing a single AppShell layout.
Challenges we ran into
- The primary API for petition data was unavailable, requiring us to switch to downloading XML data directly from the House of Commons.
- We encountered some difficulties connecting to external APIs, specifically managing access keys and authentication.
- We had to pivot from Backboard to the Gemini API to leverage vector databases for our recommendation algorithm.
Accomplishments that we're proud of
- Built a functional full-stack product with tangible use cases.
- Creation of a polished, user-friendly UI.
- Successful development of our matching algorithm.
- Implemented key features including accessible petition descriptions and intuitive user flow.
- Effective project management (Notion) + excellent collaboration
What we learned
- Most of the team was new to Next.js and database management.
- Implementing and utilizing agentic workflows.
- Recognizing the practical limitations of AI tools.
- How to survive on two hours of sleep.
What's next for SwipeForChange
- Expanding civic data sources by integrating more databases and sources beyond Canadian government petitions to give users a broader view of opportunities to participate (e.g. connecting users with relevant local, provincial, and global initiatives).
- Our AI-powered impact recommendations can be even smarter by identifying which petitions, representatives, or civic actions are most likely to create meaningful change.
- Integrating external sources and additional information about each petition.
- Improving desktop UI for those who enjoy doomscrolling on their computer.
Log in or sign up for Devpost to join the conversation.