ClaimFlight
The Automated Passenger Rights Engine & Statutory Restitution Pipeline
The Story & Inspiration
The first time I flew to university from home, my flight was delayed by 3 hours, causing me to miss my layover. To make matters worse, the airline lost my suitcases. A standard 22-hour journey spiraled into a grueling, 40+ hour ordeal. I barely received any compensation for the massive disruption, and my luggage arrived a whole week later.
I quickly realized that airlines deliberately count on passengers lacking the legal knowledge, energy, or tools to fight for the compensation they are rightfully owed. I built ClaimFlight to fundamentally level the playing field, turning the nightmare of dealing with airlines into a streamlined, automated process that fights back for the regular consumer.
What It Does
ClaimFlight is an end-to-end automated passenger rights engine and statutory restitution pipeline. By simply pasting a raw airline delay/cancellation email or uploading a boarding pass, the engine completely automates corporate pushback:
- Intelligent Extraction & Routing: It instantly parses unstructured text or images, extracts flight parameters, and dynamically routes the disruption to the correct legal jurisdiction (Canada APPR, EU261, or US DOT) to calculate exact statutory payouts.
- Live Stay22 Restitution Injector: Under passenger rights laws, airlines must pay for unexpected overnight hotel stays. ClaimFlight dynamically queries live local accommodation inventory and average baseline rates via Stay22 for the stranded city and check-in date, appending these real-time numbers directly into the legal claim.
- The Dispute Rebuttal Engine: If an airline fires back with a boilerplate "weather" or "mechanical safety issue" excuse to avoid paying, you can drop their rejection email right back into the app. Our rebuttal system identifies their operational loopholes and auto-generates a stern, case-law-backed "Second Notice: Escalation Rebuttal."
- Chexy-Style Ledger Compliance: To ensure responsible tracking, every claim generates a structured, synthetic financial ledger displaying bank transit routes, unique passenger references, and real-time resolution states (e.g.,
PENDING_DISPUTE_RESPONSE,UNDER_REVIEW). - Zero-Orphan Legal PDF Outputs: The pipeline compiles your entire claim into a flawlessly formatted, left-aligned, exact 2-page legal demand letter ready to print or email directly to the airline's legal department.
How It Was Built
ClaimFlight was designed as a pure software utility focusing heavily on data engineering, asynchronous speed, and robust programmatic logic:
- FastAPI Backend: Built a high-performance, asynchronous Python web API to orchestrate the multi-step data pipelines and legal calculation blocks.
- Hybrid Extraction Layer (OpenRouter + Local Heuristics): To guarantee 100% service availability and manage upstream LLM rate-limiting, I engineered a hybrid data extraction pipeline. It utilizes OpenRouter to query fast LLM models using strict Pydantic JSON schemas, backed up by a robust, local regex-based parsing engine.
- Stay22 Integration: Leveraged Stay22 parameter structures to fetch real-time local hotel availability based on the arrival city and date of disruption, mapping affiliate-tagged listview links seamlessly.
- Mock Settlement Ledger: Implemented a secure sandbox escrow and payment tracker adhering to advanced fintech logic to monitor outstanding cash claims.
- ReportLab PDF Layout Manager: Programmatically constructed a custom document layout manager in Python using ReportLab, mathematically adjusting line leadings and table paddings to prevent overlapping text and maintain a strict 2-page design constraint.
Challenges Faced & Overcome
- Navigating the Solo Hackathon Grind: This being my third hackathon overall but my absolute first time competing completely solo, it was a steep learning curve managing the entire product lifecycle under a tight 36-hour clock. Without a team to divide up tasks, it was just me and Gemini going back and forth, trying to get things done.
- Deterministic AI Formatting: Forcing LLMs to strictly adhere to valid JSON outputs for the legal parser required intense prompt engineering and structural validation wrappers. Building the secondary local regex fallback solved this seamlessly.
- Translating International Law: Air passenger protection regulations are notoriously dense and full of fine-print conditions. Converting APPR Section 19 and EU Regulation (EC) No 261/2004 text into clear conditional conditional loops required deep regulatory research.
Accomplishments I'm Proud Of
- End-to-End Resolution: Building a fully functional application that takes a frustrating, real-life experience (a messy flight delay notification) and converts it into an actionable, legally cited PDF demand letter in under 3 seconds.
- The Rebuttal Engine's Instincts: Creating an AI module capable of reading a defensive email from a multi-billion dollar airline, catching their weak excuses, and automatically calling out their legal bluff with specific case precedents.
What I Learned
- How to build resilient, production-grade AI pipelines combining upstream LLMs with deterministic local heuristic fallbacks.
- The math and core geometries behind programmatic PDF creation using Python.
- Just how radically consumer asset-protection rights vary across borders—and how vulnerable passengers are when they don't have the tools to demand accountability.
What's Next for ClaimFlight
- Direct Inbound Forwarding: Allow users to forward their airline emails directly to an
@claimflight.cominbox to automatically initiate the tracking workflow via webhooks. - Localized Translation Layer: Generate demand letters and rebuttal notices translated automatically into the airline's native corporate language to expedite legal processing.
- Automated Regulatory Escalation: Integrate with open API endpoints for regulatory bodies (like the Canadian Transportation Agency, EU National Enforcement Bodies, or US DOT) to automatically file formal agency complaints if the airline fails to respond within the 14-day tracking ledger window.

Log in or sign up for Devpost to join the conversation.