Skip to content

AI-powered tax calculator for Canadian taxpayers. Calculate federal & Quebec income tax, RRSP contributions, tax credits, and optimize deductions. Bilingual (EN/FR) with real-time calculations. 100% privacy-focused (client-side only).

License

Notifications You must be signed in to change notification settings

Isaloum/TaxFlowAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

367 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’ฐ TaxFlowAI

AI-Powered Tax Management for Canada (2025)

A free, open-source, bilingual (FR/EN) tool with AI-powered features to manage your taxes, estimate credits, and optimize your RRSP impact across Canada. Powered by intelligent document processing and accurate calculations.

๐ŸŒ Live Web App: https://Isaloum.github.io/TaxFlowAI


โœจ Features

๐Ÿค– NEW: Document Automation

Automatically process tax documents with AI-powered extraction!

  • Supported Documents:
    • ๐Ÿ“„ T4, RL-1, T4A, RL-2 (tax slips)
    • ๐Ÿš— Uber/Lyft summaries, taxi statements
    • โ›ฝ Gas receipts, maintenance bills
    • ๐Ÿ“ฑ Phone bills, insurance, parking receipts
  • Smart Classification - Automatically identifies document types
  • Data Extraction - Extracts income, deductions, expenses
  • Tax Calculations - Instant tax impact estimates
  • 87% Test Coverage - Comprehensive test suite (157 tests)

๐Ÿ“š Documentation:

๐Ÿงฎ Accurate 2025 Calculations

  • Quebec Credits:
    • Solidarity Tax Credit (Crรฉdit pour la solidaritรฉ) โ€” up to $531
    • Work Premium (Prime au travail) โ€” up to $728 single / $1,456 with dependents
  • Federal Credits:
    • Basic Personal Amount (BPA) savings โ€” $15,705 ร— 15%
    • Canada Workers Benefit (CWB / PTE) โ€” up to $1,519
  • RRSP Impact:
    • Tax savings at your marginal rate (28.85% / 33.25% / 38.85%)
    • Shows how RRSP contributions unlock hidden credits

๐ŸŒ Fully Bilingual (FR/EN)

  • French-first design (Quebec default language)
  • One-click toggle to English
  • All labels, results, and warnings translate dynamically
  • Proper Quebec terminology (NAS โ†’ SIN, RRQ โ†’ QPP, etc.)

๐Ÿ“ธ Screenshots

Calculator Interface (English)

Calculator Interface - English

Bilingual Support (Franรงais)

Calculator Interface - French

Results Display

Tax Credits Results

Live Demo: Try it yourself at https://isaloum.github.io/TaxFlowAI/


๐Ÿ”’ Privacy-First

  • 100% client-side โ€” all calculations run in your browser
  • No data sent to servers โ€” your tax info never leaves your device
  • No tracking, no cookies, no accounts โ€” completely anonymous
  • Open source โ€” audit the code yourself

๐ŸŽฏ User-Friendly

  • Simple mode: 3 essential fields (income, union dues, SIN)
  • Advanced mode: Full RL-1/T4 coverage (deductions, benefits, etc.)
  • Box/line referencing: See exactly where to find data on your slips
    • RL-1 Box A โ†’ TP-1 Line 101
    • T4 Box 14 โ†’ T1 Line 10100
  • Structured JSON export: For automation/integration with tax software

๐Ÿš€ Dual Interface

๐Ÿ”— Connect the web app to n8n (parse email/text)

You can pipe raw payroll emails or copied PDF text through an n8n webhook and let the web app auto-fill the RL-1/T4 fields:

  1. Create an n8n Webhook node (POST) and grab the URL. Store it in the UIโ€™s โ€œn8n webhook URLโ€ field (itโ€™s saved to localStorage).
  2. Parse the incoming text in your workflow (e.g., OpenAI/Claude node or Regex). Return JSON like:
    {
      "rl1": { "A": 60000, "F": 400, "B.A": 3200 },
      "t4": { "14": 60000, "44": 400 },
      "rrsp": 5000
    }
    Keys map to the on-page field IDs (punctuation is ignored, so B.A โ†’ rl1_BA, D-1 โ†’ rl1_D1). Include whichever slip youโ€™re parsing.
  3. Paste any email/text into the new โ€œPaste email/text to parseโ€ box and click Send to n8n. Once the webhook replies, hit Apply parsed fields to load the values into the calculator and run your estimate.

