Skip to content

Repository files navigation

GTA Property Intelligence & Title Risk Analyzer

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.

🚀 Purpose

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.

🛠️ Technical Architecture

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).

Frontend (React/Vite)

  • 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.

Backend (FastAPI/Python)

  • 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: pandas for processing property datasets and generating heatmap statistics.

Core Logic (LTTCalc/)

  • 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.

📂 Project Structure

├── 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

⚙️ Setup & Installation

Prerequisites

  • Node.js (v18+)
  • Python 3.13+
  • Google Gemini API Key

Backend Setup

  1. Create a virtual environment:
    python -m venv venv
    source venv/bin/activate  # Windows: .\venv\Scripts\activate
  2. Install dependencies:
    pip install -r LTTCalc/requirements.txt
  3. Configure .env:
    GEMINI_API_KEY=your_key_here
  4. Start the server:
    python server.py

Frontend Setup

  1. Install dependencies:
    npm install
  2. Run the development server:
    npm run dev

🧪 Legal Audit Logic

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.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages