Hacktoberfest Hack Day Istanbul x Hadith Tech
🚀 A One-Day Open Source Hackathon & Hacktoberfest Celebration!
Fatura
Fatura turns photos of receipts and invoices, in Turkish, Arabic, or English, into verified, structured data and a ready-to-use Excel file.
Most AI receipt readers just trust whatever the model returns. Fatura checks the math:
- Multimodal extraction: the image goes to Gemma 4 / Gemini through the Gemini API, which returns store, date, currency, category, line items (original + translated name), tax, and total as JSON.
- Deterministic validation: a rules engine checks that the sum of line items equals the total (±0.05), including tax-exclusive invoices.
- Self-correction loop: if the numbers don’t add up, the exact arithmetic error (each item, the difference, and whether something is missing or duplicated) goes back to the model, which re-examines the image. Up to 2 corrections.
- Excel export: one formatted workbook per invoice, plus a combined workbook. Totals are live formulas, and Arabic files are laid out right-to-left.
Built for real-world use
- Automatic fallback between models (Gemini 3.8 Flash ⇄ Gemma 4 31B) when one is overloaded
- Auto-detects which features each model supports (JSON mode, thinking level)
- Retries with backoff, time budgets, and per-visitor rate limiting
- The API key stays on the server, each visitor’s session is isolated, and images are never stored
- A full audit trail of every attempt and correction
Stack: .NET 10 class library (C# records, async HttpClient), ASP.NET Core minimal API, Streamlit UI, openpyxl, and 35 offline xUnit tests. MIT licensed.
Example: a real Turkish telecom invoice with 12 line items, including negative carry-over lines and a tax-included column. Fatura extracted it correctly and validated 282.98 vs 283.00 within tolerance.ءذ
Built with
geminigemmaclaude
AI tools
Coded withClaude CodeGemini 3.8 FlashClaude Opus 5.5
Prize Categories Entered
- Submitted
Best Use of Gemma 4