Skip to content

Feature/rent to own calculator#1050

Open
sweetesty wants to merge 3 commits into
Shelterflex:mainfrom
sweetesty:feature/rent-to-own-calculator
Open

Feature/rent to own calculator#1050
sweetesty wants to merge 3 commits into
Shelterflex:mainfrom
sweetesty:feature/rent-to-own-calculator

Conversation

@sweetesty
Copy link
Copy Markdown

Closes #953


This PR builds the rent-to-own plan selector and equity calculator UI as a pure frontend feature with no API calls required.

What was done:

lib/rentToOwnCalc.ts

  • Equity accumulation formula encapsulated as a pure utility: calculates monthly rent portion, equity portion, projected ownership date, and total cost over the plan horizon
  • Edge case handled: if monthly budget is below the minimum required to reach ownership within the timeline, returns the minimum required payment and flags the plan as infeasible

frontend/app/calculator/rent-to-own/page.tsx

  • Dedicated rent-to-own calculator page with correct <title> and <meta> SEO tags
  • Prominent placeholder banner making clear rent-to-own is a future product not yet available for booking
  • Reachable from the main rent calculator via a tab/link

components/calculator/RentToOwnCalculator.tsx

  • Four inputs: property price, deposit percentage, monthly payment capacity, target ownership timeline
  • All calculations re-run in real-time as any input changes — no submit button required
  • Side-by-side comparison with standard rental (no equity) rendered below the inputs
  • Edge case UI: when monthly budget is too low, calculator highlights the minimum required payment instead of showing a broken plan

components/calculator/EquityProgressChart.tsx

  • Recharts area/line chart showing equity accumulation over time
  • Chart re-renders reactively on every input change
  • Empty/loading state handled for initial render before inputs are populated
  • Mobile-responsive with readable axis labels at narrow viewports

components/calculator/RentToOwnPlanCard.tsx

  • Summary card showing: monthly rent component, equity component, interest, years to ownership, projected ownership date, total cost
  • Standard rental comparison card shown side-by-side
  • Infeasible plan state renders minimum required payment with clear explanation

Linking

  • Calculator linked from property listing detail pages
  • Tab or link added on the main rent calculator page

Acceptance criteria met:

  • ✅ User can enter property value, deposit %, monthly budget, and desired ownership horizon
  • ✅ Chart updates in real-time as inputs change
  • ✅ Plan card shows rent component, equity component, interest, and projected ownership date
  • ✅ Side-by-side comparison with standard rental
  • ✅ Edge case: monthly budget too low shows minimum required payment
  • ✅ Calculator fully usable on mobile
  • ✅ Page reachable from main rent calculator via tab or link
  • ✅ Placeholder copy makes clear rent-to-own is not yet bookable

Regain and others added 3 commits May 30, 2026 21:12
…ard with 60s memory caching and neobrutalist Recharts charts
Implements Shelterflex#953. Adds a dedicated rent-to-own calculator page at
/calculator/rent-to-own with real-time equity accumulation chart,
plan comparison card (vs. standard renting), and edge-case handling
for budgets too low to reach ownership. Links added to the main
payment calculator (tab) and property detail pages (secondary CTA).
Pure frontend — no API calls; all maths in lib/rentToOwnCalc.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

Someone is attempting to deploy a commit to the pope-h's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@sweetesty Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rent-to-Own Plan Selector & Equity Calculator UI

1 participant