A sophisticated real estate decision-support platform designed for the Greater Toronto Area (GTA). This tool bridges the gap between raw property data and legal/financial clarity by combining high-precision tax calculations with AI-driven legal document auditing.
Buying property in Ontario, particularly within the City of Toronto, involves navigating a "double" Land Transfer Tax (LTT + MLTT) system and complex title encumbrances. This project provides:
- Financial Transparency: Real-time calculation of Provincial and Municipal Land Transfer Taxes.
- Legal Risk Mitigation: Automated AI auditing of Teranet Parcel Registers (PDFs) to identify "Zombie Mortgages," liens, and easements.
- Market Intelligence: Interactive heatmaps visualizing tax-to-price ratios across Ontario FSAs (Postal Codes).
- Tax Arbitrage: Spatial analysis to find significant tax savings by moving just outside the Toronto border.
The system utilizes a Hybrid Analysis Pattern: Deterministic Python logic handles the "hard" math (taxes, geocoding), while Google Gemini's multi-modal AI handles the "soft" analysis (legal summaries and risk extraction).
- Framework: React 19 (TypeScript)
- Styling: Tailwind CSS v4 & Framer Motion (for interactive UI/UX)
- Mapping: Leaflet & React-Leaflet for spatial visualization of FSA-level tax data.
- State Management: React Hooks with a centralized analysis engine in
App.tsx.
- API Engine: FastAPI for high-performance, asynchronous request handling.
- AI Integration: Google Generative AI (Gemini 2.0 Flash & 2.5 Pro) for PDF parcel analysis and property synthesis.
- Geospatial Processing:
pgeocode: Offline FSA-to-coordinate mapping.geopy: Reverse geocoding for tax arbitrage calculations.
- Data Science:
pandasfor processing property datasets and generating heatmap statistics.
- Deterministic Tax Engine: Implements the exact graduated tax brackets for Ontario and the City of Toronto.
- FSA Grouper: Aggregates property data into postal code clusters for regional trend analysis.
├── src/ # React Frontend
│ ├── App.tsx # Main application logic & API orchestration
│ └── main.tsx # Entry point
├── server.py # FastAPI Backend & Gemini AI integration
├── LTTCalc/ # Core Python logic (Taxes, Data processing)
│ ├── ltt_calculator.py # Graduated tax bracket implementation
│ └── fsa_grouper.py # Spatial data aggregation
├── index.html # Vite entry module
└── vite.config.ts # Build & Proxy configuration
- Node.js (v18+)
- Python 3.13+
- Google Gemini API Key
- Create a virtual environment:
python -m venv venv source venv/bin/activate # Windows: .\venv\Scripts\activate
- Install dependencies:
pip install -r LTTCalc/requirements.txt
- Configure
.env:GEMINI_API_KEY=your_key_here
- Start the server:
python server.py
- Install dependencies:
npm install
- Run the development server:
npm run dev
The "Parcel Audit" feature uses a custom prompt-engineered agent that scans Teranet documents for specific risk scores:
- Zombie Mortgages (40 pts): Un-discharged charges older than 10 years.
- Critical Velocity (30 pts): 3+ transfers within 24 months (flipping risk).
- Encumbrances (10 pts): Active easements or "Subject To" burdens.
Disclaimer: This tool is for informational purposes only and does not constitute legal or financial advice.