Skip to content

Repository files navigation

Property Analyzer

Live demo →

Next.js React 19 TypeScript License: MIT

A shareable web app that analyzes a property for short-term + long-term rental, cost-segregation tax depreciation, 3 / 5 / 10-year profitability, a recommended offer price, and a weighted 0–100 rating — a full real-estate underwriting engine that runs entirely in the browser.

Built by Koustubh Sharma — risk & BI analyst in fintech lending — applying credit-risk underwriting discipline to residential real estate. If this saves you a spreadsheet, a ⭐ helps others find it.

  • Minimum input: an address. The rest auto-fills from public data (RentCast) with editable overrides.
  • Live recompute: every assumption is editable; results update instantly (the engine runs in the browser).
  • Share by link: the full analysis encodes into a URL — send it to anyone to collaborate.
  • History: save analyses to a shared Supabase database (or this-browser localStorage if you skip Supabase).

Planning tool, not tax/legal/investment advice. STR depreciation losses assume material participation and average guest stays ≤ 7 days. Confirm bonus depreciation, recapture, and STR licensing with a CPA / local authority.


1. Run locally

cd ~/Desktop/property-analyzer
npm install
cp .env.local.example .env.local   # optional: add keys (works without them)
npm run dev                         # http://localhost:3000

It works immediately with no keys (manual entry + this-browser history) and loads a worked example (7420 Teasdale Ave) on first open.

Verify the finance engine matches the Excel model:

npm run engine:test

2. Optional keys (.env.local)

Variable What it enables Get it
RENTCAST_API_KEY Auto-fill specs, value, rent, comps from an address https://app.rentcast.io (free tier ~50/mo)
NEXT_PUBLIC_SUPABASE_URL Shared cloud history https://supabase.com (free)
NEXT_PUBLIC_SUPABASE_ANON_KEY Shared cloud history Supabase → Project Settings → API

After creating the Supabase project, run supabase_schema.sql in its SQL editor to create the analyses table.

Note on Zillow/Redfin: both prohibit automated scraping and have no public API, so the app uses RentCast (a licensed aggregator) for address → property/rent/comp data, with manual entry as a always-available fallback. STR ADR/occupancy come from editable zip benchmarks (swap in an AirDNA pull anytime).

3. Deploy + share (Vercel)

npm i -g vercel        # once
vercel                 # link & deploy a preview
vercel --prod          # production URL to share

In the Vercel dashboard → Project → Settings → Environment Variables, add the three keys above (same names). Redeploy. Share the production URL with collaborators — with Supabase configured, everyone sees the same saved history.

(You can also push this folder to GitHub and "Import Project" in Vercel for auto-deploys on every push.)

What it computes

  • Cost-seg depreciation: 5-yr / 15-yr / 27.5-yr split, 100% bonus (OBBBA), mid-month convention.
  • Three strategies: STR→convert (the tax play), pure short-term, pure long-term.
  • Per-year pro forma with the STR loophole (material participation), suspended passive losses, and sale with §1245/§1250 recapture + capital-gains tax.
  • 3 / 5 / 10-year after-tax IRR, equity multiple, total profit, cash-on-cash.
  • Recommended offer: goal-seeks the price for a target 5-yr after-tax IRR, anchored to comps.
  • Weighted rating (0–100 + letter grade): tax/cost-seg potential, Yr-1 benefit, 5- & 10-yr IRR, debt coverage, deal margin vs comps, and STR-license feasibility.

Project map

app/            page.tsx (analyzer), history/, api/property (RentCast proxy)
components/     AssumptionsForm, Results, ui
lib/            finance.ts (engine), types, defaults, benchmarks, rentcast, supabase, share, format
scripts/        engine-test.ts
supabase_schema.sql

About

Real-estate underwriting in the browser: STR/LTR rental analysis, cost-segregation depreciation, 3/5/10-yr profitability, offer price & 0-100 rating. Next.js 15, shareable by URL.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages