OnOffDeals: building a real estate deal analysis SaaS
OnOffDeals (onoffdeals.ai) helps real-estate investors, flippers and buyers find deals and check whether the numbers hold. I have been its sole developer and architect since 2025, responsible for about 20K lines across front end, back end, billing and AI.
- ~20K lines, sole developer
- 311 automated tests
- 16 API routers, 20 services
The problem
Investors judge a property on a handful of numbers: after-repair value, maximum allowable offer, flip profit, cap rate, cash flow. Each depends on choosing the right comparable sales, and spreadsheets get that wrong quietly. OnOffDeals needed to source deals, value them consistently, grade them at a glance and let users act on the result, while keeping third-party property-data costs under control.
Architecture
The front end is a React 18 SPA on Vite with React Router and role-gated app routes, a hand-built Tailwind design system with light and dark theming, a Leaflet deal map that grades deals red, yellow or green, and driver.js product tours. The back end is fully async FastAPI with MongoDB through Motor, Redis and Pydantic 2, organised into 16 API routers and 20 domain services, deployed on Vercel and Railway.
- Clerk + JWT auth with role-based access
- Versioned market caching and batched prefetching for third-party property-data APIs
- SEO prerendering with meta, Open Graph and JSON-LD
- PDF and Excel exports, plus DocuSign
The valuation engine and how it is tested
I built the valuation and underwriting engine from scratch: comparable-sales selection, multi-model blending of price and $/sqft, ARV, MAO using the 70% rule, flip profit, NOI, cap rate, cash-on-cash return and DSCR. Early on I caught a silent failure: on thin comp sets the engine could return a figure that was wrong but plausible, which no error would flag. I answered it with self-verifying invariant tests that assert properties which must always hold, now part of a 311-test suite.
Billing and the AI deal coach
Billing runs on live Stripe: subscriptions, trials and coupons, a webhook-driven state machine for subscription status, and per-plan usage metering with overage. Inside the app, Anthropic Claude acts as a deal coach. It runs behind prompt guardrails with structured output validation, and after deployment I red-teamed it adversarially to find the ways it could be pushed off task.
Rates from $20/hour
Hourly for open-ended work, fixed price for defined projects. The first call is free and there's no obligation.
Frequently asked questions
What stack is OnOffDeals built on?
React 18 on Vite with Tailwind and Leaflet on the front end; async FastAPI, MongoDB (Motor), Redis and Pydantic 2 on the back end; Stripe for billing, Clerk + JWT for auth and Anthropic Claude for the deal coach; deployed on Vercel and Railway.
Where does the property data come from?
From third-party property-data APIs. Those carry usage costs and rate limits, so I built versioned market caching and batched prefetching to keep those data costs viable under rate limits as usage grows. The valuations themselves come from my own engine, built from scratch.
Can you build a similar SaaS for my business?
Yes. The same pieces (an async API, role-based auth, Stripe metering, a calculation engine guarded by invariant tests and an LLM feature with guardrails) apply well beyond real estate. Rates start from $20/hour, with fixed-price quotes for defined MVPs.