Tip: Add validation/guardrails in n8n (e.g., clamp to positive numbers, mark confidence) before returning the JSON to the app. Troubleshooting

  • The UI validates the webhook URL (must be http/https) and will flag malformed or empty responses.
  • If the webhook returns non-numeric slip values or no RL-1/T4/RRSP fields, the app will show an error and skip applying them.
  • Some workflows wrap data in a data object; the app automatically unwraps this shape.

๐Ÿ“– How to Use

Web App (Recommended)

  1. Visit https://Isaloum.github.io/TaxFlowAI
  2. Choose your slip type: RL-1 (Quebec) or T4 (Federal)
  3. Enter your income (Box A / Box 14)
  4. Optionally: Add union dues, adjust RRSP contribution slider
  5. Click "Estimer les crรฉdits" / "Estimate Credits"
  6. See your instant results:
    • Total tax benefit
    • Cash refund breakdown
    • RRSP tax savings

Toggle to Advanced Mode to enter deductions (QPP, QPIP, RPP, charitable donations, etc.)


๐Ÿ”ง Technical Details

Tech Stack

  • Frontend: Vanilla JavaScript (ES6+ modules)
  • No dependencies โ€” pure HTML/CSS/JS
  • No build step โ€” works directly in any modern browser
  • Hosting: GitHub Pages (static site)

Calculation Accuracy

  • โœ… Solidarity Credit: $531 base, phased out $57,965โ€“$64,125
  • โœ… Work Premium: 26% rate on income above $7,200, capped at $728
  • โœ… Federal CWB: 27% build-up, 15% reduction after $25,539
  • โœ… RRSP marginal rates: Combined QC+Fed rates (28.85% / 33.25% / 38.85%)

๐Ÿ›ฃ๏ธ Roadmap

Phase 1: MVP โœ… DONE

  • Basic RL-1/T4 parsing
  • Quebec + Federal credit calculations
  • RRSP impact estimator
  • Bilingual web UI
  • CLI tool
  • GitHub Pages deployment

Phase 2: Enhanced UX (Next 2 weeks)

  • PDF auto-extraction โ€” drag & drop your RL-1/T4 PDF โ†’ auto-fill boxes
  • RRSP optimizer chart โ€” visualize tax savings vs contribution
  • Multi-year comparison โ€” save & compare 2024 vs 2025

Phase 3: Pro Features (Next month)

  • CRA/RQ XML export โ€” generate files for UFile/TurboTax
  • More credits: Childcare, Medical, CCB
  • Multi-province support โ€” Ontario, BC, Alberta

๐Ÿ“œ License

MIT License โ€” free to use, modify, and distribute.


๐Ÿ™ Credits

Created by: Ihab Saloum

Built with AI assistance โ€” Demonstrating how electrical engineers can ship real software using Claude as a force multiplier.


๐Ÿ’ก Why I Built This

As an electrical engineer in Quebec, I was frustrated with expensive tax software charging $20-50/year for basic estimates with no transparency and no RRSP optimizer.

So I built TaxFlowAI in 72 hours using AI (Claude Sonnet 4.5) to give Canadians a free, transparent tax estimator with AI-powered document processing.

If this saves you money, consider โญ starring the repo or sharing with friends!


โš–๏ธ Disclaimer

This tool provides estimates only and is not a substitute for professional tax advice. Always consult a qualified accountant for your final tax return.

Use at your own risk.


๐Ÿ‡จ๐Ÿ‡ฆ Made in Canada, for Canada. Fait au Canada, pour le Canada. ๐Ÿ‡จ๐Ÿ‡ฆ

About

AI-powered tax calculator for Canadian taxpayers. Calculate federal & Quebec income tax, RRSP contributions, tax credits, and optimize deductions. Bilingual (EN/FR) with real-time calculations. 100% privacy-focused (client-side only).

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •