Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

1,002 Commits

Repository files navigation

prei — Passive Real Estate Investment Analytics

A Django-based web application for personal passive real estate investors — buy-and-hold investors who want to analyze single-family rentals, small multifamily properties, and BRRRR deals with professional-grade underwriting. No fluff, no auction monitoring, no market timing — just durable cash-flow analysis.

📊 Status

Latest release:v0.4.0 (development milestone)

What works now

  • Deal pipeline — Screen, offer, renovate, close, and lease properties through a visual pipeline workflow with 9-criteria screening
  • Discovery source models — Structured ingestion for HUD REO (ArcGIS Hub), USDA REO, Dallas County NTS, and ATTOM preforeclosure notices
  • Pipeline screening — Hard-kill and yield scoring for HUD/USDA/county sources; "Add to Pipeline" flow from list/detail views
  • Growth area explorer — Discover and compare markets by demographic and economic indicators with pagination and CSV export
  • VRM foreclosures — Foreclosure listings with direct linking to pipeline discovery
  • Property underwriting — Full scorecard (CoC, Cap Rate, DSCR, GRM), BRRRR calculator, hold projections, tax modeling
  • Market intelligence — Price-to-rent ratio, population growth, employment diversity, school ratings, walk scores
  • Auto-versioned releases — Git tags → Docker bake → structured logging; every build carries its version
  • Python 3.14 + Django 6.0 — Fully migrated to latest stable runtimes

What's next

  • County foreclosure notice scraper framework (additional counties)
  • Property comparison and portfolio scenario modeling
  • Enhanced notifications and collaboration features
  • Additional data source integrations (Redfin, Zillow)

✨ Features

  • Deal Screener Dashboard — At-a-glance KPI grid (CoC, Cap Rate, DSCR, GRM, Score) with color-coded verdicts
  • Property Entry Form — Clean, responsive form with styled inputs, smart grids, and real-time validation
  • Property Detail Scorecard — Full underwriting score breakdown with pass/fail flags, verdict badge, color-coded metrics
  • BRRRR Calculator — Client-side calculator with zero-ARV guard, verdict banner, DSCR warning, locale-formatted numbers
  • Markets Page — Price-to-rent ratio, population growth, employment diversity, overall market score per ZIP
  • Underwriting Score v2 — Multi-signal scoring (1% Rule, CoC, DSCR, Cap Rate, GRM, After-Tax CoC) with verdict
  • Investment Analysis — Financial KPIs (Cash-on-Cash, Cap Rate, NOI, IRR, DSCR)
  • Hold Period Projections — Year-by-year rent growth, equity build-up, appreciation scenarios, net sale proceeds
  • Depreciation & Tax Modeling — 27.5-year straight-line depreciation and after-tax cash flow

Custom UX/UI Design System (No Bootstrap)

Built on a bespoke design system — zero Bootstrap or third-party CSS frameworks:

TokenPurpose
--font-sans / --font-monoTypography stack
--color-primary / --color-grow-*Semantic palette (action, success, caution, risk)
--color-verdict-*Underwriting verdict colors (A/B/C/moderate)
--surface-page / --surface-card / --surface-secondarySurface hierarchy
--radius-sm / --radius-md / --radius-lg / --radius-pillCorner rounding
--sp-1 through --sp-8Spacing scale (4 px increments)
--text-xs / --text-sm / --text-base / --text-lg / --text-xlType scale
--border-default / --border-subtleBorder weights

Components:.card, .kpi-grid, .data-table, .verdict-badge, .score-bar, .tab-bar, .layout-2col, .page-header, .filter-bar, .chip, .btn, .btn-primary, .form-input, .form-grid-2/3/2-1/2-1-1, .empty-state, .flag-list, .message, .brrrr-banner, .result-emphasis, .form-divider, .form-subsection-label


Quick Start — Choose Your Environment

EnvironmentNameBest ForDatabaseStart Command
localdevDaily development on your machineSQLite (db.sqlite3)docker compose up -d
devcontainertestGitHub Codespaces / VS Code Dev ContainerSQLite (/home/vscode/db.sqlite3)Open in Codespace → make dev
renderprodProduction deploymentPostgreSQL (managed)Click "Deploy to Render" button

Local Development (dev)

git clone https://github.com/paruff/prei.git
cd prei
cp .env.example .env
# Edit .env — set SECRET_KEY, DJANGO_ENV=development
docker compose up -d
# Open http://127.0.0.1:8000# Login: demo@prei.dev / DemoPass123!

docker compose up -d automatically runs migrations and seeds the demo user — no extra steps. Windows users: See Local Docker Setup Guide for WSL2/memory config.

Dev Container / Codespaces (test)

  1. Open repo in GitHub Codespaces (Code → Codespaces → Create codespace on main) or VS Code Dev Containers (Reopen in Container)
  2. Wait for build (~2 min), then run in terminal:
    make dev

    make dev runs migrate and seed_data automatically — the demo user will be created for you.

  3. Open forwarded port 8000 → http://localhost:8000

Demo login:demo@prei.dev / DemoPass123!

Deploy to Render (prod)

Deploy to Render

The render.yaml blueprint provisions:

  • prei-web — Django app via Gunicorn
  • prei-db — Managed PostgreSQL

Required env vars in Render dashboard:

  • SECRET_KEY — generate with python -c "import secrets; print(secrets.token_urlsafe(50))"
  • ALLOWED_HOSTS — your Render URL, e.g. your-app.onrender.com

API Keys for Data-Driven Decisions

KeyPurposeGet KeyRequired For
ATTOM_API_KEYProperty details, comps, foreclosuresapi.attomdata.comComps, property enrichment
CENSUS_API_KEYZIP demographics, population, incomeapi.census.govGrowth area scoring
BLS_API_KEYCounty unemployment, wages (QCEW/LAUS)data.bls.gov/registrationEngineGrowth area scoring
FRED_API_KEYState employment growth, economic datafred.stlouisfed.org/docs/api/api_key.htmlGrowth area scoring (fallback)
HUD_API_KEYFair Market Rents by ZIP/countyhuduser.gov/portal/dataset/fmr-api.htmlRental estimates
GREATSCHOOLS_API_KEYSchool ratingsgreatschools.org/apiNeighborhood quality
WALKSCORE_API_KEYWalkability scoreswalkscore.com/professional/apiNeighborhood quality

Add keys to .env (local/dev) or Render dashboard (prod). See API Keys Reference for details.


Documentation

Full documentation at https://paruff.github.io/prei/ (Diátaxis framework):

Build locally:

pip install -r docs-requirements.txt
mkdocs serve

CI & Tooling

  • Lint/Format: ruff
  • Type Check: mypy
  • Tests: pytest + Makefile validation (no duplicate targets, proper syntax)
  • Docs: MkDocs Material
  • CI: GitHub Actions (.github/workflows/) — DORA-friendly logging

Repository Purpose

Host the web application and all related code, tests, infra config, and documentation for passive residential real estate investment analytics — buy-and-hold SFR/small multifamily, BRRRR, and market intelligence.

License

Licensed per repository terms.

About

Passive real estate investment analytics — screen, underwrite, and track buy-and-hold rental properties with public data

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages